Skip to content

Commit c43b0a1

Browse files
lkpdngregkh
authored andcommitted
virtio_net: ensure netdev_tx_reset_queue is called on bind xsk for tx
[ Upstream commit 76a771e ] virtnet_sq_bind_xsk_pool() flushes tx skbs and then resets tx queue, so DQL counters need to be reset when flushing has actually occurred, Add virtnet_sq_free_unused_buf_done() as a callback for virtqueue_resize() to handle this. Fixes: 21a4e3c ("virtio_net: xsk: bind/unbind xsk for tx") Signed-off-by: Koichiro Den <[email protected]> Acked-by: Jason Wang <[email protected]> Reviewed-by: Xuan Zhuo <[email protected]> Signed-off-by: Paolo Abeni <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 343a775 commit c43b0a1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/net/virtio_net.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5576,7 +5576,8 @@ static int virtnet_sq_bind_xsk_pool(struct virtnet_info *vi,
55765576

55775577
virtnet_tx_pause(vi, sq);
55785578

5579-
err = virtqueue_reset(sq->vq, virtnet_sq_free_unused_buf, NULL);
5579+
err = virtqueue_reset(sq->vq, virtnet_sq_free_unused_buf,
5580+
virtnet_sq_free_unused_buf_done);
55805581
if (err) {
55815582
netdev_err(vi->dev, "reset tx fail: tx queue index: %d err: %d\n", qindex, err);
55825583
pool = NULL;

0 commit comments

Comments
 (0)