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>
Showing
- include/linux/skbuff.h 60 additions, 0 deletionsinclude/linux/skbuff.h
- include/linux/socket.h 1 addition, 0 deletionsinclude/linux/socket.h
- include/net/sock.h 2 additions, 0 deletionsinclude/net/sock.h
- include/uapi/linux/errqueue.h 3 additions, 0 deletionsinclude/uapi/linux/errqueue.h
- net/core/datagram.c 34 additions, 21 deletionsnet/core/datagram.c
- net/core/skbuff.c 133 additions, 0 deletionsnet/core/skbuff.c
- net/core/sock.c 2 additions, 0 deletionsnet/core/sock.c
Loading
Please register or sign in to comment