History

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.

Willem de Bruijn committed 9 years ago

Commit 52267791 parent 3ece7827 files · +235 −21Browse files

Showing the changes to include/uapi/linux/errqueue.h (1 of 7 files). Show all

Unified · Split

include/uapi/linux/errqueue.h+3−0
@@ -18,10 +18,13 @@ struct sock_extended_err { · 17 unmodified lines
1818 #define SO_EE_ORIGIN_ICMP 2
1919 #define SO_EE_ORIGIN_ICMP6 3
2020 #define SO_EE_ORIGIN_TXSTATUS 4
21+#define SO_EE_ORIGIN_ZEROCOPY 5
2122 #define SO_EE_ORIGIN_TIMESTAMPING SO_EE_ORIGIN_TXSTATUS
2223
2324 #define SO_EE_OFFENDER(ee) ((struct sockaddr*)((ee)+1))
2425
26+#define SO_EE_CODE_ZEROCOPY_COPIED 1
27+
2528 /**
2629 * struct scm_timestamping - timestamps exposed through cmsg
2730 *