[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241203073025.67065-4-koichiro.den@canonical.com>
Date: Tue, 3 Dec 2024 16:30:23 +0900
From: Koichiro Den <koichiro.den@...onical.com>
To: virtualization@...ts.linux.dev
Cc: mst@...hat.com,
jasowang@...hat.com,
xuanzhuo@...ux.alibaba.com,
eperezma@...hat.com,
andrew+netdev@...n.ch,
davem@...emloft.net,
edumazet@...gle.com,
kuba@...nel.org,
pabeni@...hat.com,
jiri@...nulli.us,
netdev@...r.kernel.org,
linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Subject: [PATCH net-next v2 3/5] virtio_net: add missing netdev_tx_reset_queue() to virtnet_tx_resize()
virtnet_tx_resize() flushes remaining tx skbs, so DQL counters need to
be reset.
Fixes: c8bd1f7f3e61 ("virtio_net: add support for Byte Queue Limits")
Cc: <stable@...r.kernel.org> # v6.11+
Signed-off-by: Koichiro Den <koichiro.den@...onical.com>
---
drivers/net/virtio_net.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index df9bfe31aa6d..0103d7990e44 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -3399,6 +3399,8 @@ static int virtnet_tx_resize(struct virtnet_info *vi, struct send_queue *sq,
err = virtqueue_resize(sq->vq, ring_num, virtnet_sq_free_unused_buf, &flushed);
if (err)
netdev_err(vi->dev, "resize tx fail: tx queue index: %d err: %d\n", qindex, err);
+ if (flushed)
+ netdev_tx_reset_queue(netdev_get_tx_queue(vi->dev, qindex));
virtnet_tx_resume(vi, sq);
--
2.43.0
Powered by blists - more mailing lists