aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/gtpu/gtpu.h
diff options
context:
space:
mode:
authorJohn Lo <loj@cisco.com>2020-06-11 00:20:45 -0400
committerFlorin Coras <florin.coras@gmail.com>2020-06-16 07:25:30 +0000
commit9ebbb5c41620066d45915020569db9e4316450a5 (patch)
tree8529b395f4063e7b20064e4d2cb89fc9a39395e4 /src/plugins/gtpu/gtpu.h
parenta0e8d9669e980c673f5302e7bff0c06b31d46b56 (diff)
gtpu: support separate rx-decap and encap-tx teid values
Support separate local and remote TEIDs, with local (or RX) one used for GTPU tunnel RX/decap and remote (or TX) one used encap/TX. Updated current gtpu API to support seperate RX/TX TEIDs and added new gtpu_tunnel_update_tteid API to allow changing TX-TEID of an existing GTPU tunnel. The current tunnel field "teid" is used for RX-TEID and a new field "tteid" is used for TX-TEID. Type: improvement Signed-off-by: John Lo <loj@cisco.com> Change-Id: I549d79750a34bb965036da298c0ca894d15c2c20
Diffstat (limited to 'src/plugins/gtpu/gtpu.h')
-rw-r--r--src/plugins/gtpu/gtpu.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/plugins/gtpu/gtpu.h b/src/plugins/gtpu/gtpu.h
index 6a758ee6847..07616419070 100644
--- a/src/plugins/gtpu/gtpu.h
+++ b/src/plugins/gtpu/gtpu.h
@@ -135,8 +135,9 @@ typedef struct
/* FIB DPO for IP forwarding of gtpu encap packet */
dpo_id_t next_dpo;
- /* gtpu teid in HOST byte order */
+ /* gtpu local(rx) and remote(tx) TEIDs in HOST byte order */
u32 teid;
+ u32 tteid;
/* tunnel src and dst addresses */
ip46_address_t src;
@@ -248,21 +249,25 @@ u8 *format_gtpu_encap_trace (u8 * s, va_list * args);
typedef struct
{
- u8 is_add;
+ u8 opn;
+#define GTPU_DEL_TUNNEL 0
+#define GTPU_ADD_TUNNEL 1
+#define GTPU_UPD_TTEID 2
ip46_address_t src, dst;
u32 mcast_sw_if_index;
u32 encap_fib_index;
u32 decap_next_index;
- u32 teid;
-} vnet_gtpu_add_del_tunnel_args_t;
+ u32 teid; /* local or rx teid */
+ u32 tteid; /* remote or tx teid */
+} vnet_gtpu_add_mod_del_tunnel_args_t;
-int vnet_gtpu_add_del_tunnel
- (vnet_gtpu_add_del_tunnel_args_t * a, u32 * sw_if_indexp);
+int vnet_gtpu_add_mod_del_tunnel
+ (vnet_gtpu_add_mod_del_tunnel_args_t * a, u32 * sw_if_indexp);
typedef struct
{
u32 tunnel_index;
- u32 teid;
+ u32 tteid;
} gtpu_encap_trace_t;
void vnet_int_gtpu_bypass_mode (u32 sw_if_index, u8 is_ip6, u8 is_enable);