Thread (16 messages) 16 messages, 4 authors, 2023-08-14
STALE1046d

[PATCH net-next 2/8] virtio-net: fix mismatch of getting txq tx-frames param

From: Heng Qi <hidden>
Date: 2023-08-11 06:55:23
Subsystem: networking drivers, the rest, virtio net driver · Maintainers: Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds, "Michael S. Tsirkin", Jason Wang

Now virtio-net allows switching napi_tx for each txq. Therefore, we
get the corresponding tx-frames for virtnet_get_per_queue_coalesce().

Note: in virtnet_get_coalesce(), since different txqs may have different
napi_tx values, the value of txq[0] is used as a representative.

Fixes: 394bd87764b6 ("virtio_net: support per queue interrupt coalesce command")
Cc: Gavin Li <redacted>
Signed-off-by: Heng Qi <redacted>
---
 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 3b254f778e7e..b1b4038f06e3 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -3379,7 +3379,7 @@ static int virtnet_get_per_queue_coalesce(struct net_device *dev,
 	} else {
 		ec->rx_max_coalesced_frames = 1;
 
-		if (vi->sq[0].napi.weight)
+		if (vi->sq[queue].napi.weight)
 			ec->tx_max_coalesced_frames = 1;
 	}
 
-- 
2.19.1.6.gb485710b
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help