diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-06-09 08:43:38 -0400 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2010-06-09 08:43:38 -0400 |
commit | b3c5163fe0193a74016dba1bb22491e0d1e9aaa4 (patch) | |
tree | fc52d035b431969c034a1033e1c70803dd9ef219 /include | |
parent | 5bfddbd46a95c978f4d3c992339cbdf4f4b790a3 (diff) |
netfilter: nf_conntrack: per_cpu untracking
NOTRACK makes all cpus share a cache line on nf_conntrack_untracked
twice per packet, slowing down performance.
This patch converts it to a per_cpu variable.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/netfilter/nf_conntrack.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h index 3bc38c70bbbe..84a4b6fec99d 100644 --- a/include/net/netfilter/nf_conntrack.h +++ b/include/net/netfilter/nf_conntrack.h | |||
@@ -261,11 +261,10 @@ extern s16 (*nf_ct_nat_offset)(const struct nf_conn *ct, | |||
261 | u32 seq); | 261 | u32 seq); |
262 | 262 | ||
263 | /* Fake conntrack entry for untracked connections */ | 263 | /* Fake conntrack entry for untracked connections */ |
264 | DECLARE_PER_CPU(struct nf_conn, nf_conntrack_untracked); | ||
264 | static inline struct nf_conn *nf_ct_untracked_get(void) | 265 | static inline struct nf_conn *nf_ct_untracked_get(void) |
265 | { | 266 | { |
266 | extern struct nf_conn nf_conntrack_untracked; | 267 | return &__raw_get_cpu_var(nf_conntrack_untracked); |
267 | |||
268 | return &nf_conntrack_untracked; | ||
269 | } | 268 | } |
270 | extern void nf_ct_untracked_status_or(unsigned long bits); | 269 | extern void nf_ct_untracked_status_or(unsigned long bits); |
271 | 270 | ||