From a37212f2fd90739e17f3dbb96ea6284d7755bf5f Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Mon, 29 Nov 2021 15:28:33 +0100 Subject: 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 --- include/mnl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/mnl.h') 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); -- cgit v1.2.3