netfilter: nft_{fwd,dup}_netdev: add offload support
authorPablo Neira Ayuso <pablo@netfilter.org>
Sun, 8 Sep 2019 17:32:05 +0000 (19:32 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 10 Sep 2019 20:44:29 +0000 (22:44 +0200)
commitbe2861dc36d77ff3778979b9c3c79ada4affa131
treeabc52830f01ce72c2a9c848e5b047a4cbe5849d2
parentee394f96ad7517fbc0de9106dcc7ce9efb14f264
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>
include/net/netfilter/nf_dup_netdev.h
include/net/netfilter/nf_tables_offload.h
net/netfilter/nf_dup_netdev.c
net/netfilter/nf_tables_api.c
net/netfilter/nf_tables_offload.c
net/netfilter/nft_dup_netdev.c
net/netfilter/nft_fwd_netdev.c