diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2021-04-01 22:25:24 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2021-04-03 19:41:02 +0200 |
commit | 31a57f195f1cda03741a18c3393b7bebddaacf1c (patch) | |
tree | ac8b1e69b5a3c338a3495b2ed5f162cace7848e1 /src/netlink.c | |
parent | a3ac2527724dd27628e12caaa55f731b109e4586 (diff) |
evaluate: use chain hashtable for lookups
Instead of the linear list lookup.
Before this patch:
real 0m21,735s
user 0m20,329s
sys 0m1,384s
After:
real 0m10,910s
user 0m9,448s
sys 0m1,434s
chain_lookup() is removed since linear list lookups are only used by the
fuzzy chain name matching for error reporting.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/netlink.c')
-rw-r--r-- | src/netlink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/netlink.c b/src/netlink.c index 97ae88c7..89d224ed 100644 --- a/src/netlink.c +++ b/src/netlink.c @@ -1749,7 +1749,7 @@ static struct rule *trace_lookup_rule(const struct nftnl_trace *nlt, if (!table) return NULL; - chain = chain_lookup(table, &h); + chain = chain_cache_find(table, &h); if (!chain) return NULL; |