summaryrefslogtreecommitdiff
path: root/include/net/netfilter/nft_meta.h
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2015-11-28 21:53:05 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2015-12-09 13:23:13 +0100
commite639f7ab079b5256660018511d87aa34b54f1a9d (patch)
tree09f266f4a2ad558dced74ac4287a3277cccdc6be /include/net/netfilter/nft_meta.h
parent33d5a7b14bfd02e60af9d223db8dfff0cbcabe6b (diff)
netfilter: nf_tables: wrap tracing with a static key
Only needed when meta nftrace rule(s) were added. The assumption is that no such rules are active, so the call to nft_trace_init is "never" needed. When nftrace rules are active, we always call the nft_trace_* functions, but will only send netlink messages when all of the following are true: - traceinfo structure was initialised - skb->nf_trace == 1 - at least one subscriber to trace group. Adding an extra conditional (static_branch ... && skb->nf_trace) nft_trace_init( ..) Is possible but results in a larger nft_do_chain footprint. Signed-off-by: Florian Westphal <fw@strlen.de> Acked-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/net/netfilter/nft_meta.h')
-rw-r--r--include/net/netfilter/nft_meta.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/netfilter/nft_meta.h b/include/net/netfilter/nft_meta.h
index 711887a09e91..d27588c8dbd9 100644
--- a/include/net/netfilter/nft_meta.h
+++ b/include/net/netfilter/nft_meta.h
@@ -33,4 +33,7 @@ void nft_meta_set_eval(const struct nft_expr *expr,
struct nft_regs *regs,
const struct nft_pktinfo *pkt);
+void nft_meta_set_destroy(const struct nft_ctx *ctx,
+ const struct nft_expr *expr);
+
#endif