From: Heng Qi Date: Sun, 8 Oct 2023 06:27:40 +0000 (+0800) Subject: virtio-net: fix mismatch of getting tx-frames X-Git-Tag: v6.6.7~1508 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=84a056f7a2a12fcea0d1eeeda54b60e1adf4568e;p=platform%2Fkernel%2Flinux-starfive.git virtio-net: fix mismatch of getting tx-frames [ Upstream commit 134674c1877be5e35e35802517c67a9ecce21153 ] Since virtio-net allows switching napi_tx for per txq, we have to get the specific txq's result now. Fixes: 394bd87764b6 ("virtio_net: support per queue interrupt coalesce command") Cc: Gavin Li Signed-off-by: Heng Qi Acked-by: Jason Wang Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index d67f742..b218c2b 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -3453,7 +3453,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; }