eth: remove remaining copies of the NAPI_POLL_WEIGHT define
Defining local versions of NAPI_POLL_WEIGHT with the same
values in the drivers just makes refactoring harder.
This patch covers three more drivers which I missed in
commit 5f012b40ef
("eth: remove copies of the NAPI_POLL_WEIGHT define").
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
5a8ad1ce2c
commit
36ffca1afe
|
@ -31,8 +31,6 @@ MODULE_LICENSE("GPL");
|
||||||
|
|
||||||
#define ENA_MAX_RINGS min_t(unsigned int, ENA_MAX_NUM_IO_QUEUES, num_possible_cpus())
|
#define ENA_MAX_RINGS min_t(unsigned int, ENA_MAX_NUM_IO_QUEUES, num_possible_cpus())
|
||||||
|
|
||||||
#define ENA_NAPI_BUDGET 64
|
|
||||||
|
|
||||||
#define DEFAULT_MSG_ENABLE (NETIF_MSG_DRV | NETIF_MSG_PROBE | NETIF_MSG_IFUP | \
|
#define DEFAULT_MSG_ENABLE (NETIF_MSG_DRV | NETIF_MSG_PROBE | NETIF_MSG_IFUP | \
|
||||||
NETIF_MSG_TX_DONE | NETIF_MSG_TX_ERR | NETIF_MSG_RX_ERR)
|
NETIF_MSG_TX_DONE | NETIF_MSG_TX_ERR | NETIF_MSG_RX_ERR)
|
||||||
|
|
||||||
|
@ -2270,7 +2268,7 @@ static void ena_init_napi_in_range(struct ena_adapter *adapter,
|
||||||
netif_napi_add(adapter->netdev,
|
netif_napi_add(adapter->netdev,
|
||||||
&napi->napi,
|
&napi->napi,
|
||||||
ENA_IS_XDP_INDEX(adapter, i) ? ena_xdp_io_poll : ena_io_poll,
|
ENA_IS_XDP_INDEX(adapter, i) ? ena_xdp_io_poll : ena_io_poll,
|
||||||
ENA_NAPI_BUDGET);
|
NAPI_POLL_WEIGHT);
|
||||||
|
|
||||||
if (!ENA_IS_XDP_INDEX(adapter, i)) {
|
if (!ENA_IS_XDP_INDEX(adapter, i)) {
|
||||||
napi->rx_ring = &adapter->rx_ring[i];
|
napi->rx_ring = &adapter->rx_ring[i];
|
||||||
|
|
|
@ -1881,7 +1881,6 @@ poll_exit:
|
||||||
return rcvd;
|
return rcvd;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define BNAD_NAPI_POLL_QUOTA 64
|
|
||||||
static void
|
static void
|
||||||
bnad_napi_add(struct bnad *bnad, u32 rx_id)
|
bnad_napi_add(struct bnad *bnad, u32 rx_id)
|
||||||
{
|
{
|
||||||
|
@ -1892,7 +1891,7 @@ bnad_napi_add(struct bnad *bnad, u32 rx_id)
|
||||||
for (i = 0; i < bnad->num_rxp_per_rx; i++) {
|
for (i = 0; i < bnad->num_rxp_per_rx; i++) {
|
||||||
rx_ctrl = &bnad->rx_info[rx_id].rx_ctrl[i];
|
rx_ctrl = &bnad->rx_info[rx_id].rx_ctrl[i];
|
||||||
netif_napi_add(bnad->netdev, &rx_ctrl->napi,
|
netif_napi_add(bnad->netdev, &rx_ctrl->napi,
|
||||||
bnad_napi_poll_rx, BNAD_NAPI_POLL_QUOTA);
|
bnad_napi_poll_rx, NAPI_POLL_WEIGHT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,8 +56,8 @@
|
||||||
|
|
||||||
#include <asm/irq.h>
|
#include <asm/irq.h>
|
||||||
|
|
||||||
#define TX_WORK_PER_LOOP 64
|
#define TX_WORK_PER_LOOP NAPI_POLL_WEIGHT
|
||||||
#define RX_WORK_PER_LOOP 64
|
#define RX_WORK_PER_LOOP NAPI_POLL_WEIGHT
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Hardware access:
|
* Hardware access:
|
||||||
|
@ -5876,7 +5876,7 @@ static int nv_probe(struct pci_dev *pci_dev, const struct pci_device_id *id)
|
||||||
else
|
else
|
||||||
dev->netdev_ops = &nv_netdev_ops_optimized;
|
dev->netdev_ops = &nv_netdev_ops_optimized;
|
||||||
|
|
||||||
netif_napi_add(dev, &np->napi, nv_napi_poll, RX_WORK_PER_LOOP);
|
netif_napi_add(dev, &np->napi, nv_napi_poll, NAPI_POLL_WEIGHT);
|
||||||
dev->ethtool_ops = &ops;
|
dev->ethtool_ops = &ops;
|
||||||
dev->watchdog_timeo = NV_WATCHDOG_TIMEO;
|
dev->watchdog_timeo = NV_WATCHDOG_TIMEO;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue