]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: avoid partial copy for zc
authorPavel Begunkov <asml.silence@gmail.com>
Tue, 12 Jul 2022 20:52:26 +0000 (21:52 +0100)
committerJakub Kicinski <kuba@kernel.org>
Tue, 19 Jul 2022 02:58:29 +0000 (19:58 -0700)
commit8e14a1a49d14d44bc0f6526a49c04bed7e789436
tree5eda2b3a67d5dee6e800103090fcebdd3975bd67
parentb9deb5426e9ffc37a209131cce0781adbdd410bb
ipv6: avoid partial copy for zc

Even when zerocopy transmission is requested and possible,
__ip_append_data() will still copy a small chunk of data just because it
allocated some extra linear space (e.g. 128 bytes). It wastes CPU cycles
on copy and iter manipulations and also misalignes potentially aligned
data. Avoid such copies. And as a bonus we can allocate smaller skb.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv6/ip6_output.c