aboutsummaryrefslogtreecommitdiff
path: root/include/net/netfilter
diff options
context:
space:
mode:
authorGravatar Pablo Neira Ayuso <pablo@netfilter.org> 2021-03-24 02:30:47 +0100
committerGravatar David S. Miller <davem@davemloft.net> 2021-03-24 12:48:39 -0700
commit73f97025a972cd1506e8b1986264b2fb8833df7c (patch)
tree0960a6290c8c4bd67f4b1ffd991a91411e16b6f6 /include/net/netfilter
parentnetfilter: flowtable: add offload support for xmit path types (diff)
downloadlinux-73f97025a972cd1506e8b1986264b2fb8833df7c.tar.gz
linux-73f97025a972cd1506e8b1986264b2fb8833df7c.tar.bz2
linux-73f97025a972cd1506e8b1986264b2fb8833df7c.zip
netfilter: nft_flow_offload: use direct xmit if hardware offload is enabled
If there is a forward path to reach an ethernet device and hardware offload is enabled, then use the direct xmit path. Moreover, store the real device in the direct xmit path info since software datapath uses dev_hard_header() to push the layer encapsulation headers while hardware offload refers to the real device. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/netfilter')
-rw-r--r--include/net/netfilter/nf_flow_table.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/netfilter/nf_flow_table.h b/include/net/netfilter/nf_flow_table.h
index e34fd3eb4bb5..52afcee6e999 100644
--- a/include/net/netfilter/nf_flow_table.h
+++ b/include/net/netfilter/nf_flow_table.h
@@ -131,6 +131,7 @@ struct flow_offload_tuple {
struct dst_entry *dst_cache;
struct {
u32 ifidx;
+ u32 hw_ifidx;
u8 h_source[ETH_ALEN];
u8 h_dest[ETH_ALEN];
} out;
@@ -188,6 +189,7 @@ struct nf_flow_route {
} in;
struct {
u32 ifindex;
+ u32 hw_ifindex;
u8 h_source[ETH_ALEN];
u8 h_dest[ETH_ALEN];
} out;