aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/net/netfilter/nf_flow_table.h
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2021-03-24 02:30:38 +0100
committerDavid S. Miller <davem@davemloft.net>2021-03-24 12:48:39 -0700
commit5139c0c007250c01c61337d584db4072c4786bf6 (patch)
tree80d01592f8ad704f19df3c297a05d6aca9f617a2 /include/net/netfilter/nf_flow_table.h
parentnet: dsa: resolve forwarding path for dsa slave ports (diff)
downloadwireguard-linux-5139c0c007250c01c61337d584db4072c4786bf6.tar.xz
wireguard-linux-5139c0c007250c01c61337d584db4072c4786bf6.zip
netfilter: flowtable: add xmit path types
Add the xmit_type field that defines the two supported xmit paths in the flowtable data plane, which are the neighbour and the xfrm xmit paths. This patch prepares for new flowtable xmit path types to come. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/netfilter/nf_flow_table.h')
-rw-r--r--include/net/netfilter/nf_flow_table.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/net/netfilter/nf_flow_table.h b/include/net/netfilter/nf_flow_table.h
index fb165697c8a1..828fcfbd5e6f 100644
--- a/include/net/netfilter/nf_flow_table.h
+++ b/include/net/netfilter/nf_flow_table.h
@@ -89,6 +89,11 @@ enum flow_offload_tuple_dir {
};
#define FLOW_OFFLOAD_DIR_MAX IP_CT_DIR_MAX
+enum flow_offload_xmit_type {
+ FLOW_OFFLOAD_XMIT_NEIGH = 0,
+ FLOW_OFFLOAD_XMIT_XFRM,
+};
+
struct flow_offload_tuple {
union {
struct in_addr src_v4;
@@ -111,7 +116,8 @@ struct flow_offload_tuple {
/* All members above are keys for lookups, see flow_offload_hash(). */
struct { } __hash;
- u8 dir;
+ u8 dir:6,
+ xmit_type:2;
u16 mtu;
@@ -158,7 +164,8 @@ static inline __s32 nf_flow_timeout_delta(unsigned int timeout)
struct nf_flow_route {
struct {
- struct dst_entry *dst;
+ struct dst_entry *dst;
+ enum flow_offload_xmit_type xmit_type;
} tuple[FLOW_OFFLOAD_DIR_MAX];
};