aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/net/ipv4/tcp_timer.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2025-11-24 17:50:13 +0000
committerJakub Kicinski <kuba@kernel.org>2025-11-25 19:28:29 -0800
commit9a5e5334adc039fa652aa071ea95b18db0bc1f43 (patch)
tree364b6e41e92b9ff4e784ee82f22a0cbaa9cff8ff /net/ipv4/tcp_timer.c
parenttcp: introduce icsk->icsk_keepalive_timer (diff)
downloadwireguard-linux-9a5e5334adc039fa652aa071ea95b18db0bc1f43.tar.xz
wireguard-linux-9a5e5334adc039fa652aa071ea95b18db0bc1f43.zip
tcp: remove icsk->icsk_retransmit_timer
Now sk->sk_timer is no longer used by TCP keepalive, we can use its storage for TCP and MPTCP retransmit timers for better cache locality. Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com> Link: https://patch.msgid.link/20251124175013.1473655-5-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/ipv4/tcp_timer.c')
-rw-r--r--net/ipv4/tcp_timer.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c
index d2678dfd8118..160080c9021d 100644
--- a/net/ipv4/tcp_timer.c
+++ b/net/ipv4/tcp_timer.c
@@ -698,7 +698,7 @@ void tcp_write_timer_handler(struct sock *sk)
return;
if (time_after(tcp_timeout_expires(sk), jiffies)) {
- sk_reset_timer(sk, &icsk->icsk_retransmit_timer,
+ sk_reset_timer(sk, &sk->tcp_retransmit_timer,
tcp_timeout_expires(sk));
return;
}
@@ -725,12 +725,10 @@ void tcp_write_timer_handler(struct sock *sk)
static void tcp_write_timer(struct timer_list *t)
{
- struct inet_connection_sock *icsk =
- timer_container_of(icsk, t, icsk_retransmit_timer);
- struct sock *sk = &icsk->icsk_inet.sk;
+ struct sock *sk = timer_container_of(sk, t, tcp_retransmit_timer);
/* Avoid locking the socket when there is no pending event. */
- if (!smp_load_acquire(&icsk->icsk_pending))
+ if (!smp_load_acquire(&inet_csk(sk)->icsk_pending))
goto out;
bh_lock_sock(sk);