mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-08 15:04:45 +00:00
net: switch to netif_napi_add_tx()
Switch net callers to the new API not requiring the NAPI_POLL_WEIGHT argument. Acked-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-by: Alex Elder <elder@linaro.org> Acked-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Acked-by: Alexandra Winter <wintera@linux.ibm.com> Link: https://lore.kernel.org/r/20220504163725.550782-1-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
fd49f8e61c
commit
16d083e28f
@ -722,7 +722,7 @@ static int bcm4908_enet_probe(struct platform_device *pdev)
|
||||
netdev->min_mtu = ETH_ZLEN;
|
||||
netdev->mtu = ETH_DATA_LEN;
|
||||
netdev->max_mtu = ENET_MTU_MAX;
|
||||
netif_tx_napi_add(netdev, &enet->tx_ring.napi, bcm4908_enet_poll_tx, NAPI_POLL_WEIGHT);
|
||||
netif_napi_add_tx(netdev, &enet->tx_ring.napi, bcm4908_enet_poll_tx);
|
||||
netif_napi_add(netdev, &enet->rx_ring.napi, bcm4908_enet_poll_rx, NAPI_POLL_WEIGHT);
|
||||
|
||||
err = register_netdev(netdev);
|
||||
|
@ -1517,7 +1517,7 @@ static int bcm_sysport_init_tx_ring(struct bcm_sysport_priv *priv,
|
||||
/* Initialize SW view of the ring */
|
||||
spin_lock_init(&ring->lock);
|
||||
ring->priv = priv;
|
||||
netif_tx_napi_add(priv->netdev, &ring->napi, bcm_sysport_tx_poll, 64);
|
||||
netif_napi_add_tx(priv->netdev, &ring->napi, bcm_sysport_tx_poll);
|
||||
ring->index = index;
|
||||
ring->size = size;
|
||||
ring->clean_index = 0;
|
||||
|
@ -2671,8 +2671,7 @@ static void bcmgenet_init_tx_ring(struct bcmgenet_priv *priv,
|
||||
DMA_END_ADDR);
|
||||
|
||||
/* Initialize Tx NAPI */
|
||||
netif_tx_napi_add(priv->dev, &ring->napi, bcmgenet_tx_poll,
|
||||
NAPI_POLL_WEIGHT);
|
||||
netif_napi_add_tx(priv->dev, &ring->napi, bcmgenet_tx_poll);
|
||||
}
|
||||
|
||||
/* Initialize a RDMA ring */
|
||||
|
@ -330,8 +330,7 @@ static int fun_alloc_queue_irqs(struct net_device *dev, unsigned int ntx,
|
||||
return PTR_ERR(irq);
|
||||
|
||||
fp->num_tx_irqs++;
|
||||
netif_tx_napi_add(dev, &irq->napi, fun_txq_napi_poll,
|
||||
NAPI_POLL_WEIGHT);
|
||||
netif_napi_add_tx(dev, &irq->napi, fun_txq_napi_poll);
|
||||
}
|
||||
|
||||
for (i = fp->num_rx_irqs; i < nrx; i++) {
|
||||
|
@ -615,8 +615,8 @@ static int xrx200_probe(struct platform_device *pdev)
|
||||
/* setup NAPI */
|
||||
netif_napi_add(net_dev, &priv->chan_rx.napi, xrx200_poll_rx,
|
||||
NAPI_POLL_WEIGHT);
|
||||
netif_tx_napi_add(net_dev, &priv->chan_tx.napi, xrx200_tx_housekeeping,
|
||||
NAPI_POLL_WEIGHT);
|
||||
netif_napi_add_tx(net_dev, &priv->chan_tx.napi,
|
||||
xrx200_tx_housekeeping);
|
||||
|
||||
platform_set_drvdata(pdev, priv);
|
||||
|
||||
|
@ -147,8 +147,7 @@ int mlx4_en_activate_cq(struct mlx4_en_priv *priv, struct mlx4_en_cq *cq,
|
||||
switch (cq->type) {
|
||||
case TX:
|
||||
cq->mcq.comp = mlx4_en_tx_irq;
|
||||
netif_tx_napi_add(cq->dev, &cq->napi, mlx4_en_poll_tx_cq,
|
||||
NAPI_POLL_WEIGHT);
|
||||
netif_napi_add_tx(cq->dev, &cq->napi, mlx4_en_poll_tx_cq);
|
||||
napi_enable(&cq->napi);
|
||||
break;
|
||||
case RX:
|
||||
|
@ -1371,7 +1371,7 @@ static int mana_create_txq(struct mana_port_context *apc,
|
||||
|
||||
gc->cq_table[cq->gdma_id] = cq->gdma_cq;
|
||||
|
||||
netif_tx_napi_add(net, &cq->napi, mana_poll, NAPI_POLL_WEIGHT);
|
||||
netif_napi_add_tx(net, &cq->napi, mana_poll);
|
||||
napi_enable(&cq->napi);
|
||||
|
||||
mana_gd_ring_cq(cq->gdma_cq, SET_ARM_BIT);
|
||||
|
@ -1608,8 +1608,8 @@ int qlcnic_82xx_napi_add(struct qlcnic_adapter *adapter,
|
||||
if (qlcnic_check_multi_tx(adapter) && !adapter->ahw->diag_test) {
|
||||
for (ring = 0; ring < adapter->drv_tx_rings; ring++) {
|
||||
tx_ring = &adapter->tx_ring[ring];
|
||||
netif_tx_napi_add(netdev, &tx_ring->napi, qlcnic_tx_poll,
|
||||
NAPI_POLL_WEIGHT);
|
||||
netif_napi_add_tx(netdev, &tx_ring->napi,
|
||||
qlcnic_tx_poll);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2138,9 +2138,8 @@ int qlcnic_83xx_napi_add(struct qlcnic_adapter *adapter,
|
||||
!(adapter->flags & QLCNIC_TX_INTR_SHARED)) {
|
||||
for (ring = 0; ring < adapter->drv_tx_rings; ring++) {
|
||||
tx_ring = &adapter->tx_ring[ring];
|
||||
netif_tx_napi_add(netdev, &tx_ring->napi,
|
||||
qlcnic_83xx_msix_tx_poll,
|
||||
NAPI_POLL_WEIGHT);
|
||||
netif_napi_add_tx(netdev, &tx_ring->napi,
|
||||
qlcnic_83xx_msix_tx_poll);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2573,8 +2573,7 @@ static int rocker_probe_port(struct rocker *rocker, unsigned int port_number)
|
||||
rocker_port_dev_addr_init(rocker_port);
|
||||
dev->netdev_ops = &rocker_port_netdev_ops;
|
||||
dev->ethtool_ops = &rocker_port_ethtool_ops;
|
||||
netif_tx_napi_add(dev, &rocker_port->napi_tx, rocker_port_poll_tx,
|
||||
NAPI_POLL_WEIGHT);
|
||||
netif_napi_add_tx(dev, &rocker_port->napi_tx, rocker_port_poll_tx);
|
||||
netif_napi_add(dev, &rocker_port->napi_rx, rocker_port_poll_rx,
|
||||
NAPI_POLL_WEIGHT);
|
||||
rocker_carrier_init(rocker_port);
|
||||
|
@ -1689,8 +1689,7 @@ static int ave_probe(struct platform_device *pdev)
|
||||
/* Register as a NAPI supported driver */
|
||||
netif_napi_add(ndev, &priv->napi_rx, ave_napi_poll_rx,
|
||||
NAPI_POLL_WEIGHT);
|
||||
netif_tx_napi_add(ndev, &priv->napi_tx, ave_napi_poll_tx,
|
||||
NAPI_POLL_WEIGHT);
|
||||
netif_napi_add_tx(ndev, &priv->napi_tx, ave_napi_poll_tx);
|
||||
|
||||
platform_set_drvdata(pdev, ndev);
|
||||
|
||||
|
@ -6759,9 +6759,8 @@ static void stmmac_napi_add(struct net_device *dev)
|
||||
NAPI_POLL_WEIGHT);
|
||||
}
|
||||
if (queue < priv->plat->tx_queues_to_use) {
|
||||
netif_tx_napi_add(dev, &ch->tx_napi,
|
||||
stmmac_napi_poll_tx,
|
||||
NAPI_POLL_WEIGHT);
|
||||
netif_napi_add_tx(dev, &ch->tx_napi,
|
||||
stmmac_napi_poll_tx);
|
||||
}
|
||||
if (queue < priv->plat->rx_queues_to_use &&
|
||||
queue < priv->plat->tx_queues_to_use) {
|
||||
|
@ -2032,8 +2032,8 @@ static int am65_cpsw_nuss_ndev_add_tx_napi(struct am65_cpsw_common *common)
|
||||
for (i = 0; i < common->tx_ch_num; i++) {
|
||||
struct am65_cpsw_tx_chn *tx_chn = &common->tx_chns[i];
|
||||
|
||||
netif_tx_napi_add(common->dma_ndev, &tx_chn->napi_tx,
|
||||
am65_cpsw_nuss_tx_poll, NAPI_POLL_WEIGHT);
|
||||
netif_napi_add_tx(common->dma_ndev, &tx_chn->napi_tx,
|
||||
am65_cpsw_nuss_tx_poll);
|
||||
|
||||
ret = devm_request_irq(dev, tx_chn->irq,
|
||||
am65_cpsw_nuss_tx_irq,
|
||||
|
@ -1640,9 +1640,8 @@ static int cpsw_probe(struct platform_device *pdev)
|
||||
netif_napi_add(ndev, &cpsw->napi_rx,
|
||||
cpsw->quirk_irq ? cpsw_rx_poll : cpsw_rx_mq_poll,
|
||||
NAPI_POLL_WEIGHT);
|
||||
netif_tx_napi_add(ndev, &cpsw->napi_tx,
|
||||
cpsw->quirk_irq ? cpsw_tx_poll : cpsw_tx_mq_poll,
|
||||
NAPI_POLL_WEIGHT);
|
||||
netif_napi_add_tx(ndev, &cpsw->napi_tx,
|
||||
cpsw->quirk_irq ? cpsw_tx_poll : cpsw_tx_mq_poll);
|
||||
|
||||
/* register the network device */
|
||||
SET_NETDEV_DEV(ndev, dev);
|
||||
|
@ -1420,10 +1420,9 @@ static int cpsw_create_ports(struct cpsw_common *cpsw)
|
||||
cpsw->quirk_irq ?
|
||||
cpsw_rx_poll : cpsw_rx_mq_poll,
|
||||
NAPI_POLL_WEIGHT);
|
||||
netif_tx_napi_add(ndev, &cpsw->napi_tx,
|
||||
netif_napi_add_tx(ndev, &cpsw->napi_tx,
|
||||
cpsw->quirk_irq ?
|
||||
cpsw_tx_poll : cpsw_tx_mq_poll,
|
||||
NAPI_POLL_WEIGHT);
|
||||
cpsw_tx_poll : cpsw_tx_mq_poll);
|
||||
}
|
||||
|
||||
napi_ndev = ndev;
|
||||
|
@ -2096,7 +2096,7 @@ static int netcp_create_interface(struct netcp_device *netcp_device,
|
||||
|
||||
/* NAPI register */
|
||||
netif_napi_add(ndev, &netcp->rx_napi, netcp_rx_poll, NAPI_POLL_WEIGHT);
|
||||
netif_tx_napi_add(ndev, &netcp->tx_napi, netcp_tx_poll, NAPI_POLL_WEIGHT);
|
||||
netif_napi_add_tx(ndev, &netcp->tx_napi, netcp_tx_poll);
|
||||
|
||||
/* Register the network device */
|
||||
ndev->dev_id = 0;
|
||||
|
@ -1614,8 +1614,8 @@ static int gsi_channel_setup_one(struct gsi *gsi, u32 channel_id)
|
||||
gsi_channel_program(channel, true);
|
||||
|
||||
if (channel->toward_ipa)
|
||||
netif_tx_napi_add(&gsi->dummy_dev, &channel->napi,
|
||||
gsi_channel_poll, NAPI_POLL_WEIGHT);
|
||||
netif_napi_add_tx(&gsi->dummy_dev, &channel->napi,
|
||||
gsi_channel_poll);
|
||||
else
|
||||
netif_napi_add(&gsi->dummy_dev, &channel->napi,
|
||||
gsi_channel_poll, NAPI_POLL_WEIGHT);
|
||||
|
@ -268,8 +268,7 @@ static void tun_napi_init(struct tun_struct *tun, struct tun_file *tfile,
|
||||
tfile->napi_enabled = napi_en;
|
||||
tfile->napi_frags_enabled = napi_en && napi_frags;
|
||||
if (napi_en) {
|
||||
netif_tx_napi_add(tun->dev, &tfile->napi, tun_napi_poll,
|
||||
NAPI_POLL_WEIGHT);
|
||||
netif_napi_add_tx(tun->dev, &tfile->napi, tun_napi_poll);
|
||||
napi_enable(&tfile->napi);
|
||||
}
|
||||
}
|
||||
|
@ -7099,8 +7099,7 @@ int qeth_open(struct net_device *dev)
|
||||
|
||||
local_bh_disable();
|
||||
qeth_for_each_output_queue(card, queue, i) {
|
||||
netif_tx_napi_add(dev, &queue->napi, qeth_tx_poll,
|
||||
NAPI_POLL_WEIGHT);
|
||||
netif_napi_add_tx(dev, &queue->napi, qeth_tx_poll);
|
||||
napi_enable(&queue->napi);
|
||||
napi_schedule(&queue->napi);
|
||||
}
|
||||
|
@ -3786,8 +3786,8 @@ void __init mptcp_proto_init(void)
|
||||
for_each_possible_cpu(cpu) {
|
||||
delegated = per_cpu_ptr(&mptcp_delegated_actions, cpu);
|
||||
INIT_LIST_HEAD(&delegated->head);
|
||||
netif_tx_napi_add(&mptcp_napi_dev, &delegated->napi, mptcp_napi_poll,
|
||||
NAPI_POLL_WEIGHT);
|
||||
netif_napi_add_tx(&mptcp_napi_dev, &delegated->napi,
|
||||
mptcp_napi_poll);
|
||||
napi_enable(&delegated->napi);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user