Commit 8d602e1a authored by Jakub Kicinski's avatar Jakub Kicinski

net: move snowflake callers to netif_napi_add_tx_weight()

Make the drivers with custom tx napi weight call netif_napi_add_tx_weight().
Reviewed-by: default avatarXuan Zhuo <xuanzhuo@linux.alibaba.com>
Link: https://lore.kernel.org/r/20220504163725.550782-2-kuba@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 16d083e2
...@@ -3233,8 +3233,8 @@ static int gfar_probe(struct platform_device *ofdev) ...@@ -3233,8 +3233,8 @@ static int gfar_probe(struct platform_device *ofdev)
for (i = 0; i < priv->num_grps; i++) { for (i = 0; i < priv->num_grps; i++) {
netif_napi_add(dev, &priv->gfargrp[i].napi_rx, netif_napi_add(dev, &priv->gfargrp[i].napi_rx,
gfar_poll_rx_sq, NAPI_POLL_WEIGHT); gfar_poll_rx_sq, NAPI_POLL_WEIGHT);
netif_tx_napi_add(dev, &priv->gfargrp[i].napi_tx, netif_napi_add_tx_weight(dev, &priv->gfargrp[i].napi_tx,
gfar_poll_tx_sq, 2); gfar_poll_tx_sq, 2);
} }
if (priv->device_flags & FSL_GIANFAR_DEV_HAS_CSUM) { if (priv->device_flags & FSL_GIANFAR_DEV_HAS_CSUM) {
......
...@@ -2044,9 +2044,9 @@ static int lan743x_tx_open(struct lan743x_tx *tx) ...@@ -2044,9 +2044,9 @@ static int lan743x_tx_open(struct lan743x_tx *tx)
tx->vector_flags = lan743x_intr_get_vector_flags(adapter, tx->vector_flags = lan743x_intr_get_vector_flags(adapter,
INT_BIT_DMA_TX_ INT_BIT_DMA_TX_
(tx->channel_number)); (tx->channel_number));
netif_tx_napi_add(adapter->netdev, netif_napi_add_tx_weight(adapter->netdev,
&tx->napi, lan743x_tx_napi_poll, &tx->napi, lan743x_tx_napi_poll,
tx->ring_size - 1); tx->ring_size - 1);
napi_enable(&tx->napi); napi_enable(&tx->napi);
data = 0; data = 0;
......
...@@ -3315,8 +3315,9 @@ static int virtnet_alloc_queues(struct virtnet_info *vi) ...@@ -3315,8 +3315,9 @@ static int virtnet_alloc_queues(struct virtnet_info *vi)
vi->rq[i].pages = NULL; vi->rq[i].pages = NULL;
netif_napi_add(vi->dev, &vi->rq[i].napi, virtnet_poll, netif_napi_add(vi->dev, &vi->rq[i].napi, virtnet_poll,
napi_weight); napi_weight);
netif_tx_napi_add(vi->dev, &vi->sq[i].napi, virtnet_poll_tx, netif_napi_add_tx_weight(vi->dev, &vi->sq[i].napi,
napi_tx ? napi_weight : 0); virtnet_poll_tx,
napi_tx ? napi_weight : 0);
sg_init_table(vi->rq[i].sg, ARRAY_SIZE(vi->rq[i].sg)); sg_init_table(vi->rq[i].sg, ARRAY_SIZE(vi->rq[i].sg));
ewma_pkt_len_init(&vi->rq[i].mrg_avg_pkt_len); ewma_pkt_len_init(&vi->rq[i].mrg_avg_pkt_len);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment