diff options
author | Phil Sutter <phil@nwl.cc> | 2021-11-29 15:28:33 +0100 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2021-12-03 12:50:18 +0100 |
commit | a37212f2fd90739e17f3dbb96ea6284d7755bf5f (patch) | |
tree | c508b297db88ff2e2ff0e76f408173c0b33041d6 /include/netlink.h | |
parent | 49ac868a0d5b99bad5dbf5603ebf02237a37459d (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/netlink.h')
-rw-r--r-- | include/netlink.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/netlink.h b/include/netlink.h index a692edcd..0e439061 100644 --- a/include/netlink.h +++ b/include/netlink.h @@ -135,7 +135,8 @@ extern int netlink_list_chains(struct netlink_ctx *ctx, const struct handle *h); extern struct chain *netlink_delinearize_chain(struct netlink_ctx *ctx, const struct nftnl_chain *nlc); -extern int netlink_list_tables(struct netlink_ctx *ctx, const struct handle *h); +extern int netlink_list_tables(struct netlink_ctx *ctx, const struct handle *h, + const struct nft_cache_filter *filter); extern struct table *netlink_delinearize_table(struct netlink_ctx *ctx, const struct nftnl_table *nlt); |