summaryrefslogtreecommitdiffstats
path: root/include/mnl.h
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2021-11-29 15:28:33 +0100
committerPhil Sutter <phil@nwl.cc>2021-12-03 12:50:18 +0100
commita37212f2fd90739e17f3dbb96ea6284d7755bf5f (patch)
treec508b297db88ff2e2ff0e76f408173c0b33041d6 /include/mnl.h
parent49ac868a0d5b99bad5dbf5603ebf02237a37459d (diff)
cache: Filter tables on kernel side
Instead of requesting a dump of all tables and filtering the data in user space, construct a non-dump request if filter contains a table so kernel returns only that single table. This should improve nft performance in rulesets with many tables present. Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'include/mnl.h')
-rw-r--r--include/mnl.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/mnl.h b/include/mnl.h
index 68ec80cd..344030f3 100644
--- a/include/mnl.h
+++ b/include/mnl.h
@@ -50,7 +50,7 @@ int mnl_nft_table_add(struct netlink_ctx *ctx, struct cmd *cmd,
int mnl_nft_table_del(struct netlink_ctx *ctx, struct cmd *cmd);
struct nftnl_table_list *mnl_nft_table_dump(struct netlink_ctx *ctx,
- int family);
+ int family, const char *table);
int mnl_nft_set_add(struct netlink_ctx *ctx, struct cmd *cmd,
unsigned int flags);