summaryrefslogtreecommitdiffstats
path: root/src/plugins/gtpu/gtpu.h
diff options
context:
space:
mode:
authorChenmin Sun <chenmin.sun@intel.com>2020-02-17 02:19:15 +0800
committerDamjan Marion <dmarion@me.com>2020-02-17 12:32:59 +0000
commit00fdf53c7076d1bd0045439e73f0144d613eb09c (patch)
tree1d2214e4d401d4b74dd9295ad9040447f29bcc41 /src/plugins/gtpu/gtpu.h
parent4dc5a43f4871c3f0a88ad0bb9041332bf3b03f1b (diff)
gtpu: offload RX flow
ip4 gtpu cli/api (using flow infra) to create flows and enable them on different hardware (currently tested with ice) to offload a gtpu tunnel onto hw: set flow-offload gtpu hw TwentyFiveGigabitEthernet3/0/0 rx gtpu_tunnel0 to remove offload: set flow-offload gtpu hw TwentyFiveGigabitEthernet3/0/0 rx gtpu_tunnel0 del TODO:ipv6 handling Type: feature Signed-off-by: Chenmin Sun <chenmin.sun@intel.com> Change-Id: I8e356feeb0b16cfeadc1bbbe92f773aa2916e715
Diffstat (limited to 'src/plugins/gtpu/gtpu.h')
-rw-r--r--src/plugins/gtpu/gtpu.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/plugins/gtpu/gtpu.h b/src/plugins/gtpu/gtpu.h
index dc36308d8a8..1d47f2d1b93 100644
--- a/src/plugins/gtpu/gtpu.h
+++ b/src/plugins/gtpu/gtpu.h
@@ -81,7 +81,7 @@ typedef CLIB_PACKED(struct
{
ip4_header_t ip4; /* 20 bytes */
udp_header_t udp; /* 8 bytes */
- gtpu_header_t gtpu; /* 8 bytes */
+ gtpu_header_t gtpu; /* 12 bytes */
}) ip4_gtpu_header_t;
/* *INDENT-ON* */
@@ -173,6 +173,8 @@ typedef struct
* The tunnels sibling index on the FIB entry's dependency list.
*/
u32 sibling_index;
+
+ u32 flow_index; /* infra flow index */
} gtpu_tunnel_t;
#define foreach_gtpu_input_next \
@@ -231,6 +233,7 @@ typedef struct
/* convenience */
vlib_main_t *vlib_main;
vnet_main_t *vnet_main;
+ u32 flow_id_start;
} gtpu_main_t;
extern gtpu_main_t gtpu_main;
@@ -239,6 +242,7 @@ extern vlib_node_registration_t gtpu4_input_node;
extern vlib_node_registration_t gtpu6_input_node;
extern vlib_node_registration_t gtpu4_encap_node;
extern vlib_node_registration_t gtpu6_encap_node;
+extern vlib_node_registration_t gtpu4_flow_input_node;
u8 *format_gtpu_encap_trace (u8 * s, va_list * args);
@@ -262,6 +266,9 @@ typedef struct
} gtpu_encap_trace_t;
void vnet_int_gtpu_bypass_mode (u32 sw_if_index, u8 is_ip6, u8 is_enable);
+u32 vnet_gtpu_get_tunnel_index (u32 sw_if_index);
+int vnet_gtpu_add_del_rx_flow (u32 hw_if_index, u32 t_imdex, int is_add);
+
#endif /* included_vnet_gtpu_h */