Skip to content

Commit

Permalink
net: napi_hash_add() is no longer exported
Browse files Browse the repository at this point in the history
There are no more users except from net/core/dev.c
napi_hash_add() can now be static.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Nov 10, 2016
1 parent ef8d759 commit 149d6ad
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
11 changes: 0 additions & 11 deletions include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -467,17 +467,6 @@ static inline void napi_complete(struct napi_struct *n)
return napi_complete_done(n, 0);
}

/**
* napi_hash_add - add a NAPI to global hashtable
* @napi: NAPI context
*
* Generate a new napi_id and store a @napi under it in napi_hash.
* Used for busy polling (CONFIG_NET_RX_BUSY_POLL).
* Note: This is normally automatically done from netif_napi_add(),
* so might disappear in a future Linux version.
*/
void napi_hash_add(struct napi_struct *napi);

/**
* napi_hash_del - remove a NAPI from global table
* @napi: NAPI context
Expand Down
3 changes: 1 addition & 2 deletions net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -5017,7 +5017,7 @@ EXPORT_SYMBOL(sk_busy_loop);

#endif /* CONFIG_NET_RX_BUSY_POLL */

void napi_hash_add(struct napi_struct *napi)
static void napi_hash_add(struct napi_struct *napi)
{
if (test_bit(NAPI_STATE_NO_BUSY_POLL, &napi->state) ||
test_and_set_bit(NAPI_STATE_HASHED, &napi->state))
Expand All @@ -5037,7 +5037,6 @@ void napi_hash_add(struct napi_struct *napi)

spin_unlock(&napi_hash_lock);
}
EXPORT_SYMBOL_GPL(napi_hash_add);

/* Warning : caller is responsible to make sure rcu grace period
* is respected before freeing memory containing @napi
Expand Down

0 comments on commit 149d6ad

Please sign in to comment.