net: provide generic busy polling to all NAPI drivers
NAPI drivers no longer need to observe a particular protocol to benefit from busy polling (CONFIG_NET_RX_BUSY_POLL=y) napi_hash_add() and napi_hash_del() are automatically called from core networking stack, respectively from netif_napi_add() and netif_napi_del() This patch depends on free_netdev() and netif_napi_del() being called from process context, which seems to be the norm. Drivers might still prefer to call napi_hash_del() on their own, since they might combine all the rcu grace periods into a single one, knowing their NAPI structures lifetime, while core networking stack has no idea of a possible combining. Once this patch proves to not bring serious regressions, we will cleanup drivers to either remove napi_hash_del() or provide appropriate rcu grace periods combining. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
这个提交包含在:
@@ -2527,7 +2527,6 @@ int t4_sge_alloc_rxq(struct adapter *adap, struct sge_rspq *iq, bool fwevtq,
|
||||
goto err;
|
||||
|
||||
netif_napi_add(dev, &iq->napi, napi_rx_handler, 64);
|
||||
napi_hash_add(&iq->napi);
|
||||
iq->cur_desc = iq->desc;
|
||||
iq->cidx = 0;
|
||||
iq->gen = 1;
|
||||
|
在新工单中引用
屏蔽一个用户