diff options
author | Koichiro Den <koichiro.den@canonical.com> | 2024-12-06 10:10:47 +0900 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2024-12-10 11:22:21 +0100 |
commit | 76a771ec4c9adfd75fe53c8505cf656a075d7101 (patch) | |
tree | 461c9a3c30a46078c6af18dc89158a0c68ae30d9 /drivers/net | |
parent | 8d2da07c813ad333c20eb803e15f8c4541f25350 (diff) | |
download | lwn-76a771ec4c9adfd75fe53c8505cf656a075d7101.tar.gz lwn-76a771ec4c9adfd75fe53c8505cf656a075d7101.zip |
virtio_net: ensure netdev_tx_reset_queue is called on bind xsk for tx
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: 21a4e3ce6dc7 ("virtio_net: xsk: bind/unbind xsk for tx")
Signed-off-by: Koichiro Den <koichiro.den@canonical.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/virtio_net.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 5cf4b2b20431..7646ddd9bef7 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -5740,7 +5740,8 @@ static int virtnet_sq_bind_xsk_pool(struct virtnet_info *vi, virtnet_tx_pause(vi, sq); - err = virtqueue_reset(sq->vq, virtnet_sq_free_unused_buf, NULL); + err = virtqueue_reset(sq->vq, virtnet_sq_free_unused_buf, + virtnet_sq_free_unused_buf_done); if (err) { netdev_err(vi->dev, "reset tx fail: tx queue index: %d err: %d\n", qindex, err); pool = NULL; |