]> git.baikalelectronics.ru Git - kernel.git/commit
inet netfilter: Prefer state->hook to ops->hooknum
authorEric W. Biederman <ebiederm@xmission.com>
Fri, 18 Sep 2015 19:32:56 +0000 (14:32 -0500)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 18 Sep 2015 19:57:51 +0000 (21:57 +0200)
commit07dd9f280bac6bbc2bf5cced019843b266aa2818
tree47f20ac57ed1c46f3f0e7f6cb29195d94dcaf689
parentebf045c03ad570db7fecd8b06db63fcacf8f98b7
inet netfilter: Prefer state->hook to ops->hooknum

The values of nf_hook_state.hook and nf_hook_ops.hooknum must be the
same by definition.

We are more likely to access the fields in nf_hook_state over the
fields in nf_hook_ops so with a little luck this results in
fewer cache line misses, and slightly more consistent code.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
net/ipv4/netfilter/nf_defrag_ipv4.c
net/ipv4/netfilter/nf_nat_l3proto_ipv4.c
net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c
net/ipv6/netfilter/nf_defrag_ipv6_hooks.c
net/ipv6/netfilter/nf_nat_l3proto_ipv6.c