net: switch drivers to netif_napi_add_weight()
Subsystems (30)
Jakub Kicinski
maintainercover 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.
Jakub Kicinski (6):
um: vector: switch to netif_napi_add_weight()
caif_virtio: switch to netif_napi_add_weight()
eth: switch to netif_napi_add_weight()
r8152: switch to netif_napi_add_weight()
net: virtio: switch to netif_napi_add_weight()
net: wan: switch to netif_napi_add_weight()
arch/um/drivers/vector_kern.c | 3 ++- drivers/net/caif/caif_virtio.c | 3 ++- drivers/net/ethernet/3com/typhoon.c | 2 +- drivers/net/ethernet/adaptec/starfire.c | 2 +- drivers/net/ethernet/amd/amd8111e.c | 2 +- drivers/net/ethernet/amd/pcnet32.c | 3 ++- drivers/net/ethernet/arc/emac_main.c | 3 ++- drivers/net/ethernet/atheros/ag71xx.c | 3 ++- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 4 ++-- drivers/net/ethernet/broadcom/sb1250-mac.c | 2 +- drivers/net/ethernet/dec/tulip/tulip_core.c | 2 +- drivers/net/ethernet/ezchip/nps_enet.c | 4 ++-- drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | 3 ++- drivers/net/ethernet/hisilicon/hisi_femac.c | 3 ++- drivers/net/ethernet/huawei/hinic/hinic_rx.c | 3 ++- drivers/net/ethernet/huawei/hinic/hinic_tx.c | 3 ++- drivers/net/ethernet/ibm/emac/mal.c | 4 ++-- drivers/net/ethernet/ibm/ibmveth.c | 2 +- drivers/net/ethernet/intel/e100.c | 2 +- drivers/net/ethernet/lantiq_etop.c | 8 ++++---- drivers/net/ethernet/marvell/pxa168_eth.c | 3 ++- drivers/net/ethernet/microchip/sparx5/sparx5_fdma.c | 3 ++- drivers/net/ethernet/microsoft/mana/mana_en.c | 2 +- drivers/net/ethernet/moxa/moxart_ether.c | 2 +- drivers/net/ethernet/mscc/ocelot_fdma.c | 4 ++-- drivers/net/ethernet/myricom/myri10ge/myri10ge.c | 4 ++-- drivers/net/ethernet/neterion/vxge/vxge-main.c | 9 +++++---- drivers/net/ethernet/nxp/lpc_eth.c | 2 +- drivers/net/ethernet/realtek/8139cp.c | 2 +- drivers/net/ethernet/sfc/efx_channels.c | 4 ++-- drivers/net/ethernet/sfc/falcon/efx.c | 4 ++-- drivers/net/ethernet/smsc/smsc911x.c | 3 ++- drivers/net/ethernet/toshiba/tc35815.c | 2 +- drivers/net/ethernet/wiznet/w5100.c | 2 +- drivers/net/ethernet/wiznet/w5300.c | 2 +- drivers/net/ethernet/xscale/ixp4xx_eth.c | 2 +- drivers/net/usb/r8152.c | 6 ++---- drivers/net/virtio_net.c | 4 ++-- drivers/net/wan/fsl_ucc_hdlc.c | 2 +- drivers/net/wan/hd64572.c | 3 ++- drivers/net/wan/ixp4xx_hss.c | 2 +- drivers/net/wan/lapbether.c | 2 +- 42 files changed, 71 insertions(+), 59 deletions(-)
Signature · 1 line
2.34.1
Jakub Kicinski
maintainerPATCH 1/6 um: vector: switch to netif_napi_add_weight()
UM's netdev driver uses a custom napi weight, switch to the new API for setting custom weight.
---
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
--- arch/um/drivers/vector_kern.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/um/drivers/vector_kern.c +2 -1
@@ -1255,7 +1255,8 @@ static int vector_net_open(struct net_device *dev) goto out_close; } -netif_napi_add (vp->dev, &vp->napi, vector_poll,get_depth (vp->parsed)); +netif_napi_add_weight (vp->dev, &vp->napi, vector_poll, +get_depth (vp->parsed));napi_enable (&vp->napi);/* READ IRQ */
Signature · 7 lines
2.34.1 _______________________________________________ linux-um mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-um
Jakub Kicinski
maintainerPATCH 2/6 caif_virtio: switch to netif_napi_add_weight()
In reply to Jakub Kicinskicaif_virtio uses a custom napi weight, switch to the new API for setting custom weights.
---
CC: [email protected]
CC: [email protected]
--- drivers/net/caif/caif_virtio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/caif/caif_virtio.c +2 -1
@@ -714,7 +714,8 @@ static int cfv_probe(struct virtio_device *vdev)/* Initialize NAPI poll context data */ vringh_kiov_init (&cfv->ctx.riov,NULL ,0 ); cfv->ctx.head =USHRT_MAX ; -netif_napi_add (netdev, &cfv->napi, cfv_rx_poll,CFV_DEFAULT_QUOTA ); +netif_napi_add_weight (netdev, &cfv->napi, cfv_rx_poll, +CFV_DEFAULT_QUOTA );tasklet_setup (&cfv->tx_release_tasklet, cfv_tx_release_tasklet);
Signature · 1 line
2.34.1
Re: [PATCH net-next 2/6] caif_virtio: switch to netif_napi_add_weight()
Quoted 4 lines · Jakub Kicinski
caif_virtiouses a custom napi weight, switch to the new API for setting custom weights.Signed-off-by Jakub Kicinski <[email protected]>
Quoted 23 lines
---
CC: [email protected]
CC: [email protected]--- drivers/net/caif/caif_virtio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/net/caif/caif_virtio.c +2
-1@@ -714,7 +714,8 @@ static int cfv_probe(struct virtio_device *vdev)/* Initialize NAPI poll context data */ vringh_kiov_init (&cfv->ctx.riov,NULL ,0 ); cfv->ctx.head =USHRT_MAX ; -netif_napi_add (netdev, &cfv->napi, cfv_rx_poll,CFV_DEFAULT_QUOTA ); +netif_napi_add_weight (netdev, &cfv->napi, cfv_rx_poll, +CFV_DEFAULT_QUOTA );tasklet_setup (&cfv->tx_release_tasklet, cfv_tx_release_tasklet);Signature · 1 line
2.34.1
Jakub Kicinski
maintainerPATCH 3/6 eth: switch to netif_napi_add_weight()
In reply to Jakub KicinskiSwitch all Ethernet drivers which use custom napi weights to the new API.
---
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
--- drivers/net/ethernet/3com/typhoon.c | 2 +- drivers/net/ethernet/adaptec/starfire.c | 2 +- drivers/net/ethernet/amd/amd8111e.c | 2 +- drivers/net/ethernet/amd/pcnet32.c | 3 ++- drivers/net/ethernet/arc/emac_main.c | 3 ++- drivers/net/ethernet/atheros/ag71xx.c | 3 ++- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 4 ++-- drivers/net/ethernet/broadcom/sb1250-mac.c | 2 +- drivers/net/ethernet/dec/tulip/tulip_core.c | 2 +- drivers/net/ethernet/ezchip/nps_enet.c | 4 ++-- drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | 3 ++- drivers/net/ethernet/hisilicon/hisi_femac.c | 3 ++- drivers/net/ethernet/huawei/hinic/hinic_rx.c | 3 ++- drivers/net/ethernet/huawei/hinic/hinic_tx.c | 3 ++- drivers/net/ethernet/ibm/emac/mal.c | 4 ++-- drivers/net/ethernet/ibm/ibmveth.c | 2 +- drivers/net/ethernet/intel/e100.c | 2 +- drivers/net/ethernet/lantiq_etop.c | 8 ++++---- drivers/net/ethernet/marvell/pxa168_eth.c | 3 ++- drivers/net/ethernet/microchip/sparx5/sparx5_fdma.c | 3 ++- drivers/net/ethernet/microsoft/mana/mana_en.c | 2 +- drivers/net/ethernet/moxa/moxart_ether.c | 2 +- drivers/net/ethernet/mscc/ocelot_fdma.c | 4 ++-- drivers/net/ethernet/myricom/myri10ge/myri10ge.c | 4 ++-- drivers/net/ethernet/neterion/vxge/vxge-main.c | 9 +++++---- drivers/net/ethernet/nxp/lpc_eth.c | 2 +- drivers/net/ethernet/realtek/8139cp.c | 2 +- drivers/net/ethernet/sfc/efx_channels.c | 4 ++-- drivers/net/ethernet/sfc/falcon/efx.c | 4 ++-- drivers/net/ethernet/smsc/smsc911x.c | 3 ++- drivers/net/ethernet/toshiba/tc35815.c | 2 +- drivers/net/ethernet/wiznet/w5100.c | 2 +- drivers/net/ethernet/wiznet/w5300.c | 2 +- drivers/net/ethernet/xscale/ixp4xx_eth.c | 2 +- 34 files changed, 58 insertions(+), 47 deletions(-)
drivers/net/ethernet/3com/typhoon.c +1 -1
@@ -2464,7 +2464,7 @@ typhoon_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)/* The chip-specific entries in the device structure. */ dev->netdev_ops = &typhoon_netdev_ops; -netif_napi_add (dev, &tp->napi, typhoon_poll,16 ); +netif_napi_add_weight (dev, &tp->napi, typhoon_poll,16 ); dev->watchdog_timeo =TX_TIMEOUT ; dev->ethtool_ops = &typhoon_ethtool_ops;
drivers/net/ethernet/adaptec/starfire.c +1 -1
@@ -772,7 +772,7 @@ static int starfire_init_one(struct pci_dev *pdev, dev->watchdog_timeo =TX_TIMEOUT ; dev->ethtool_ops = ðtool_ops; -netif_napi_add (dev, &np->napi, netdev_poll, max_interrupt_work); +netif_napi_add_weight (dev, &np->napi, netdev_poll, max_interrupt_work);if (mtu) dev->mtu = mtu;
drivers/net/ethernet/amd/amd8111e.c +1 -1
@@ -1828,7 +1828,7 @@ static int amd8111e_probe_one(struct pci_dev *pdev, dev->watchdog_timeo =AMD8111E_TX_TIMEOUT ; dev->min_mtu =AMD8111E_MIN_MTU ; dev->max_mtu =AMD8111E_MAX_MTU ; -netif_napi_add (dev, &lp->napi, amd8111e_rx_poll,32 ); +netif_napi_add_weight (dev, &lp->napi, amd8111e_rx_poll,32 );#if AMD8111E_VLAN_TAG_USED dev->features |=NETIF_F_HW_VLAN_CTAG_TX |NETIF_F_HW_VLAN_CTAG_RX ;
drivers/net/ethernet/amd/pcnet32.c +2 -1
@@ -1881,7 +1881,8 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)/* napi.weight is used in both the napi and non-napi cases */ lp->napi.weight = lp->rx_ring_size /2 ; -netif_napi_add (dev, &lp->napi, pcnet32_poll, lp->rx_ring_size /2 ); +netif_napi_add_weight (dev, &lp->napi, pcnet32_poll, + lp->rx_ring_size /2 );if (fdx && !(lp->options &PCNET32_PORT_ASEL ) && ((cards_found >=MAX_UNITS ) || full_duplex[cards_found]))
drivers/net/ethernet/arc/emac_main.c +2 -1
@@ -981,7 +981,8 @@ int arc_emac_probe(struct net_device *ndev, int interface)dev_info (dev,"connected to %s phy with id 0x%x\n" , phydev->drv->name, phydev->phy_id); -netif_napi_add (ndev, &priv->napi, arc_emac_poll,ARC_EMAC_NAPI_WEIGHT ); +netif_napi_add_weight (ndev, &priv->napi, arc_emac_poll, +ARC_EMAC_NAPI_WEIGHT ); err =register_netdev (ndev);if (err) {
drivers/net/ethernet/atheros/ag71xx.c +2 -1
@@ -1922,7 +1922,8 @@ static int ag71xx_probe(struct platform_device *pdev)return err; } -netif_napi_add (ndev, &ag->napi, ag71xx_poll,AG71XX_NAPI_WEIGHT ); +netif_napi_add_weight (ndev, &ag->napi, ag71xx_poll, +AG71XX_NAPI_WEIGHT ); err =clk_prepare_enable (ag->clk_eth);if (err) {
drivers/net/ethernet/broadcom/bcm63xx_enet.c +2 -2
@@ -1859,7 +1859,7 @@ static int bcm_enet_probe(struct platform_device *pdev)/* register netdevice */ dev->netdev_ops = &bcm_enet_ops; -netif_napi_add (dev, &priv->napi, bcm_enet_poll,16 ); +netif_napi_add_weight (dev, &priv->napi, bcm_enet_poll,16 ); dev->ethtool_ops = &bcm_enet_ethtool_ops;/* MTU range: 46 - 2028 */
@@ -2714,7 +2714,7 @@ static int bcm_enetsw_probe(struct platform_device *pdev)/* register netdevice */ dev->netdev_ops = &bcm_enetsw_ops; -netif_napi_add (dev, &priv->napi, bcm_enet_poll,16 ); +netif_napi_add_weight (dev, &priv->napi, bcm_enet_poll,16 ); dev->ethtool_ops = &bcm_enetsw_ethtool_ops;SET_NETDEV_DEV (dev, &pdev->dev);
drivers/net/ethernet/broadcom/sb1250-mac.c +1 -1
@@ -2203,7 +2203,7 @@ static int sbmac_init(struct platform_device *pldev, long long base) dev->min_mtu =0 ; dev->max_mtu =ENET_PACKET_SIZE ; -netif_napi_add (dev, &sc->napi, sbmac_poll,16 ); +netif_napi_add_weight (dev, &sc->napi, sbmac_poll,16 ); dev->irq =UNIT_INT (idx);
drivers/net/ethernet/dec/tulip/tulip_core.c +1 -1
@@ -1689,7 +1689,7 @@ static int tulip_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) dev->netdev_ops = &tulip_netdev_ops; dev->watchdog_timeo =TX_TIMEOUT ;#ifdef CONFIG_TULIP_NAPI -netif_napi_add (dev, &tp->napi, tulip_poll,16 ); +netif_napi_add_weight (dev, &tp->napi, tulip_poll,16 );#endif dev->ethtool_ops = &ops;
drivers/net/ethernet/ezchip/nps_enet.c +2 -2
@@ -612,8 +612,8 @@ static s32 nps_enet_probe(struct platform_device *pdev) goto out_netdev; } -netif_napi_add (ndev, &priv->napi, nps_enet_poll, -NPS_ENET_NAPI_POLL_WEIGHT ); +netif_napi_add_weight (ndev, &priv->napi, nps_enet_poll, +NPS_ENET_NAPI_POLL_WEIGHT );/* Register the driver. Should be the last thing in probe */ err =register_netdev (ndev);
drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c +2 -1
@@ -1020,7 +1020,8 @@ static int fs_enet_probe(struct platform_device *ofdev) ndev->netdev_ops = &fs_enet_netdev_ops; ndev->watchdog_timeo =2 *HZ ;INIT_WORK (&fep->timeout_work, fs_timeout_work); -netif_napi_add (ndev, &fep->napi, fs_enet_napi, fpi->napi_weight); +netif_napi_add_weight (ndev, &fep->napi, fs_enet_napi, + fpi->napi_weight); ndev->ethtool_ops = &fs_ethtool_ops;
drivers/net/ethernet/hisilicon/hisi_femac.c +2 -1
@@ -852,7 +852,8 @@ static int hisi_femac_drv_probe(struct platform_device *pdev) ndev->priv_flags |=IFF_UNICAST_FLT ; ndev->netdev_ops = &hisi_femac_netdev_ops; ndev->ethtool_ops = &hisi_femac_ethtools_ops; -netif_napi_add (ndev, &priv->napi, hisi_femac_poll,FEMAC_POLL_WEIGHT ); +netif_napi_add_weight (ndev, &priv->napi, hisi_femac_poll, +FEMAC_POLL_WEIGHT );hisi_femac_port_init (priv);
drivers/net/ethernet/huawei/hinic/hinic_rx.c +2 -1
@@ -481,7 +481,8 @@ static void rx_add_napi(struct hinic_rxq *rxq) {struct hinic_dev *nic_dev =netdev_priv (rxq->netdev); -netif_napi_add (rxq->netdev, &rxq->napi, rx_poll, nic_dev->rx_weight); +netif_napi_add_weight (rxq->netdev, &rxq->napi, rx_poll, + nic_dev->rx_weight);napi_enable (&rxq->napi); }
drivers/net/ethernet/huawei/hinic/hinic_tx.c +2 -1
@@ -809,7 +809,8 @@ static int tx_request_irq(struct hinic_txq *txq) qp = container_of(sq, struct hinic_qp, sq); -netif_napi_add (txq->netdev, &txq->napi, free_tx_poll, nic_dev->tx_weight); +netif_napi_add_weight (txq->netdev, &txq->napi, free_tx_poll, + nic_dev->tx_weight); hinic_hwdev_msix_set(nic_dev->hwdev, sq->msix_entry, TX_IRQ_NO_PENDING, TX_IRQ_NO_COALESC,
drivers/net/ethernet/ibm/emac/mal.c +2 -2
@@ -605,8 +605,8 @@ static int mal_probe(struct platform_device *ofdev)init_dummy_netdev (&mal->dummy_dev); -netif_napi_add (&mal->dummy_dev, &mal->napi, mal_poll, -CONFIG_IBM_EMAC_POLL_WEIGHT ); +netif_napi_add_weight (&mal->dummy_dev, &mal->napi, mal_poll, +CONFIG_IBM_EMAC_POLL_WEIGHT );/* Load power-on reset defaults */ mal_reset (mal);
drivers/net/ethernet/ibm/ibmveth.c +1 -1
@@ -1674,7 +1674,7 @@ static int ibmveth_probe(struct vio_dev *dev, const struct vio_device_id *id) adapter->pool_config =0 ;ibmveth_init_link_settings (netdev); -netif_napi_add (netdev, &adapter->napi, ibmveth_poll,16 ); +netif_napi_add_weight (netdev, &adapter->napi, ibmveth_poll,16 ); netdev->irq = dev->irq; netdev->netdev_ops = &ibmveth_netdev_ops;
drivers/net/ethernet/intel/e100.c +1 -1
@@ -2848,7 +2848,7 @@ static int e100_probe(struct pci_dev *pdev, const struct pci_device_id *ent)strncpy (netdev->name,pci_name (pdev),sizeof (netdev->name) -1 ); nic =netdev_priv (netdev); -netif_napi_add (netdev, &nic->napi, e100_poll,E100_NAPI_WEIGHT ); +netif_napi_add_weight (netdev, &nic->napi, e100_poll,E100_NAPI_WEIGHT ); nic->netdev = netdev; nic->pdev = pdev; nic->msg_enable = (1 << debug) -1 ;
drivers/net/ethernet/lantiq_etop.c +4 -4
@@ -701,11 +701,11 @@ ltq_etop_probe(struct platform_device *pdev)for (i =0 ; i <MAX_DMA_CHAN ; i++) {if (IS_TX (i)) -netif_napi_add (dev, &priv->ch[i].napi, - ltq_etop_poll_tx,8 ); +netif_napi_add_weight (dev, &priv->ch[i].napi, + ltq_etop_poll_tx,8 );else if (IS_RX (i)) -netif_napi_add (dev, &priv->ch[i].napi, - ltq_etop_poll_rx,32 ); +netif_napi_add_weight (dev, &priv->ch[i].napi, + ltq_etop_poll_rx,32 ); priv->ch[i].netdev = dev; }
drivers/net/ethernet/marvell/pxa168_eth.c +2 -1
@@ -1486,7 +1486,8 @@ static int pxa168_eth_probe(struct platform_device *pdev)/* Hardware supports only 3 ports */ BUG_ON (pep->port_num >2 ); -netif_napi_add (dev, &pep->napi, pxa168_rx_poll, pep->rx_ring_size); +netif_napi_add_weight (dev, &pep->napi, pxa168_rx_poll, + pep->rx_ring_size);memset (&pep->timeout,0 ,sizeof (struct timer_list ));timer_setup (&pep->timeout, rxq_refill_timer_wrapper,0 );
drivers/net/ethernet/microchip/sparx5/sparx5_fdma.c +2 -1
@@ -381,7 +381,8 @@ static int sparx5_fdma_rx_alloc(struct sparx5 *sparx5) }sparx5_fdma_rx_add_dcb (rx, dcb, rx->dma +sizeof (*dcb) * idx); } -netif_napi_add (rx->ndev, &rx->napi, sparx5_fdma_napi_callback,FDMA_WEIGHT ); +netif_napi_add_weight (rx->ndev, &rx->napi, sparx5_fdma_napi_callback, +FDMA_WEIGHT );napi_enable (&rx->napi);sparx5_fdma_rx_activate (sparx5, rx);return 0 ;
drivers/net/ethernet/microsoft/mana/mana_en.c +1 -1
@@ -1602,7 +1602,7 @@ static struct mana_rxq *mana_create_rxq(struct mana_port_context *apc, gc->cq_table[cq->gdma_id] = cq->gdma_cq; -netif_napi_add (ndev, &cq->napi, mana_poll,1 ); +netif_napi_add_weight (ndev, &cq->napi, mana_poll,1 );WARN_ON (xdp_rxq_info_reg (&rxq->xdp_rxq, ndev, rxq_idx, cq->napi.napi_id));
drivers/net/ethernet/moxa/moxart_ether.c +1 -1
@@ -533,7 +533,7 @@ static int moxart_mac_probe(struct platform_device *pdev) } ndev->netdev_ops = &moxart_netdev_ops; -netif_napi_add (ndev, &priv->napi, moxart_rx_poll,RX_DESC_NUM ); +netif_napi_add_weight (ndev, &priv->napi, moxart_rx_poll,RX_DESC_NUM ); ndev->priv_flags |=IFF_UNICAST_FLT ; ndev->irq = irq;
drivers/net/ethernet/mscc/ocelot_fdma.c +2 -2
@@ -799,8 +799,8 @@ void ocelot_fdma_netdev_init(struct ocelot *ocelot, struct net_device *dev)return ; fdma->ndev = dev; -netif_napi_add (dev, &fdma->napi, ocelot_fdma_napi_poll, -OCELOT_FDMA_WEIGHT ); +netif_napi_add_weight (dev, &fdma->napi, ocelot_fdma_napi_poll, +OCELOT_FDMA_WEIGHT ); }void ocelot_fdma_netdev_deinit (struct ocelot *ocelot,struct net_device *dev)
drivers/net/ethernet/myricom/myri10ge/myri10ge.c +2 -2
@@ -3586,8 +3586,8 @@ static int myri10ge_alloc_slices(struct myri10ge_priv *mgp) goto abort; ss->mgp = mgp; ss->dev = mgp->dev; -netif_napi_add (ss->dev, &ss->napi, myri10ge_poll, - myri10ge_napi_weight); +netif_napi_add_weight (ss->dev, &ss->napi, myri10ge_poll, + myri10ge_napi_weight); }return 0 ; abort:
drivers/net/ethernet/neterion/vxge/vxge-main.c +5 -4
@@ -2720,8 +2720,8 @@ static int vxge_open(struct net_device *dev) }if (vdev->config.intr_type !=MSI_X ) { -netif_napi_add (dev, &vdev->napi, vxge_poll_inta, - vdev->config.napi_weight); +netif_napi_add_weight (dev, &vdev->napi, vxge_poll_inta, + vdev->config.napi_weight);napi_enable (&vdev->napi);for (i =0 ; i < vdev->no_of_vpath; i++) { vpath = &vdev->vpaths[i];
@@ -2730,8 +2730,9 @@ static int vxge_open(struct net_device *dev) }else {for (i =0 ; i < vdev->no_of_vpath; i++) { vpath = &vdev->vpaths[i]; -netif_napi_add (dev, &vpath->ring.napi, - vxge_poll_msix, vdev->config.napi_weight); +netif_napi_add_weight (dev, &vpath->ring.napi, + vxge_poll_msix, + vdev->config.napi_weight);napi_enable (&vpath->ring.napi); vpath->ring.napi_p = &vpath->ring.napi; }
drivers/net/ethernet/nxp/lpc_eth.c +1 -1
@@ -1373,7 +1373,7 @@ static int lpc_eth_drv_probe(struct platform_device *pdev) pldat->duplex =DUPLEX_FULL ;__lpc_params_setup (pldat); -netif_napi_add (ndev, &pldat->napi, lpc_eth_poll,NAPI_WEIGHT ); +netif_napi_add_weight (ndev, &pldat->napi, lpc_eth_poll,NAPI_WEIGHT ); ret =register_netdev (ndev);if (ret) {
drivers/net/ethernet/realtek/8139cp.c +1 -1
@@ -1986,7 +1986,7 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)eth_hw_addr_set (dev, (u8 *)addr); dev->netdev_ops = &cp_netdev_ops; -netif_napi_add (dev, &cp->napi, cp_rx_poll,16 ); +netif_napi_add_weight (dev, &cp->napi, cp_rx_poll,16 ); dev->ethtool_ops = &cp_ethtool_ops; dev->watchdog_timeo =TX_TIMEOUT ;
drivers/net/ethernet/sfc/efx_channels.c +2 -2
@@ -1316,8 +1316,8 @@ void efx_init_napi_channel(struct efx_channel *channel)struct efx_nic *efx = channel->efx; channel->napi_dev = efx->net_dev; -netif_napi_add (channel->napi_dev, &channel->napi_str, - efx_poll, napi_weight); +netif_napi_add_weight (channel->napi_dev, &channel->napi_str, efx_poll, + napi_weight); }void efx_init_napi (struct efx_nic *efx)
drivers/net/ethernet/sfc/falcon/efx.c +2 -2
@@ -2017,8 +2017,8 @@ static void ef4_init_napi_channel(struct ef4_channel *channel)struct ef4_nic *efx = channel->efx; channel->napi_dev = efx->net_dev; -netif_napi_add (channel->napi_dev, &channel->napi_str, - ef4_poll, napi_weight); +netif_napi_add_weight (channel->napi_dev, &channel->napi_str, ef4_poll, + napi_weight); }static void ef4_init_napi (struct ef4_nic *efx)
drivers/net/ethernet/smsc/smsc911x.c +2 -1
@@ -2304,7 +2304,8 @@ static int smsc911x_init(struct net_device *dev)return -ENODEV ; dev->flags |=IFF_MULTICAST ; -netif_napi_add (dev, &pdata->napi, smsc911x_poll,SMSC_NAPI_WEIGHT ); +netif_napi_add_weight (dev, &pdata->napi, smsc911x_poll, +SMSC_NAPI_WEIGHT ); dev->netdev_ops = &smsc911x_netdev_ops; dev->ethtool_ops = &smsc911x_ethtool_ops;
drivers/net/ethernet/toshiba/tc35815.c +1 -1
@@ -804,7 +804,7 @@ static int tc35815_init_one(struct pci_dev *pdev, dev->netdev_ops = &tc35815_netdev_ops; dev->ethtool_ops = &tc35815_ethtool_ops; dev->watchdog_timeo =TC35815_TX_TIMEOUT ; -netif_napi_add (dev, &lp->napi, tc35815_poll,NAPI_WEIGHT ); +netif_napi_add_weight (dev, &lp->napi, tc35815_poll,NAPI_WEIGHT ); dev->irq = pdev->irq; dev->base_addr = (unsigned long )ioaddr;
drivers/net/ethernet/wiznet/w5100.c +1 -1
@@ -1133,7 +1133,7 @@ int w5100_probe(struct device *dev, const struct w5100_ops *ops, ndev->netdev_ops = &w5100_netdev_ops; ndev->ethtool_ops = &w5100_ethtool_ops; -netif_napi_add (ndev, &priv->napi, w5100_napi_poll,16 ); +netif_napi_add_weight (ndev, &priv->napi, w5100_napi_poll,16 );/* This chip doesn't support VLAN packets with normal MTU, * so disable VLAN for this device.
drivers/net/ethernet/wiznet/w5300.c +1 -1
@@ -603,7 +603,7 @@ static int w5300_probe(struct platform_device *pdev) ndev->netdev_ops = &w5300_netdev_ops; ndev->ethtool_ops = &w5300_ethtool_ops; ndev->watchdog_timeo =HZ ; -netif_napi_add (ndev, &priv->napi, w5300_napi_poll,16 ); +netif_napi_add_weight (ndev, &priv->napi, w5300_napi_poll,16 );/* This chip doesn't support VLAN packets with normal MTU, * so disable VLAN for this device.
drivers/net/ethernet/xscale/ixp4xx_eth.c +1 -1
@@ -1480,7 +1480,7 @@ static int ixp4xx_eth_probe(struct platform_device *pdev) ndev->dev.dma_mask = dev->dma_mask; ndev->dev.coherent_dma_mask = dev->coherent_dma_mask; -netif_napi_add (ndev, &port->napi, eth_poll,NAPI_WEIGHT ); +netif_napi_add_weight (ndev, &port->napi, eth_poll,NAPI_WEIGHT );if (!(port->npe =npe_request (NPE_ID (port->id))))return -EIO ;
Signature · 1 line
2.34.1
Edward Cree
maintainerRe: [PATCH net-next 3/6] eth: switch to netif_napi_add_weight()
Quoted 10 lines · Jakub Kicinski
Switch all Ethernet drivers which use custom napi weights to the new API.
Signed-off-by Jakub Kicinski <[email protected]>---
drivers/net/ethernet/sfc/efx_channels.c +0
-0
drivers/net/ethernet/sfc/efx_channels.c void efx_init_napi_channel(struct efx_channel *channel) · line 1321
Quoted 8 lines
drivers/net/ethernet/sfc/efx_channels.c +2
-2@@ -1316,8 +1316,8 @@ void efx_init_napi_channel(struct efx_channel *channel)struct efx_nic *efx = channel->efx; channel->napi_dev = efx->net_dev; -netif_napi_add (channel->napi_dev, &channel->napi_str, - efx_poll, napi_weight); +netif_napi_add_weight (channel->napi_dev, &channel->napi_str, efx_poll, + napi_weight); }
This isn't really a custom weight; napi_weight is initialised to
64 and never changed, so probably we ought to be just using NAPI_POLL_WEIGHT here and end up on the non-_weight API.
Same goes for Falcon.
-ed
Jakub Kicinski
maintainerRe: [PATCH net-next 3/6] eth: switch to netif_napi_add_weight()
Quoted 7 lines · On Wed, 11 May 2022 18:57:53 +0100 Edward Cree wrote:
Quoted 7 lines
drivers/net/ethernet/sfc/efx_channels.c +0
-0@@ -1316,8 +1316,8 @@ void efx_init_napi_channel(struct efx_channel *channel)struct efx_nic *efx = channel->efx;
Quoted 11 lines
drivers/net/ethernet/sfc/efx_channels.c void efx_init_napi_channel(struct efx_channel *channel) · line 1321
Quoted 6 lines
drivers/net/ethernet/sfc/efx_channels.c +2
-2channel->napi_dev = efx->net_dev; -netif_napi_add (channel->napi_dev, &channel->napi_str, - efx_poll, napi_weight); +netif_napi_add_weight (channel->napi_dev, &channel->napi_str, efx_poll, + napi_weight); }This isn't really a custom weight;
napi_weightis initialised to
64 and never changed, so probably we ought to be just usingNAPI_POLL_WEIGHThere and end up on the non-_weight API.
Same goes for Falcon.
Ack, I wanted to be nice. I figured this must be a stub for a module param in your our of tree driver. Should I send a patch to remove the non-const static napi_weight globals and switch back to non-_weight?
Edward Cree
maintainerRe: [PATCH net-next 3/6] eth: switch to netif_napi_add_weight()
Quoted 8 lines · Jakub Kicinski
Quoted 4 lines · On Wed, 11 May 2022 18:57:53 +0100 Edward Cree wrote:
This isn't really a custom weight;
napi_weightis initialised to
64 and never changed, so probably we ought to be just usingNAPI_POLL_WEIGHThere and end up on the non-_weight API.
Same goes for Falcon.Ack, I wanted to be nice. I figured this must be a stub for a module param in your our of tree driver.
I mean, it *is*... but there's almost certainly a better way. Configuring
NAPI weight for tuning purposes (as opposed to some kind of correctness limitation in a driver) probably ought to be left to generic infrastructure rather than vendor-specific modparams in driver code.
Quoted 2 lines
Should I send a patch to remove
the non-const staticnapi_weightglobals and switch back to non-_weight?
Yes please, unless Martin has any objections...?
-ed
Re: [PATCH net-next 3/6] eth: switch to netif_napi_add_weight()
Quoted 15 lines · Edward Cree
Quoted 8 lines · Jakub Kicinski
Quoted 4 lines · On Wed, 11 May 2022 18:57:53 +0100 Edward Cree wrote:
This isn't really a custom weight;
napi_weightis initialised to
64 and never changed, so probably we ought to be just usingNAPI_POLL_WEIGHThere and end up on the non-_weight API.
Same goes for Falcon.Ack, I wanted to be nice. I figured this must be a stub for a module param in your our of tree driver.
I mean, it *is*... but there's almost certainly a better way. Configuring
NAPI weight for tuning purposes (as opposed to some kind of correctness limitation in a driver) probably ought to be left to generic infrastructure rather than vendor-specific modparams in driver code.
Quoted 4 lines
Quoted 2 lines
Should I send a patch to remove
the non-const staticnapi_weightglobals and switch back to non-_weight?Yes please, unless Martin has any objections...?
Fine for me.
Martin
Jakub Kicinski
maintainerPATCH 4/6 r8152: switch to netif_napi_add_weight()
In reply to Jakub Kicinskir8152 uses a custom napi weight, switch to the new API for setting custom weight.
---
CC: [email protected]
CC: [email protected]
--- drivers/net/usb/r8152.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/net/usb/r8152.c +2 -4
@@ -9732,10 +9732,8 @@ static int rtl8152_probe(struct usb_interface *intf,usb_set_intfdata (intf, tp); -if (tp->support_2500full) -netif_napi_add (netdev, &tp->napi, r8152_poll,256 ); -else -netif_napi_add (netdev, &tp->napi, r8152_poll,64 ); +netif_napi_add_weight (netdev, &tp->napi, r8152_poll, + tp->support_2500full ?256 :64 ); ret =register_netdev (netdev);if (ret !=0 ) {
Signature · 1 line
2.34.1
Jakub Kicinski
maintainerPATCH 5/6 net: virtio: switch to netif_napi_add_weight()
In reply to Jakub Kicinskivirtio netdev driver uses a custom napi weight, switch to the new API for setting custom weight.
---
CC: [email protected]
CC: [email protected]
CC: [email protected]
--- drivers/net/virtio_net.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/virtio_net.c +2 -2
@@ -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 );
Signature · 1 line
2.34.1
Re: [PATCH net-next 5/6] net: virtio: switch to netif_napi_add_weight()
Quoted 4 lines · Jakub Kicinski
virtio netdev driver uses a custom napi weight, switch to the new API for setting custom weight.
Signed-off-by Jakub Kicinski <[email protected]>
Quoted 26 lines
---
CC: [email protected]
CC: [email protected]
CC: [email protected]--- drivers/net/virtio_net.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/net/virtio_net.c +2
-3@@ -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 ); --2.34.1
Re: [PATCH net-next 5/6] net: virtio: switch to netif_napi_add_weight()
In reply to Jakub KicinskiQuoted 5 lines · Jakub Kicinski
virtio netdev driver uses a custom napi weight, switch to the new API for setting custom weight.
Signed-off-by Jakub Kicinski <[email protected]>
Quoted 26 lines
---
CC: [email protected]
CC: [email protected]
CC: [email protected]--- drivers/net/virtio_net.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/net/virtio_net.c +2
-3@@ -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 ); --2.34.1
Re: [PATCH net-next 5/6] net: virtio: switch to netif_napi_add_weight()
In reply to Jakub KicinskiQuoted 4 lines · Jakub Kicinski
virtio netdev driver uses a custom napi weight, switch to the new API for setting custom weight.
Signed-off-by Jakub Kicinski <[email protected]>
Quoted 25 lines
---
CC: [email protected]
CC: [email protected]
CC: [email protected]--- drivers/net/virtio_net.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/net/virtio_net.c +2
-2@@ -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 );Signature · 1 line
2.34.1
_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Jakub Kicinski
maintainerPATCH 6/6 net: wan: switch to netif_napi_add_weight()
In reply to Jakub KicinskiA handful of WAN drivers use custom napi weights,
switch them to the new API.
---
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
--- drivers/net/wan/fsl_ucc_hdlc.c | 2 +- drivers/net/wan/hd64572.c | 3 ++- drivers/net/wan/ixp4xx_hss.c | 2 +- drivers/net/wan/lapbether.c | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-)
drivers/net/wan/fsl_ucc_hdlc.c +1 -1
@@ -1231,7 +1231,7 @@ static int ucc_hdlc_probe(struct platform_device *pdev) dev->watchdog_timeo =2 *HZ ; hdlc->attach = ucc_hdlc_attach; hdlc->xmit = ucc_hdlc_tx; -netif_napi_add (dev, &uhdlc_priv->napi, ucc_hdlc_poll,32 ); +netif_napi_add_weight (dev, &uhdlc_priv->napi, ucc_hdlc_poll,32 );if (register_hdlc_device (dev)) { ret = -ENOBUFS ;pr_err ("ucc_hdlc: unable to register hdlc device\n" );
drivers/net/wan/hd64572.c +2 -1
@@ -173,7 +173,8 @@ static void sca_init_port(port_t *port)sca_out (DIR_EOME ,DIR_TX (port->chan), card);/* enable interrupts */ sca_set_carrier (port); -netif_napi_add (port->netdev, &port->napi, sca_poll,NAPI_WEIGHT ); +netif_napi_add_weight (port->netdev, &port->napi, sca_poll, +NAPI_WEIGHT ); }/* MSCI interrupt service */
drivers/net/wan/ixp4xx_hss.c +1 -1
@@ -1504,7 +1504,7 @@ static int ixp4xx_hss_probe(struct platform_device *pdev) port->clock_reg =CLK42X_SPEED_2048KHZ ; port->id = pdev->id; port->dev = &pdev->dev; -netif_napi_add (ndev, &port->napi, hss_hdlc_poll,NAPI_WEIGHT ); +netif_napi_add_weight (ndev, &port->napi, hss_hdlc_poll,NAPI_WEIGHT ); err =register_hdlc_device (ndev);if (err)
drivers/net/wan/lapbether.c +1 -1
@@ -408,7 +408,7 @@ static int lapbeth_new_device(struct net_device *dev)spin_lock_init (&lapbeth->up_lock);skb_queue_head_init (&lapbeth->rx_queue); -netif_napi_add (ndev, &lapbeth->napi, lapbeth_napi_poll,16 ); +netif_napi_add_weight (ndev, &lapbeth->napi, lapbeth_napi_poll,16 ); rc = -EIO ;if (register_netdevice (ndev))
Signature · 1 line
2.34.1
This series was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:
Hello:
This series was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:
Quoted 13 lines · On Fri, 6 May 2022 10:07:45 -0700 you wrote:
The minority of drivers pass a custom weight to
netif_napi_add(). Switch those away to the newnetif_napi_add_weight(). All drivers (which can go thru net-next) callingnetif_napi_add()will now be calling it withNAPI_POLL_WEIGHTor 64.Jakub Kicinski (6):
um: vector: switch tonetif_napi_add_weight()
caif_virtio: switch tonetif_napi_add_weight()
eth: switch tonetif_napi_add_weight()
r8152: switch tonetif_napi_add_weight()
net: virtio: switch tonetif_napi_add_weight()
net: wan: switch tonetif_napi_add_weight()
Quoted 1 line
[...]
Here is the summary with links:
- [net-next,1/6] um: vector: switch to netif_napi_add_weight()
https://git.kernel.org/netdev/net-next/c/4d92c6275575 - [net-next,2/6] caif_virtio: switch to netif_napi_add_weight() https://git.kernel.org/netdev/net-next/c/be8af67fabcb - [net-next,3/6] eth: switch to netif_napi_add_weight() https://git.kernel.org/netdev/net-next/c/b707b89f7be3 - [net-next,4/6] r8152: switch to netif_napi_add_weight() https://git.kernel.org/netdev/net-next/c/8ded532cd1cb - [net-next,5/6] net: virtio: switch to netif_napi_add_weight() https://git.kernel.org/netdev/net-next/c/d484735dcf92 - [net-next,6/6] net: wan: switch to netif_napi_add_weight() https://git.kernel.org/netdev/net-next/c/6f83cb8cbfbf
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html