aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/ioam/export-vxlan-gpe
diff options
context:
space:
mode:
authorAkshayaNadahalli <anadahal@cisco.com>2016-12-01 16:33:51 +0530
committerNeale Ranns <nranns@cisco.com>2017-02-13 08:36:59 +0000
commitfdd81af6afe6c782ad2c1a139210378badec626b (patch)
treeb562b391bded3afc0f5b4d0f83eceb20f2c8e772 /src/plugins/ioam/export-vxlan-gpe
parentfed79e83910459ed700615d2a5a24024f835a66c (diff)
VPP-632 : InBand OAM Analyser
Refer to jira ticket for more details. Change-Id: I6facb9ef8553a21464f9a2e612706f152badbb68 Signed-off-by: AkshayaNadahalli <anadahal@cisco.com>
Diffstat (limited to 'src/plugins/ioam/export-vxlan-gpe')
-rw-r--r--src/plugins/ioam/export-vxlan-gpe/vxlan_gpe_ioam_export.c5
-rw-r--r--src/plugins/ioam/export-vxlan-gpe/vxlan_gpe_node.c11
2 files changed, 14 insertions, 2 deletions
diff --git a/src/plugins/ioam/export-vxlan-gpe/vxlan_gpe_ioam_export.c b/src/plugins/ioam/export-vxlan-gpe/vxlan_gpe_ioam_export.c
index 0924d68f6ff..f05b5303d3c 100644
--- a/src/plugins/ioam/export-vxlan-gpe/vxlan_gpe_ioam_export.c
+++ b/src/plugins/ioam/export-vxlan-gpe/vxlan_gpe_ioam_export.c
@@ -83,6 +83,8 @@ do { \
#define foreach_vxlan_gpe_ioam_export_plugin_api_msg \
_(VXLAN_GPE_IOAM_EXPORT_ENABLE_DISABLE, vxlan_gpe_ioam_export_enable_disable)
+ioam_export_main_t vxlan_gpe_ioam_export_main;
+
extern void vxlan_gpe_set_next_override (uword next);
/* Action function shared between message handler and debug CLI */
int
@@ -242,6 +244,8 @@ vxlan_gpe_ioam_export_init (vlib_main_t * vm)
clib_error_t *error = 0;
u8 *name;
+ em->set_id = IPFIX_VXLAN_IOAM_EXPORT_ID;
+
name = format (0, "vxlan_gpe_ioam_export_%08x%c", api_version, 0);
/* Ask for a correctly-sized block of API message decode slots */
@@ -254,6 +258,7 @@ vxlan_gpe_ioam_export_init (vlib_main_t * vm)
em->my_hbh_slot = ~0;
em->vlib_main = vm;
em->vnet_main = vnet_get_main ();
+ ioam_export_reset_next_node (em);
vec_free (name);
return error;
diff --git a/src/plugins/ioam/export-vxlan-gpe/vxlan_gpe_node.c b/src/plugins/ioam/export-vxlan-gpe/vxlan_gpe_node.c
index f75b7081c09..8120f4a768d 100644
--- a/src/plugins/ioam/export-vxlan-gpe/vxlan_gpe_node.c
+++ b/src/plugins/ioam/export-vxlan-gpe/vxlan_gpe_node.c
@@ -17,9 +17,9 @@
#include <vnet/pg/pg.h>
#include <vppinfra/error.h>
#include <vnet/ip/ip.h>
-#include <ioam/export-common/ioam_export.h>
#include <vnet/vxlan-gpe/vxlan_gpe.h>
#include <vnet/vxlan-gpe/vxlan_gpe_packet.h>
+#include <ioam/export-common/ioam_export.h>
typedef struct
{
@@ -121,6 +121,12 @@ copy3cachelines (void *dst, const void *src, size_t n)
#endif
}
+static void
+vxlan_gpe_export_fixup_func (vlib_buffer_t * export_buf,
+ vlib_buffer_t * pak_buf)
+{
+ /* Todo: on implementing VXLAN GPE analyse */
+}
static uword
vxlan_gpe_export_node_fn (vlib_main_t * vm,
@@ -129,7 +135,8 @@ vxlan_gpe_export_node_fn (vlib_main_t * vm,
ioam_export_main_t *em = &vxlan_gpe_ioam_export_main;
ioam_export_node_common (em, vm, node, frame, ip4_header_t, length,
ip_version_and_header_length,
- EXPORT_NEXT_VXLAN_GPE_INPUT);
+ EXPORT_NEXT_VXLAN_GPE_INPUT,
+ vxlan_gpe_export_fixup_func);
return frame->n_vectors;
}