Skip to content

Commit cb5ef26

Browse files
lkpdnjfvogel
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]> (cherry picked from commit c43b0a185fa6d5a0e868a48085c6fe89a757a4cc) Signed-off-by: Jack Vogel <[email protected]>
1 parent 950c7e6 commit cb5ef26

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
@@ -5581,7 +5581,8 @@ static int virtnet_sq_bind_xsk_pool(struct virtnet_info *vi,
55815581

55825582
virtnet_tx_pause(vi, sq);
55835583

5584-
err = virtqueue_reset(sq->vq, virtnet_sq_free_unused_buf, NULL);
5584+
err = virtqueue_reset(sq->vq, virtnet_sq_free_unused_buf,
5585+
virtnet_sq_free_unused_buf_done);
55855586
if (err) {
55865587
netdev_err(vi->dev, "reset tx fail: tx queue index: %d err: %d\n", qindex, err);
55875588
pool = NULL;

0 commit comments

Comments
 (0)