Re: [PATCH net-next v8 2/4] vsock/virtio: support to send non-linear skb

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 11, 2023 at 11:22:32PM +0300, Arseniy Krasnov wrote:
For non-linear skb use its pages from fragment array as buffers in
virtio tx queue. These pages are already pinned by 'get_user_pages()'
during such skb creation.

Signed-off-by: Arseniy Krasnov <avkrasnov@xxxxxxxxxxxxxxxxx>
---
Changelog:
v2 -> v3:
 * Comment about 'page_to_virt()' is updated. I don't remove R-b,
   as this change is quiet small I guess.
v6 -> v7:
 * Move arrays '*sgs' and 'bufs' to 'virtio_vsock' instead of being
   local variables. This allows to save stack space in cases of too
   big MAX_SKB_FRAGS.
 * Add 'WARN_ON_ONCE()' for handling nonlinear skbs - it checks that
   linear part of such skb contains only header.
 * R-b tag removed due to updates above.
v7 -> v8:
 * Add comment in 'struct virtio_vsock' for both 'struct scatterlist'
   fields.
 * Rename '*sgs' and 'bufs' to '*out_sgs' and 'out_bufs'.
 * Initialize '*out_sgs' in 'virtio_vsock_probe()' by always pointing
   to the corresponding element of 'out_bufs'.

LGTM, thanks for addressing that comments!


net/vmw_vsock/virtio_transport.c | 60 ++++++++++++++++++++++++++++----
1 file changed, 53 insertions(+), 7 deletions(-)

Reviewed-by: Stefano Garzarella <sgarzare@xxxxxxxxxx>

_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/virtualization



[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux