netfilter: x_tables: pass xt_counters struct instead of packet counter
On SMP we overload the packet counter (unsigned long) to contain percpu offset. Hide this from callers and pass xt_counters address instead. Preparation patch to allocate the percpu counters in page-sized batch chunks. Signed-off-by: Florian Westphal <fw@strlen.de> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:

committed by
Pablo Neira Ayuso

szülő
679972f3be
commit
4d31eef517
@@ -430,11 +430,7 @@ static inline unsigned long xt_percpu_counter_alloc(void)
|
||||
|
||||
return 0;
|
||||
}
|
||||
static inline void xt_percpu_counter_free(u64 pcnt)
|
||||
{
|
||||
if (nr_cpu_ids > 1)
|
||||
free_percpu((void __percpu *) (unsigned long) pcnt);
|
||||
}
|
||||
void xt_percpu_counter_free(struct xt_counters *cnt);
|
||||
|
||||
static inline struct xt_counters *
|
||||
xt_get_this_cpu_counter(struct xt_counters *cnt)
|
||||
|
Reference in New Issue
Block a user