tcp: assign skb hash after tcp_event_data_sent
Subsystems (3)
PATCH 1/1 tcp: assign skb hash after tcp_event_data_sent
Move skb_set_hash_from_sk s.t. it's called after instead of before tcp_event_data_sent is called. This enables congestion control modules to change the socket hash right before restarting from idle (via the TX_START congestion event).
--- net/ipv4/tcp_output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv4/tcp_output.c +1 -1
@@ -1319,7 +1319,6 @@ static int __tcp_transmit_skb(struct sock *sk, struct sk_buff *skb,skb_orphan (skb); skb->sk = sk; skb->destructor =skb_is_tcp_pure_ack (skb) ? __sock_wfree : tcp_wfree; -skb_set_hash_from_sk (skb, sk);refcount_add (skb->truesize, &sk->sk_wmem_alloc);skb_set_dst_pending_confirm (skb, sk->sk_dst_pending_confirm);
@@ -1390,6 +1389,7 @@ static int __tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, tcp_skb_pcount(skb)); tp->segs_out +=tcp_skb_pcount (skb); +skb_set_hash_from_sk (skb, sk);/* OK, its time to fill skb_shinfo(skb)->gso_{segs|size} */ skb_shinfo (skb)->gso_segs =tcp_skb_pcount (skb);skb_shinfo (skb)->gso_size =tcp_skb_mss (skb);
Signature · 1 line
2.30.0.284.gd98b1dd5eaa7-goog
This patch was applied to netdev/net-next.git (refs/heads/master):
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
Quoted 10 lines · On Mon, 11 Jan 2021 15:05:52 -0800 you wrote:
Move
skb_set_hash_from_sks.t. it's called after instead of beforetcp_event_data_sentis called. This enables congestion control modules to change the socket hash right before restarting from idle (via theTX_STARTcongestion event).Signed-off-by Yuchung Cheng <[email protected]>Signed-off-by Eric Dumazet <[email protected]>Signed-off-by Neal Cardwell <[email protected]>[...]
Here is the summary with links:
- [net-next] tcp: assign skb hash after tcp_event_data_sent
https://git.kernel.org/netdev/net-next/c/0ae5b43d6dde
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html