Skip to content

Commit 9f88af2

Browse files
committed
Merge branch 'switch-drivers-to-netif_napi_add_weight'
Jakub Kicinski says: ==================== net: switch drivers to netif_napi_add_weight() The minority of drivers pass a custom weight to netif_napi_add(). Switch those away to the new netif_napi_add_weight(). All drivers (which can go thru net-next) calling netif_napi_add() will now be calling it with NAPI_POLL_WEIGHT or 64. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 8fc0b69 + 6f83cb8 commit 9f88af2

File tree

42 files changed

+71
-59
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+71
-59
lines changed

arch/um/drivers/vector_kern.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1255,7 +1255,8 @@ static int vector_net_open(struct net_device *dev)
12551255
goto out_close;
12561256
}
12571257

1258-
netif_napi_add(vp->dev, &vp->napi, vector_poll, get_depth(vp->parsed));
1258+
netif_napi_add_weight(vp->dev, &vp->napi, vector_poll,
1259+
get_depth(vp->parsed));
12591260
napi_enable(&vp->napi);
12601261

12611262
/* READ IRQ */

drivers/net/caif/caif_virtio.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,8 @@ static int cfv_probe(struct virtio_device *vdev)
714714
/* Initialize NAPI poll context data */
715715
vringh_kiov_init(&cfv->ctx.riov, NULL, 0);
716716
cfv->ctx.head = USHRT_MAX;
717-
netif_napi_add(netdev, &cfv->napi, cfv_rx_poll, CFV_DEFAULT_QUOTA);
717+
netif_napi_add_weight(netdev, &cfv->napi, cfv_rx_poll,
718+
CFV_DEFAULT_QUOTA);
718719

719720
tasklet_setup(&cfv->tx_release_tasklet, cfv_tx_release_tasklet);
720721

drivers/net/ethernet/3com/typhoon.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2464,7 +2464,7 @@ typhoon_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
24642464

24652465
/* The chip-specific entries in the device structure. */
24662466
dev->netdev_ops = &typhoon_netdev_ops;
2467-
netif_napi_add(dev, &tp->napi, typhoon_poll, 16);
2467+
netif_napi_add_weight(dev, &tp->napi, typhoon_poll, 16);
24682468
dev->watchdog_timeo = TX_TIMEOUT;
24692469

24702470
dev->ethtool_ops = &typhoon_ethtool_ops;

drivers/net/ethernet/adaptec/starfire.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ static int starfire_init_one(struct pci_dev *pdev,
772772
dev->watchdog_timeo = TX_TIMEOUT;
773773
dev->ethtool_ops = &ethtool_ops;
774774

775-
netif_napi_add(dev, &np->napi, netdev_poll, max_interrupt_work);
775+
netif_napi_add_weight(dev, &np->napi, netdev_poll, max_interrupt_work);
776776

777777
if (mtu)
778778
dev->mtu = mtu;

drivers/net/ethernet/amd/amd8111e.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1828,7 +1828,7 @@ static int amd8111e_probe_one(struct pci_dev *pdev,
18281828
dev->watchdog_timeo = AMD8111E_TX_TIMEOUT;
18291829
dev->min_mtu = AMD8111E_MIN_MTU;
18301830
dev->max_mtu = AMD8111E_MAX_MTU;
1831-
netif_napi_add(dev, &lp->napi, amd8111e_rx_poll, 32);
1831+
netif_napi_add_weight(dev, &lp->napi, amd8111e_rx_poll, 32);
18321832

18331833
#if AMD8111E_VLAN_TAG_USED
18341834
dev->features |= NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX;

drivers/net/ethernet/amd/pcnet32.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1881,7 +1881,8 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
18811881
/* napi.weight is used in both the napi and non-napi cases */
18821882
lp->napi.weight = lp->rx_ring_size / 2;
18831883

1884-
netif_napi_add(dev, &lp->napi, pcnet32_poll, lp->rx_ring_size / 2);
1884+
netif_napi_add_weight(dev, &lp->napi, pcnet32_poll,
1885+
lp->rx_ring_size / 2);
18851886

18861887
if (fdx && !(lp->options & PCNET32_PORT_ASEL) &&
18871888
((cards_found >= MAX_UNITS) || full_duplex[cards_found]))

drivers/net/ethernet/arc/emac_main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -981,7 +981,8 @@ int arc_emac_probe(struct net_device *ndev, int interface)
981981
dev_info(dev, "connected to %s phy with id 0x%x\n",
982982
phydev->drv->name, phydev->phy_id);
983983

984-
netif_napi_add(ndev, &priv->napi, arc_emac_poll, ARC_EMAC_NAPI_WEIGHT);
984+
netif_napi_add_weight(ndev, &priv->napi, arc_emac_poll,
985+
ARC_EMAC_NAPI_WEIGHT);
985986

986987
err = register_netdev(ndev);
987988
if (err) {

drivers/net/ethernet/atheros/ag71xx.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1922,7 +1922,8 @@ static int ag71xx_probe(struct platform_device *pdev)
19221922
return err;
19231923
}
19241924

1925-
netif_napi_add(ndev, &ag->napi, ag71xx_poll, AG71XX_NAPI_WEIGHT);
1925+
netif_napi_add_weight(ndev, &ag->napi, ag71xx_poll,
1926+
AG71XX_NAPI_WEIGHT);
19261927

19271928
err = clk_prepare_enable(ag->clk_eth);
19281929
if (err) {

drivers/net/ethernet/broadcom/bcm63xx_enet.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1859,7 +1859,7 @@ static int bcm_enet_probe(struct platform_device *pdev)
18591859

18601860
/* register netdevice */
18611861
dev->netdev_ops = &bcm_enet_ops;
1862-
netif_napi_add(dev, &priv->napi, bcm_enet_poll, 16);
1862+
netif_napi_add_weight(dev, &priv->napi, bcm_enet_poll, 16);
18631863

18641864
dev->ethtool_ops = &bcm_enet_ethtool_ops;
18651865
/* MTU range: 46 - 2028 */
@@ -2714,7 +2714,7 @@ static int bcm_enetsw_probe(struct platform_device *pdev)
27142714

27152715
/* register netdevice */
27162716
dev->netdev_ops = &bcm_enetsw_ops;
2717-
netif_napi_add(dev, &priv->napi, bcm_enet_poll, 16);
2717+
netif_napi_add_weight(dev, &priv->napi, bcm_enet_poll, 16);
27182718
dev->ethtool_ops = &bcm_enetsw_ethtool_ops;
27192719
SET_NETDEV_DEV(dev, &pdev->dev);
27202720

drivers/net/ethernet/broadcom/sb1250-mac.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2203,7 +2203,7 @@ static int sbmac_init(struct platform_device *pldev, long long base)
22032203
dev->min_mtu = 0;
22042204
dev->max_mtu = ENET_PACKET_SIZE;
22052205

2206-
netif_napi_add(dev, &sc->napi, sbmac_poll, 16);
2206+
netif_napi_add_weight(dev, &sc->napi, sbmac_poll, 16);
22072207

22082208
dev->irq = UNIT_INT(idx);
22092209

0 commit comments

Comments
 (0)