]> git.baikalelectronics.ru Git - kernel.git/commit
net: do_tcp_sendpages flag to avoid SKBTX_SHARED_FRAG
authorJohn Fastabend <john.fastabend@gmail.com>
Sun, 18 Mar 2018 19:57:00 +0000 (12:57 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 19 Mar 2018 20:14:38 +0000 (21:14 +0100)
commit57416f456595a43e6316d7530fdd0a752f72ef10
tree6bcfadb456706b7e326c46f17bff214e56181fcc
parent8e61669fe3fe49a83b1ba0b0e8cf81eff7712de5
net: do_tcp_sendpages flag to avoid SKBTX_SHARED_FRAG

When calling do_tcp_sendpages() from in kernel and we know the data
has no references from user side we can omit SKBTX_SHARED_FRAG flag.
This patch adds an internal flag, NO_SKBTX_SHARED_FRAG that can be used
to omit setting SKBTX_SHARED_FRAG.

The flag is not exposed to userspace because the sendpage call from
the splice logic masks out all bits except MSG_MORE.

Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
include/linux/socket.h
net/ipv4/tcp.c