summaryrefslogtreecommitdiff
path: root/include/net/netfilter/nf_tables.h
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2021-04-15 21:10:18 +0300
committerPablo Neira Ayuso <pablo@netfilter.org>2021-04-18 23:04:49 +0300
commitb72920f6e4a9d6607b723d69b7f412c829769c75 (patch)
treeba27ac40ee59d6d83365ff1ce05f38933b7a5037 /include/net/netfilter/nf_tables.h
parent8826218215de1aae9d89a6ea8d3786f224711334 (diff)
downloadlinux-b72920f6e4a9d6607b723d69b7f412c829769c75.tar.xz
netfilter: nftables: counter hardware offload support
This patch adds the .offload_stats operation to synchronize hardware stats with the expression data. Update the counter expression to use this new interface. The hardware stats are retrieved from the netlink dump path via FLOW_CLS_STATS command to the driver. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/net/netfilter/nf_tables.h')
-rw-r--r--include/net/netfilter/nf_tables.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h
index f0f7a3c5da6a..4a75da2a2e1d 100644
--- a/include/net/netfilter/nf_tables.h
+++ b/include/net/netfilter/nf_tables.h
@@ -867,6 +867,8 @@ struct nft_expr_ops {
int (*offload)(struct nft_offload_ctx *ctx,
struct nft_flow_rule *flow,
const struct nft_expr *expr);
+ void (*offload_stats)(struct nft_expr *expr,
+ const struct flow_stats *stats);
u32 offload_flags;
const struct nft_expr_type *type;
void *data;