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.
Showing the changes to include/uapi/linux/errqueue.h (1 of 7 files). Show all
Unified · Split
| @@ -18,10 +18,13 @@ struct sock_extended_err { · 17 unmodified lines | ||
| 18 | 18 | #define SO_EE_ORIGIN_ICMP 2 |
| 19 | 19 | #define SO_EE_ORIGIN_ICMP6 3 |
| 20 | 20 | #define SO_EE_ORIGIN_TXSTATUS 4 |
| 21 | +#define SO_EE_ORIGIN_ZEROCOPY 5 | |
| 21 | 22 | #define SO_EE_ORIGIN_TIMESTAMPING SO_EE_ORIGIN_TXSTATUS |
| 22 | 23 | |
| 23 | 24 | #define SO_EE_OFFENDER(ee) ((struct sockaddr*)((ee)+1)) |
| 24 | 25 | |
| 26 | +#define SO_EE_CODE_ZEROCOPY_COPIED 1 | |
| 27 | + | |
| 25 | 28 | /** |
| 26 | 29 | * struct scm_timestamping - timestamps exposed through cmsg |
| 27 | 30 | * |