net: move snowflake callers to netif_napi_add_tx_weight()
authorJakub Kicinski <kuba@kernel.org>
Wed, 4 May 2022 16:37:25 +0000 (09:37 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 5 May 2022 22:54:18 +0000 (15:54 -0700)
Make the drivers with custom tx napi weight call netif_napi_add_tx_weight().

Reviewed-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Link: https://lore.kernel.org/r/20220504163725.550782-2-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/freescale/gianfar.c
drivers/net/ethernet/microchip/lan743x_main.c
drivers/net/virtio_net.c

index f0b652a6504369a20ac58c350cfcefe2bbeb1ea4..3dc9369a33f77d73c4a7755cf4849a27c2b5924b 100644 (file)
@@ -3233,8 +3233,8 @@ static int gfar_probe(struct platform_device *ofdev)
        for (i = 0; i < priv->num_grps; i++) {
                netif_napi_add(dev, &priv->gfargrp[i].napi_rx,
                               gfar_poll_rx_sq, NAPI_POLL_WEIGHT);
-               netif_tx_napi_add(dev, &priv->gfargrp[i].napi_tx,
-                                 gfar_poll_tx_sq, 2);
+               netif_napi_add_tx_weight(dev, &priv->gfargrp[i].napi_tx,
+                                        gfar_poll_tx_sq, 2);
        }
 
        if (priv->device_flags & FSL_GIANFAR_DEV_HAS_CSUM) {
index 9ac0c2b96a15bebf815c46ecd6378a30c7facb60..efbddf24ba31bb23f3bcca36462785e9f68d63e1 100644 (file)
@@ -2044,9 +2044,9 @@ static int lan743x_tx_open(struct lan743x_tx *tx)
        tx->vector_flags = lan743x_intr_get_vector_flags(adapter,
                                                         INT_BIT_DMA_TX_
                                                         (tx->channel_number));
-       netif_tx_napi_add(adapter->netdev,
-                         &tx->napi, lan743x_tx_napi_poll,
-                         tx->ring_size - 1);
+       netif_napi_add_tx_weight(adapter->netdev,
+                                &tx->napi, lan743x_tx_napi_poll,
+                                tx->ring_size - 1);
        napi_enable(&tx->napi);
 
        data = 0;
index cbba9d2e8f322155f1add23d85564c14fecfe5b2..ebb98b796352a8cdfbcb55cc0e24b676533d3af8 100644 (file)
@@ -3315,8 +3315,9 @@ static int virtnet_alloc_queues(struct virtnet_info *vi)
                vi->rq[i].pages = NULL;
                netif_napi_add(vi->dev, &vi->rq[i].napi, virtnet_poll,
                               napi_weight);
-               netif_tx_napi_add(vi->dev, &vi->sq[i].napi, virtnet_poll_tx,
-                                 napi_tx ? napi_weight : 0);
+               netif_napi_add_tx_weight(vi->dev, &vi->sq[i].napi,
+                                        virtnet_poll_tx,
+                                        napi_tx ? napi_weight : 0);
 
                sg_init_table(vi->rq[i].sg, ARRAY_SIZE(vi->rq[i].sg));
                ewma_pkt_len_init(&vi->rq[i].mrg_avg_pkt_len);