]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: adjust rcv zerocopy hints based on frag sizes
authorSoheil Hassas Yeganeh <soheil@google.com>
Wed, 26 Sep 2018 20:57:04 +0000 (16:57 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 2 Oct 2018 05:36:56 +0000 (22:36 -0700)
commitfb17b8440168ae8e97ff9ae819b54bc061a4c087
treea5df900d899214ba8f8d6513d1d3ed6dbeb449f0
parent0c7be6a58ea67fabc49caad7f30c562bec19a039
tcp: adjust rcv zerocopy hints based on frag sizes

When SKBs are coalesced, we can have SKBs with different
frag sizes. Some with PAGE_SIZE and some not with PAGE_SIZE.
Since recv_skip_hint is always set to the full SKB size,
it can overestimate the amount that should be read using
normal read for coalesced packets.

Change the recv_skip_hint so that it only includes the first
frags that are not of PAGE_SIZE.

Signed-off-by: Soheil Hassas Yeganeh <soheil@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp.c