netfilter: nf_nat: don't check if the tuple is unique when there isn't any other...
authorChangli Gao <xiaosuo@gmail.com>
Mon, 2 Aug 2010 15:35:49 +0000 (17:35 +0200)
committerPatrick McHardy <kaber@trash.net>
Mon, 2 Aug 2010 15:35:49 +0000 (17:35 +0200)
commit2452a99dc0496a90abd0090c280671370c0f3e1c
tree695cfb4bff794c4815f8d55e89426107ad3699de
parentf43dc98b3be36551143e3bbaf1bb3067835c24f4
netfilter: nf_nat: don't check if the tuple is unique when there isn't any other choice

The tuple got from unique_tuple() doesn't need to be really unique, so the
check for the unique tuple isn't necessary, when there isn't any other
choice. Eliminating the unnecessary nf_nat_used_tuple() can save some CPU
cycles too.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
net/ipv4/netfilter/nf_nat_proto_common.c
net/ipv4/netfilter/nf_nat_proto_gre.c
net/ipv4/netfilter/nf_nat_proto_icmp.c