summaryrefslogtreecommitdiffstats
path: root/plugins/ioam-plugin/ioam/lib-vxlan-gpe/vxlan_gpe_ioam_trace.c
diff options
context:
space:
mode:
authorVengada Govindan <venggovi@cisco.com>2016-12-13 21:59:54 -0800
committerDamjan Marion <dmarion.lists@gmail.com>2016-12-21 17:52:33 +0000
commit7e4edc8d1ee9ae26747cf6ec23b76b78f0f550da (patch)
tree4ba527cdb747846bc62b97dcb340bab04b776968 /plugins/ioam-plugin/ioam/lib-vxlan-gpe/vxlan_gpe_ioam_trace.c
parentfff67c89c5135263989c48b9ed923eb785efa67e (diff)
VPP-470: Introduce VxLAN-GPE as transport for iOAM.
This is the second of the two commits. This commit introduces VxLAN-GPE transit functionality. Change-Id: I12f13e00f456df0047f2b7a0737addfeb683c420 Signed-off-by: Vengada Govindan <venggovi@cisco.com>
Diffstat (limited to 'plugins/ioam-plugin/ioam/lib-vxlan-gpe/vxlan_gpe_ioam_trace.c')
-rw-r--r--plugins/ioam-plugin/ioam/lib-vxlan-gpe/vxlan_gpe_ioam_trace.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/ioam-plugin/ioam/lib-vxlan-gpe/vxlan_gpe_ioam_trace.c b/plugins/ioam-plugin/ioam/lib-vxlan-gpe/vxlan_gpe_ioam_trace.c
index a10e85a7..e37b1642 100644
--- a/plugins/ioam-plugin/ioam/lib-vxlan-gpe/vxlan_gpe_ioam_trace.c
+++ b/plugins/ioam-plugin/ioam/lib-vxlan-gpe/vxlan_gpe_ioam_trace.c
@@ -288,7 +288,11 @@ vxlan_gpe_ioam_trace_data_list_handler (vlib_buffer_t * b,
if (trace->ioam_trace_type & BIT_TTL_NODEID)
{
ip4_header_t *ip0 = vlib_buffer_get_current (b);
- *elt = clib_host_to_net_u32 (((ip0->ttl - 1) << 24) |
+ /* The transit case is the only case where the TTL decrement happens
+ * before iOAM processing. For now, use the use_adj flag as an overload.
+ * We can probably use a separate flag instead of overloading the use_adj flag.
+ */
+ *elt = clib_host_to_net_u32 (((ip0->ttl - 1 + use_adj) << 24) |
profile->node_id);
elt++;
}