mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
net: hns: Use NAPI_POLL_WEIGHT for hns driver
[ Upstream commit acb1ce15a6 ]
When the HNS driver loaded, always have an error print:
"netif_napi_add() called with weight 256"
This is because the kernel checks the NAPI polling weights
requested by drivers and it prints an error message if a driver
requests a weight bigger than 64.
So use NAPI_POLL_WEIGHT to fix it.
Signed-off-by: Yonglong Liu <liuyonglong@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
91c4d62493
commit
8d160e7b3d
@@ -29,9 +29,6 @@
|
||||
|
||||
#define SERVICE_TIMER_HZ (1 * HZ)
|
||||
|
||||
#define NIC_TX_CLEAN_MAX_NUM 256
|
||||
#define NIC_RX_CLEAN_MAX_NUM 64
|
||||
|
||||
#define RCB_IRQ_NOT_INITED 0
|
||||
#define RCB_IRQ_INITED 1
|
||||
#define HNS_BUFFER_SIZE_2048 2048
|
||||
@@ -2270,7 +2267,7 @@ static int hns_nic_init_ring_data(struct hns_nic_priv *priv)
|
||||
hns_nic_tx_fini_pro_v2;
|
||||
|
||||
netif_napi_add(priv->netdev, &rd->napi,
|
||||
hns_nic_common_poll, NIC_TX_CLEAN_MAX_NUM);
|
||||
hns_nic_common_poll, NAPI_POLL_WEIGHT);
|
||||
rd->ring->irq_init_flag = RCB_IRQ_NOT_INITED;
|
||||
}
|
||||
for (i = h->q_num; i < h->q_num * 2; i++) {
|
||||
@@ -2283,7 +2280,7 @@ static int hns_nic_init_ring_data(struct hns_nic_priv *priv)
|
||||
hns_nic_rx_fini_pro_v2;
|
||||
|
||||
netif_napi_add(priv->netdev, &rd->napi,
|
||||
hns_nic_common_poll, NIC_RX_CLEAN_MAX_NUM);
|
||||
hns_nic_common_poll, NAPI_POLL_WEIGHT);
|
||||
rd->ring->irq_init_flag = RCB_IRQ_NOT_INITED;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user