aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter/xt_connlimit.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2008-01-31 04:39:23 -0800
committerDavid S. Miller <davem@davemloft.net>2008-01-31 19:27:55 -0800
commitba419aff2cda91680e5d4d3eeff95df49bd2edec (patch)
tree6bb05d94dad612ec084ebb1c9089d06357e1e0a6 /net/netfilter/xt_connlimit.c
parentf8ba1affa18398610e765736153fff614309ccc8 (diff)
downloadkernel_samsung_smdk4412-ba419aff2cda91680e5d4d3eeff95df49bd2edec.zip
kernel_samsung_smdk4412-ba419aff2cda91680e5d4d3eeff95df49bd2edec.tar.gz
kernel_samsung_smdk4412-ba419aff2cda91680e5d4d3eeff95df49bd2edec.tar.bz2
[NETFILTER]: nf_conntrack: optimize __nf_conntrack_find()
Ignoring specific entries in __nf_conntrack_find() is only needed by NAT for nf_conntrack_tuple_taken(). Remove it from __nf_conntrack_find() and make nf_conntrack_tuple_taken() search the hash itself. Saves 54 bytes of text in the hotpath on x86_64: __nf_conntrack_find | -54 # 321 -> 267, # inlines: 3 -> 2, size inlines: 181 -> 127 nf_conntrack_tuple_taken | +305 # 15 -> 320, lexblocks: 0 -> 3, # inlines: 0 -> 3, size inlines: 0 -> 181 nf_conntrack_find_get | -2 # 90 -> 88 3 functions changed, 305 bytes added, 56 bytes removed, diff: +249 Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netfilter/xt_connlimit.c')
-rw-r--r--net/netfilter/xt_connlimit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/xt_connlimit.c b/net/netfilter/xt_connlimit.c
index f9b59a6..3b01119 100644
--- a/net/netfilter/xt_connlimit.c
+++ b/net/netfilter/xt_connlimit.c
@@ -124,7 +124,7 @@ static int count_them(struct xt_connlimit_data *data,
/* check the saved connections */
list_for_each_entry_safe(conn, tmp, hash, list) {
- found = __nf_conntrack_find(&conn->tuple, NULL);
+ found = __nf_conntrack_find(&conn->tuple);
found_ct = NULL;
if (found != NULL)