From 31a57f195f1cda03741a18c3393b7bebddaacf1c Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Thu, 1 Apr 2021 22:25:24 +0200 Subject: 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 --- src/netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/netlink.c') 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; -- cgit v1.2.3