diff options
author | Willem de Bruijn <willemb@google.com> | 2017-08-03 22:29:40 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-08-04 06:37:29 +0200 |
commit | 76851d1212c11365362525e1e2c0a18c97478e6b (patch) | |
tree | a9f9c1795f51c31d46e8282674e5d45f46ce1cbe /include | |
parent | sock: add MSG_ZEROCOPY (diff) | |
download | linux-76851d1212c11365362525e1e2c0a18c97478e6b.tar.xz linux-76851d1212c11365362525e1e2c0a18c97478e6b.zip |
sock: add SOCK_ZEROCOPY sockopt
The send call ignores unknown flags. Legacy applications may already
unwittingly pass MSG_ZEROCOPY. Continue to ignore this flag unless a
socket opts in to zerocopy.
Introduce socket option SO_ZEROCOPY to enable MSG_ZEROCOPY processing.
Processes can also query this socket option to detect kernel support
for the feature. Older kernels will return ENOPROTOOPT.
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/uapi/asm-generic/socket.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/uapi/asm-generic/socket.h b/include/uapi/asm-generic/socket.h index 9861be8da65e..e47c9e436221 100644 --- a/include/uapi/asm-generic/socket.h +++ b/include/uapi/asm-generic/socket.h @@ -104,4 +104,6 @@ #define SO_PEERGROUPS 59 +#define SO_ZEROCOPY 60 + #endif /* __ASM_GENERIC_SOCKET_H */ |