]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: place all zerocopy payload in frags
authorWillem de Bruijn <willemb@google.com>
Sat, 23 Dec 2017 00:00:19 +0000 (19:00 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 27 Dec 2017 21:44:13 +0000 (16:44 -0500)
commit3efd7ec8dba37dc1609c1ca8e2f01510dd7a291e
tree61bb4d25bbfbbaa8c0912f6781f1be2214b1252a
parentbe99b698ba8d881f598ffe0447b52f1709d0d20f
tcp: place all zerocopy payload in frags

This avoids an unnecessary copy of 1-2KB and improves tso_fragment,
which has to fall back to tcp_fragment if skb->len != skb_data_len.

It also avoids a surprising inconsistency in notifications:
Zerocopy packets sent over loopback have their frags copied, so set
SO_EE_CODE_ZEROCOPY_COPIED in the notification. But this currently
does not happen for small packets, because when all data fits in the
linear fragment, data is not copied in skb_orphan_frags_rx.

Reported-by: Tom Deseyn <tom.deseyn@gmail.com>
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp.c