Thread (9 messages) flat view 9 messages, 3 authors, 1d ago

Re: [PATCH net 2/2] virtio_net: unmap AF_XDP header with tx virtqueue

From: Jason Xing <hidden>
Date: 2026-08-04 11:54:10
Also in: lkml, virtualization

On Tue, Aug 4, 2026 at 5:22 PM Xiong Weimin [off-list ref] wrote:
virtnet_xsk_pool_enable() maps the shared AF_XDP transmit header with
the send virtqueue, and the disable path unmaps it with the same queue.
Use sq->vq on the setup error path as well so the DMA unmap matches the
mapping side.

Signed-off-by: Xiong Weimin <redacted>
Fixes: 21a4e3ce6dc7 ("virtio_net: xsk: bind/unbind xsk for tx")

Reviewed-by: Jason Xing <redacted>

Nice catch! Thanks for your work!
quoted hunk ↗ jump to hunk
---
 drivers/net/virtio_net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 6160aa8ba..a6f90f579 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -5959,7 +5959,7 @@ static int virtnet_xsk_pool_enable(struct net_device *dev,
 err_rq:
        xsk_pool_dma_unmap(pool, 0);
 err_xsk_map:
-       virtqueue_unmap_single_attrs(rq->vq, hdr_dma, vi->hdr_len,
+       virtqueue_unmap_single_attrs(sq->vq, hdr_dma, vi->hdr_len,
                                     DMA_TO_DEVICE, 0);
 err_free_buffs:
        kvfree(rq->xsk_buffs);
--
2.43.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help