diff options
author | John Lo <loj@cisco.com> | 2020-06-11 00:20:45 -0400 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2020-06-16 07:25:30 +0000 |
commit | 9ebbb5c41620066d45915020569db9e4316450a5 (patch) | |
tree | 8529b395f4063e7b20064e4d2cb89fc9a39395e4 /src/plugins/gtpu/gtpu_encap.c | |
parent | a0e8d9669e980c673f5302e7bff0c06b31d46b56 (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_encap.c')
-rw-r--r-- | src/plugins/gtpu/gtpu_encap.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/gtpu/gtpu_encap.c b/src/plugins/gtpu/gtpu_encap.c index e6b2ce589d0..4b7d98786f4 100644 --- a/src/plugins/gtpu/gtpu_encap.c +++ b/src/plugins/gtpu/gtpu_encap.c @@ -465,7 +465,7 @@ gtpu_encap_inline (vlib_main_t * vm, gtpu_encap_trace_t *tr = vlib_add_trace (vm, node, b0, sizeof (*tr)); tr->tunnel_index = t0 - gtm->tunnels; - tr->teid = t0->teid; + tr->tteid = t0->tteid; } if (PREDICT_FALSE(b1->flags & VLIB_BUFFER_IS_TRACED)) @@ -473,7 +473,7 @@ gtpu_encap_inline (vlib_main_t * vm, gtpu_encap_trace_t *tr = vlib_add_trace (vm, node, b1, sizeof (*tr)); tr->tunnel_index = t1 - gtm->tunnels; - tr->teid = t1->teid; + tr->tteid = t1->tteid; } if (PREDICT_FALSE(b2->flags & VLIB_BUFFER_IS_TRACED)) @@ -481,7 +481,7 @@ gtpu_encap_inline (vlib_main_t * vm, gtpu_encap_trace_t *tr = vlib_add_trace (vm, node, b2, sizeof (*tr)); tr->tunnel_index = t2 - gtm->tunnels; - tr->teid = t2->teid; + tr->tteid = t2->tteid; } if (PREDICT_FALSE(b3->flags & VLIB_BUFFER_IS_TRACED)) @@ -489,7 +489,7 @@ gtpu_encap_inline (vlib_main_t * vm, gtpu_encap_trace_t *tr = vlib_add_trace (vm, node, b3, sizeof (*tr)); tr->tunnel_index = t3 - gtm->tunnels; - tr->teid = t3->teid; + tr->tteid = t3->tteid; } vlib_validate_buffer_enqueue_x4 (vm, node, next_index, @@ -643,7 +643,7 @@ gtpu_encap_inline (vlib_main_t * vm, gtpu_encap_trace_t *tr = vlib_add_trace (vm, node, b0, sizeof (*tr)); tr->tunnel_index = t0 - gtm->tunnels; - tr->teid = t0->teid; + tr->tteid = t0->tteid; } vlib_validate_buffer_enqueue_x1 (vm, node, next_index, to_next, n_left_to_next, |