mirror of
https://github.com/joel16/android_kernel_sony_msm8994.git
synced 2024-11-30 15:41:27 +00:00
netfilter: nf_conntrack: use this_cpu_inc()
this_cpu_inc() is IRQ safe and faster than local_bh_disable()/__this_cpu_inc()/local_bh_enable(), at least on x86. Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Patrick McHardy <kaber@trash.net> Cc: Christoph Lameter <cl@linux.com> Cc: Tejun Heo <tj@kernel.org> Reviewed-by: Christoph Lameter <cl@linux.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
parent
a900689264
commit
ac3a546ac8
@ -321,14 +321,8 @@ extern unsigned int nf_conntrack_max;
|
||||
extern unsigned int nf_conntrack_hash_rnd;
|
||||
void init_nf_conntrack_hash_rnd(void);
|
||||
|
||||
#define NF_CT_STAT_INC(net, count) \
|
||||
__this_cpu_inc((net)->ct.stat->count)
|
||||
#define NF_CT_STAT_INC_ATOMIC(net, count) \
|
||||
do { \
|
||||
local_bh_disable(); \
|
||||
__this_cpu_inc((net)->ct.stat->count); \
|
||||
local_bh_enable(); \
|
||||
} while (0)
|
||||
#define NF_CT_STAT_INC(net, count) __this_cpu_inc((net)->ct.stat->count)
|
||||
#define NF_CT_STAT_INC_ATOMIC(net, count) this_cpu_inc((net)->ct.stat->count)
|
||||
|
||||
#define MODULE_ALIAS_NFCT_HELPER(helper) \
|
||||
MODULE_ALIAS("nfct-helper-" helper)
|
||||
|
Loading…
Reference in New Issue
Block a user