diff options
author | Willem de Bruijn <willemb@google.com> | 2017-08-03 23:29:39 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-08-04 07:37:29 +0300 |
commit | 52267790ef52d7513879238ca9fac22c1733e0e3 (patch) | |
tree | 3df2cd31743717fbf4335b950cc52328f2f44f14 /include/uapi/linux/errqueue.h | |
parent | 3ece782693c4b64d588dd217868558ab9a19bfe7 (diff) | |
download | linux-52267790ef52d7513879238ca9fac22c1733e0e3.tar.xz |
sock: add MSG_ZEROCOPY
The kernel supports zerocopy sendmsg in virtio and tap. Expand the
infrastructure to support other socket types. Introduce a completion
notification channel over the socket error queue. Notifications are
returned with ee_origin SO_EE_ORIGIN_ZEROCOPY. ee_errno is 0 to avoid
blocking the send/recv path on receiving notifications.
Add reference counting, to support the skb split, merge, resize and
clone operations possible with SOCK_STREAM and other socket types.
The patch does not yet modify any datapaths.
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux/errqueue.h')
-rw-r--r-- | include/uapi/linux/errqueue.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/uapi/linux/errqueue.h b/include/uapi/linux/errqueue.h index 07bdce1f444a..78fdf52d6b2f 100644 --- a/include/uapi/linux/errqueue.h +++ b/include/uapi/linux/errqueue.h @@ -18,10 +18,13 @@ struct sock_extended_err { #define SO_EE_ORIGIN_ICMP 2 #define SO_EE_ORIGIN_ICMP6 3 #define SO_EE_ORIGIN_TXSTATUS 4 +#define SO_EE_ORIGIN_ZEROCOPY 5 #define SO_EE_ORIGIN_TIMESTAMPING SO_EE_ORIGIN_TXSTATUS #define SO_EE_OFFENDER(ee) ((struct sockaddr*)((ee)+1)) +#define SO_EE_CODE_ZEROCOPY_COPIED 1 + /** * struct scm_timestamping - timestamps exposed through cmsg * |