net: unify alloclen calculation for paged requests
authorPavel Begunkov <asml.silence@gmail.com>
Thu, 25 Aug 2022 12:06:31 +0000 (13:06 +0100)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 30 Aug 2022 10:02:55 +0000 (12:02 +0200)
commit47cf88993c910840d565631ad906abdca9168231
tree3680084fd488741aa2343a06eb1949adf42df060
parentd287532edfc2b6cec45e5eb00332a4c6fddf07a3
net: unify alloclen calculation for paged requests

Consolidate alloclen and pagedlen calculation for zerocopy and normal
paged requests. The current non-zerocopy paged version can a bit
overallocate and unnecessary copy a small chunk of data into the linear
part.

Cc: Willem de Bruijn <willemb@google.com>
Link: https://lore.kernel.org/netdev/CA+FuTSf0+cJ9_N_xrHmCGX_KoVCWcE0YQBdtgEkzGvcLMSv7Qw@mail.gmail.com/
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/b0e4edb7b91f171c7119891d3c61040b8c56596e.1661428921.git.asml.silence@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/ipv4/ip_output.c
net/ipv6/ip6_output.c