]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
netfilter: conntrack: remove prealloc support
authorFlorian Westphal <fw@strlen.de>
Thu, 20 Apr 2017 07:54:22 +0000 (09:54 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 26 Apr 2017 07:30:22 +0000 (09:30 +0200)
commit54044b1f0204da158a6a395bd02b63bb02ffff98
tree253f70f735091ea2e9490f1c93e58d6e05fc0ed3
parent495dcb56d09ddb63afe30e799af41876c3f061cc
netfilter: conntrack: remove prealloc support

It was used by the nat extension, but since commit
7c9664351980 ("netfilter: move nat hlist_head to nf_conn") its only needed
for connections that use MASQUERADE target or a nat helper.

Also it seems a lot easier to preallocate a fixed size instead.

With default settings, conntrack first adds ecache extension (sysctl
defaults to 1), so we get 40(ct extension header) + 24 (ecache) == 64 byte
on x86_64 for initial allocation.

Followup patches can constify the extension structs and avoid
the initial zeroing of the entire extension area.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/net/netfilter/nf_conntrack_extend.h
net/netfilter/nf_conntrack_extend.c
net/netfilter/nf_nat_core.c