net: add netif_tx_napi_add()
netif_tx_napi_add() is a variant of netif_napi_add() It should be used by drivers that use a napi structure to exclusively poll TX. We do not want to add this kind of napi in napi_hash[] in following patches, adding generic busy polling to all NAPI drivers. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
93f93a4404
commit
d64b5e85bf
@@ -4737,7 +4737,8 @@ EXPORT_SYMBOL(sk_busy_loop);
|
||||
|
||||
void napi_hash_add(struct napi_struct *napi)
|
||||
{
|
||||
if (test_and_set_bit(NAPI_STATE_HASHED, &napi->state))
|
||||
if (test_bit(NAPI_STATE_NO_BUSY_POLL, &napi->state) ||
|
||||
test_and_set_bit(NAPI_STATE_HASHED, &napi->state))
|
||||
return;
|
||||
|
||||
spin_lock(&napi_hash_lock);
|
||||
|
Reference in New Issue
Block a user