diff options
| author | Paolo Abeni <[email protected]> | 2023-09-21 12:34:02 +0200 |
|---|---|---|
| committer | Paolo Abeni <[email protected]> | 2023-09-21 12:34:03 +0200 |
| commit | 71b263e79370348349553ecdf46f4a69eb436dc7 (patch) | |
| tree | 51f6d95d49a03ac93ccb42c74f85ae50e78fe662 /include/linux | |
| parent | b3af9c0e89ca721dfed95401c88c8c6e8067b558 (diff) | |
| parent | 581512a6dc939ef122e49336626ae159f3b8a345 (diff) | |
Merge branch 'vsock-virtio-vhost-msg_zerocopy-preparations'
Arseniy Krasnov says:
====================
vsock/virtio/vhost: MSG_ZEROCOPY preparations
this patchset is first of three parts of another big patchset for
MSG_ZEROCOPY flag support:
https://lore.kernel.org/netdev/[email protected]/
During review of this series, Stefano Garzarella <[email protected]>
suggested to split it for three parts to simplify review and merging:
1) virtio and vhost updates (for fragged skbs) <--- this patchset
2) AF_VSOCK updates (allows to enable MSG_ZEROCOPY mode and read
tx completions) and update for Documentation/.
3) Updates for tests and utils.
This series enables handling of fragged skbs in virtio and vhost parts.
Newly logic won't be triggered, because SO_ZEROCOPY options is still
impossible to enable at this moment (next bunch of patches from big
set above will enable it).
====================
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Paolo Abeni <[email protected]>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/virtio_vsock.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/virtio_vsock.h b/include/linux/virtio_vsock.h index c58453699ee9..ebb3ce63d64d 100644 --- a/include/linux/virtio_vsock.h +++ b/include/linux/virtio_vsock.h @@ -12,6 +12,7 @@ struct virtio_vsock_skb_cb { bool reply; bool tap_delivered; + u32 offset; }; #define VIRTIO_VSOCK_SKB_CB(skb) ((struct virtio_vsock_skb_cb *)((skb)->cb)) @@ -159,6 +160,15 @@ struct virtio_transport { /* Takes ownership of the packet */ int (*send_pkt)(struct sk_buff *skb); + + /* Used in MSG_ZEROCOPY mode. Checks, that provided data + * (number of buffers) could be transmitted with zerocopy + * mode. If this callback is not implemented for the current + * transport - this means that this transport doesn't need + * extra checks and can perform zerocopy transmission by + * default. + */ + bool (*can_msgzerocopy)(int bufs_num); }; ssize_t |