summaryrefslogtreecommitdiffstats
path: root/plugins/ioam-plugin/ioam/lib-vxlan-gpe/vxlan_gpe_ioam.h
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.h
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.h')
-rw-r--r--plugins/ioam-plugin/ioam/lib-vxlan-gpe/vxlan_gpe_ioam.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/plugins/ioam-plugin/ioam/lib-vxlan-gpe/vxlan_gpe_ioam.h b/plugins/ioam-plugin/ioam/lib-vxlan-gpe/vxlan_gpe_ioam.h
index ac824809b4f..3b7d72cf0c4 100644
--- a/plugins/ioam-plugin/ioam/lib-vxlan-gpe/vxlan_gpe_ioam.h
+++ b/plugins/ioam-plugin/ioam/lib-vxlan-gpe/vxlan_gpe_ioam.h
@@ -21,8 +21,27 @@
#include <vnet/ip/ip.h>
+typedef struct vxlan_gpe_sw_interface_
+{
+ u32 sw_if_index;
+} vxlan_gpe_ioam_sw_interface_t;
+
+typedef struct vxlan_gpe_dest_tunnels_
+{
+ ip46_address_t dst_addr;
+ u32 fp_proto;
+ u32 sibling_index;
+ fib_node_index_t fib_entry_index;
+ u32 outer_fib_index;
+} vxlan_gpe_ioam_dest_tunnels_t;
+
typedef struct vxlan_gpe_ioam_main_
{
+ /**
+ * Linkage into the FIB object graph
+ */
+ fib_node_t node;
+
/* time scale transform. Joy. */
u32 unix_time_0;
f64 vlib_time_0;
@@ -65,6 +84,18 @@ typedef struct vxlan_gpe_ioam_main_
uword encap_v4_next_node;
uword encap_v6_next_node;
+ /* Software interfaces. */
+ vxlan_gpe_ioam_sw_interface_t *sw_interfaces;
+
+ /* hash ip4/ip6 -> list of destinations for doing transit iOAM operation */
+ vxlan_gpe_ioam_dest_tunnels_t *dst_tunnels;
+ uword *dst_by_ip4;
+ uword *dst_by_ip6;
+
+ /** per sw_if_index, to maintain bitmap */
+ u8 *bool_ref_by_sw_if_index;
+ fib_node_type_t fib_entry_type;
+
/** State convenience vlib_main_t */
vlib_main_t *vlib_main;
/** State convenience vnet_main_t */
@@ -87,6 +118,7 @@ typedef struct
vlib_node_registration_t vxlan_gpe_encap_ioam_v4_node;
vlib_node_registration_t vxlan_gpe_decap_ioam_v4_node;
+vlib_node_registration_t vxlan_gpe_transit_ioam_v4_node;
clib_error_t *vxlan_gpe_ioam_enable (int has_trace_option, int has_pot_option,
int has_ppc_option);
@@ -123,6 +155,15 @@ int vxlan_gpe_ioam_unregister_option (u8 option);
int vxlan_gpe_trace_profile_setup (void);
int vxlan_gpe_trace_profile_cleanup (void);
+extern void vxlan_gpe_ioam_interface_init (void);
+int
+vxlan_gpe_enable_disable_ioam_for_dest (vlib_main_t * vm,
+ ip46_address_t dst_addr,
+ u32 outer_fib_index,
+ u8 is_ipv4, u8 is_add);
+int vxlan_gpe_ioam_disable_for_dest
+ (vlib_main_t * vm, ip46_address_t dst_addr, u32 outer_fib_index,
+ u8 ipv4_set);
typedef enum
{