summaryrefslogtreecommitdiff
path: root/include/net/netfilter/nf_dup_netdev.h
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2019-09-08 19:32:05 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2019-09-10 22:44:29 +0200
commitbe2861dc36d77ff3778979b9c3c79ada4affa131 (patch)
treeabc52830f01ce72c2a9c848e5b047a4cbe5849d2 /include/net/netfilter/nf_dup_netdev.h
parentee394f96ad7517fbc0de9106dcc7ce9efb14f264 (diff)
netfilter: nft_{fwd,dup}_netdev: add offload support
This patch adds support for packet mirroring and redirection. The nft_fwd_dup_netdev_offload() function configures the flow_action object for the fwd and the dup actions. Extend nft_flow_rule_destroy() to release the net_device object when the flow_rule object is released, since nft_fwd_dup_netdev_offload() bumps the net_device reference counter. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Acked-by: wenxu <wenxu@ucloud.cn>
Diffstat (limited to 'include/net/netfilter/nf_dup_netdev.h')
-rw-r--r--include/net/netfilter/nf_dup_netdev.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/net/netfilter/nf_dup_netdev.h b/include/net/netfilter/nf_dup_netdev.h
index 181672672160..b175d271aec9 100644
--- a/include/net/netfilter/nf_dup_netdev.h
+++ b/include/net/netfilter/nf_dup_netdev.h
@@ -7,4 +7,10 @@
void nf_dup_netdev_egress(const struct nft_pktinfo *pkt, int oif);
void nf_fwd_netdev_egress(const struct nft_pktinfo *pkt, int oif);
+struct nft_offload_ctx;
+struct nft_flow_rule;
+
+int nft_fwd_dup_netdev_offload(struct nft_offload_ctx *ctx,
+ struct nft_flow_rule *flow,
+ enum flow_action_id id, int oif);
#endif