Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 76851d12 authored by Willem de Bruijn's avatar Willem de Bruijn Committed by David S. Miller
Browse files

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: default avatarWillem de Bruijn <willemb@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 52267790
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -109,4 +109,6 @@

#define SO_PEERGROUPS		59

#define SO_ZEROCOPY		60

#endif /* _UAPI_ASM_SOCKET_H */
+2 −0
Original line number Diff line number Diff line
@@ -102,5 +102,7 @@

#define SO_PEERGROUPS		59

#define SO_ZEROCOPY		60

#endif /* _ASM_SOCKET_H */
+2 −0
Original line number Diff line number Diff line
@@ -111,4 +111,6 @@

#define SO_PEERGROUPS		59

#define SO_ZEROCOPY		60

#endif /* _ASM_IA64_SOCKET_H */
+2 −0
Original line number Diff line number Diff line
@@ -102,4 +102,6 @@

#define SO_PEERGROUPS		59

#define SO_ZEROCOPY		60

#endif /* _ASM_M32R_SOCKET_H */
+2 −0
Original line number Diff line number Diff line
@@ -120,4 +120,6 @@

#define SO_PEERGROUPS		59

#define SO_ZEROCOPY		60

#endif /* _UAPI_ASM_SOCKET_H */
Loading