aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2015-11-18 06:31:00 -0800
committerDavid S. Miller <davem@davemloft.net>2015-11-18 16:17:41 -0500
commitd64b5e85bfe2fe4c790abcbd16d9ae32391ddd7e (patch)
tree3b15f27d6adbc7fbc1ed4dc605c30a577b50c1c6 /net/core
parentnet: move skb_mark_napi_id() into core networking stack (diff)
downloadlinux-dev-d64b5e85bfe2fe4c790abcbd16d9ae32391ddd7e.tar.xz
linux-dev-d64b5e85bfe2fe4c790abcbd16d9ae32391ddd7e.zip
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/core')
-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 83b48747928c..ff58a8bc5e3c 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);