summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2015-11-18 14:31:00 (GMT)
committerDavid S. Miller <davem@davemloft.net>2015-11-18 21:17:41 (GMT)
commitd64b5e85bfe2fe4c790abcbd16d9ae32391ddd7e (patch)
tree3b15f27d6adbc7fbc1ed4dc605c30a577b50c1c6 /net
parent93f93a4404159ecf7e9148f5ad0718ec702ac4cb (diff)
downloadlinux-d64b5e85bfe2fe4c790abcbd16d9ae32391ddd7e.tar.xz
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>
Diffstat (limited to 'net')
-rw-r--r--net/core/dev.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 83b4874..ff58a8b 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -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);