]> www.infradead.org Git - users/jedix/linux-maple.git/commit
virtio_net: xsk: rx: support recv small mode
authorXuan Zhuo <xuanzhuo@linux.alibaba.com>
Mon, 8 Jul 2024 11:25:36 +0000 (19:25 +0800)
committerJakub Kicinski <kuba@kernel.org>
Mon, 15 Jul 2024 03:32:39 +0000 (20:32 -0700)
commita4e7ba7027012f009f22a68bcfde670f9298d3a4
tree90a04ae3e756e1959bb7d6798817461b4a660bdb
parente9f3962441c0a4d6f16c656e6c8aa02a3ccdd568
virtio_net: xsk: rx: support recv small mode

In the process:
1. We may need to copy data to create skb for XDP_PASS.
2. We may need to call xsk_buff_free() to release the buffer.
3. The handle for xdp_buff is difference from the buffer.

If we pushed this logic into existing receive handle(merge and small),
we would have to maintain code scattered inside merge and small (and big).
So I think it is a good choice for us to put the xsk code into an
independent function.

Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Link: https://patch.msgid.link/20240708112537.96291-10-xuanzhuo@linux.alibaba.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/virtio_net.c