]> Git Repo - linux.git/commit
tcp: fix zerocopy and notsent_lowat issues
authorEric Dumazet <[email protected]>
Tue, 26 Mar 2019 15:34:55 +0000 (08:34 -0700)
committerDavid S. Miller <[email protected]>
Wed, 27 Mar 2019 20:59:02 +0000 (13:59 -0700)
commit4f661542a40217713f2cee0bb6678fbb30d9d367
tree8c49f8cb2bb8e14e76b8f912ec39659dc06cb4e5
parent4d5ec89fc8d14dcdab7214a0c13a1c7321dc6ea9
tcp: fix zerocopy and notsent_lowat issues

My recent patch had at least three problems :

1) TX zerocopy wants notification when skb is acknowledged,
   thus we need to call skb_zcopy_clear() if the skb is
   cached into sk->sk_tx_skb_cache

2) Some applications might expect precise EPOLLOUT
   notifications, so we need to update sk->sk_wmem_queued
   and call sk_mem_uncharge() from sk_wmem_free_skb()
   in all cases. The SOCK_QUEUE_SHRUNK flag must also be set.

3) Reuse of saved skb should have used skb_cloned() instead
  of simply checking if the fast clone has been freed.

Fixes: 472c2e07eef0 ("tcp: add one skb cache for tx")
Signed-off-by: Eric Dumazet <[email protected]>
Cc: Willem de Bruijn <[email protected]>
Cc: Soheil Hassas Yeganeh <[email protected]>
Acked-by: Soheil Hassas Yeganeh <[email protected]>
Tested-by: Holger Hoffstätte <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
include/net/sock.h
net/ipv4/tcp.c
This page took 0.055953 seconds and 4 git commands to generate.