diff options
author | Jakub Kicinski <kuba@kernel.org> | 2022-05-06 10:07:50 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-05-08 11:33:57 +0100 |
commit | d484735dcf923e7872d5e353aacfaa4f42dea1d4 (patch) | |
tree | d476a4fc84e54f802c2a909868dbfa77bc1d9970 /drivers/net | |
parent | 8ded532cd1cbe48461821c605dbad9447555755a (diff) | |
download | lwn-d484735dcf923e7872d5e353aacfaa4f42dea1d4.tar.gz lwn-d484735dcf923e7872d5e353aacfaa4f42dea1d4.zip |
net: virtio: switch to netif_napi_add_weight()
virtio netdev driver uses a custom napi weight, switch to the new
API for setting custom weight.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/virtio_net.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index ebb98b796352..db05b5e930be 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -3313,8 +3313,8 @@ static int virtnet_alloc_queues(struct virtnet_info *vi) INIT_DELAYED_WORK(&vi->refill, refill_work); for (i = 0; i < vi->max_queue_pairs; i++) { vi->rq[i].pages = NULL; - netif_napi_add(vi->dev, &vi->rq[i].napi, virtnet_poll, - napi_weight); + netif_napi_add_weight(vi->dev, &vi->rq[i].napi, virtnet_poll, + napi_weight); netif_napi_add_tx_weight(vi->dev, &vi->sq[i].napi, virtnet_poll_tx, napi_tx ? napi_weight : 0); |