]> git.baikalelectronics.ru Git - kernel.git/commit
[NETFILTER]: x_tables: struct xt_table_info diet
authorEric Dumazet <dada1@cosmosbay.com>
Wed, 5 Dec 2007 07:24:56 +0000 (23:24 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 22:55:54 +0000 (14:55 -0800)
commitd308e3a99325f06cc8ae1c904171368a94d7e9ad
tree8d3d335b3f16834e6374a125f449db383306961d
parent2273e51620d18f56f162da10599f70983cabb592
[NETFILTER]: x_tables: struct xt_table_info diet

Instead of using a big array of NR_CPUS entries, we can compute the size
needed at runtime, using nr_cpu_ids

This should save some ram (especially on David's machines where NR_CPUS=4096 :
32 KB can be saved per table, and 64KB for dynamically allocated ones (because
of slab/slub alignements) )

In particular, the 'bootstrap' tables are not any more static (in data
section) but on stack as their size is now very small.

This also should reduce the size used on stack in compat functions
(get_info() declares an automatic variable, that could be bigger than kernel
stack size for big NR_CPUS)

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netfilter/x_tables.h
net/ipv4/netfilter/arp_tables.c
net/ipv4/netfilter/ip_tables.c
net/ipv6/netfilter/ip6_tables.c
net/netfilter/x_tables.c