]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: Set rcv zerocopy hint correctly if skb last frag is < PAGE_SIZE
authorArjun Roy <arjunroy@google.com>
Sun, 15 Dec 2019 19:54:51 +0000 (11:54 -0800)
committerJakub Kicinski <jakub.kicinski@netronome.com>
Sun, 15 Dec 2019 20:13:41 +0000 (12:13 -0800)
commitd9f43bbe33f7251bc4dd093a027b306f8372f261
treeee22c5074bfc6d19b54d7202ec336f8521e2d4bd
parentc7253b3ec52f546832c66f0c3bc52c3f3422e5eb
tcp: Set rcv zerocopy hint correctly if skb last frag is < PAGE_SIZE

At present, if the last frag of paged data in a skb has < PAGE_SIZE
data, we compute the recv_skip_hint as being equal to the size of that
frag and the entire next skb.

Instead, just return the runt frag size as the hint.

recv_skip_hint is used by the application to skip over
bytes that can not be mmaped, so returning a too big
chunk is pessimistic and forces more bytes to be copied.

Signed-off-by: Arjun Roy <arjunroy@google.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
net/ipv4/tcp.c