Skip to contentSkip to conversation

tcp: Don't reinitialise tw->tw_transparent in tcp_time_wait().

PATCH Applied Kuniyuki Iwashima 4 participants 4 messages Nov 18, 2025 – Nov 19, 2025

Subsystems (3)
lore
Share & tools
lore

Kuniyuki Iwashima

author reviewer
#0 lore raw

PATCH 1/1 tcp: Don't reinitialise tw->tw_transparent in tcp_time_wait().

tw->tw_transparent is initialised twice in inet_twsk_alloc() and tcp_time_wait().

Let's remove the latter.

---
 net/ipv4/tcp_minisocks.c | 1 -
 1 file changed, 1 deletion(-)
net/ipv4/tcp_minisocks.c +0 -1
index d8f4d813e8dd..bd5462154f97 100644
@@ -337,7 +337,6 @@ void tcp_time_wait(struct sock *sk, int state, int timeo)
 		struct tcp_timewait_sock *tcptw = tcp_twsk((struct sock *)tw);
 		const int rto = (icsk->icsk_rto << 2) - (icsk->icsk_rto >> 1);
 
-		tw->tw_transparent	= inet_test_bit(TRANSPARENT, sk);
 		tw->tw_mark		= sk->sk_mark;
 		tw->tw_priority		= READ_ONCE(sk->sk_priority);
 		tw->tw_rcv_wscale	= tp->rx_opt.rcv_wscale;
Signature · 1 line
2.52.0.rc1.455.g30608eb744-goog
maintainer
#2 lore raw
In reply to Kuniyuki Iwashima
Quoted 4 lines · On Tue, 18 Nov 2025 00:04:40 +0000 Kuniyuki Iwashima wrote:

tw->tw_transparent is initialised twice in inet_twsk_alloc() and tcp_time_wait().

Let's remove the latter.

Coincidentally looks like inet_twsk_alloc() can be static

#3 lore raw
In reply to Kuniyuki Iwashima
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 8 lines · On Tue, 18 Nov 2025 00:04:40 +0000 you wrote:

tw->tw_transparent is initialised twice in inet_twsk_alloc() and tcp_time_wait().

Let's remove the latter.

[...]

Here is the summary with links:
- [v1,net-next] tcp: Don't reinitialise tw->tw_transparent in tcp_time_wait().

    https://git.kernel.org/netdev/net-next/c/932478bf9f6d

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html