]> asedeno.scripts.mit.edu Git - linux.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)
commit02583adeff12fa0a4d72558853a926867afb226c
tree61bb4d25bbfbbaa8c0912f6781f1be2214b1252a
parent111856c758d9a06145da446e0db8f71988eebf02
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