mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-16 02:14:58 +00:00
net: move dev_xmit_recursion() helpers to net/core/dev.h
Move dev_xmit_recursion() and friends to net/core/dev.h They are only used from net/core/dev.c and net/core/filter.c. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
b9495b564d
commit
2fe50a4d72
@ -3271,23 +3271,6 @@ static inline int dev_recursion_level(void)
|
||||
return this_cpu_read(softnet_data.xmit.recursion);
|
||||
}
|
||||
|
||||
#define XMIT_RECURSION_LIMIT 8
|
||||
static inline bool dev_xmit_recursion(void)
|
||||
{
|
||||
return unlikely(__this_cpu_read(softnet_data.xmit.recursion) >
|
||||
XMIT_RECURSION_LIMIT);
|
||||
}
|
||||
|
||||
static inline void dev_xmit_recursion_inc(void)
|
||||
{
|
||||
__this_cpu_inc(softnet_data.xmit.recursion);
|
||||
}
|
||||
|
||||
static inline void dev_xmit_recursion_dec(void)
|
||||
{
|
||||
__this_cpu_dec(softnet_data.xmit.recursion);
|
||||
}
|
||||
|
||||
void __netif_schedule(struct Qdisc *q);
|
||||
void netif_schedule_queue(struct netdev_queue *txq);
|
||||
|
||||
|
@ -150,4 +150,21 @@ static inline void xdp_do_check_flushed(struct napi_struct *napi) { }
|
||||
struct napi_struct *napi_by_id(unsigned int napi_id);
|
||||
void kick_defer_list_purge(struct softnet_data *sd, unsigned int cpu);
|
||||
|
||||
#define XMIT_RECURSION_LIMIT 8
|
||||
static inline bool dev_xmit_recursion(void)
|
||||
{
|
||||
return unlikely(__this_cpu_read(softnet_data.xmit.recursion) >
|
||||
XMIT_RECURSION_LIMIT);
|
||||
}
|
||||
|
||||
static inline void dev_xmit_recursion_inc(void)
|
||||
{
|
||||
__this_cpu_inc(softnet_data.xmit.recursion);
|
||||
}
|
||||
|
||||
static inline void dev_xmit_recursion_dec(void)
|
||||
{
|
||||
__this_cpu_dec(softnet_data.xmit.recursion);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user