Message ID | 20230919074915.103110-3-hengqi@linux.alibaba.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | virtio-net: Fix and update interrupt moderation | expand |
On Tue, Sep 19, 2023 at 3:49 PM Heng Qi <hengqi@linux.alibaba.com> wrote: > > 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 <gavinl@nvidia.com> > Signed-off-by: Heng Qi <hengqi@linux.alibaba.com> Acked-by: Jason Wang <jasowang@redhat.com> Thanks > --- > 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 fd5bc8d59eda..80d35a864790 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; > } > > -- > 2.19.1.6.gb485710b >
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index fd5bc8d59eda..80d35a864790 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; }
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 <gavinl@nvidia.com> Signed-off-by: Heng Qi <hengqi@linux.alibaba.com> --- drivers/net/virtio_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)