diff options
| author | Eric Dumazet <[email protected]> | 2025-03-20 12:16:04 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2025-03-25 14:37:16 +0000 |
| commit | 0de2a5c4b824da2205658ebebb99a55c43cdf60f (patch) | |
| tree | 35c86479d8dd4f78f78c63164a17f70fc9e72b3a /net/ipv4/tcp_fastopen.c | |
| parent | Merge branch 'nexthop-convert-rtm_-new-del-nexthop-to-per-netns-rtnl' (diff) | |
| download | kernel-0de2a5c4b824da2205658ebebb99a55c43cdf60f.tar.gz kernel-0de2a5c4b824da2205658ebebb99a55c43cdf60f.zip | |
tcp: avoid atomic operations on sk->sk_rmem_alloc
TCP uses generic skb_set_owner_r() and sock_rfree()
for received packets, with socket lock being owned.
Switch to private versions, avoiding two atomic operations
per packet.
Signed-off-by: Eric Dumazet <[email protected]>
Reviewed-by: Neal Cardwell <[email protected]>
Reviewed-by: Kuniyuki Iwashima <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/ipv4/tcp_fastopen.c')
| -rw-r--r-- | net/ipv4/tcp_fastopen.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp_fastopen.c b/net/ipv4/tcp_fastopen.c index 1a6b1bc54245..ca40665145c6 100644 --- a/net/ipv4/tcp_fastopen.c +++ b/net/ipv4/tcp_fastopen.c @@ -189,7 +189,7 @@ void tcp_fastopen_add_skb(struct sock *sk, struct sk_buff *skb) tcp_segs_in(tp, skb); __skb_pull(skb, tcp_hdrlen(skb)); sk_forced_mem_schedule(sk, skb->truesize); - skb_set_owner_r(skb, sk); + tcp_skb_set_owner_r(skb, sk); TCP_SKB_CB(skb)->seq++; TCP_SKB_CB(skb)->tcp_flags &= ~TCPHDR_SYN; |
