aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/vxlan/vxlan.h
diff options
context:
space:
mode:
authorJon Loeliger <jdl@netgate.com>2018-02-01 16:36:12 -0600
committerJohn Lo <loj@cisco.com>2018-02-07 19:24:56 +0000
commit3d460bd9bed8e1b77609ef404018ecfac7c29e9e (patch)
tree2d4d9f2058f6bb0c5ef8142432884a6333b05224 /src/vnet/vxlan/vxlan.h
parentfe99a7eeb996633051942b6555b4806592dd8ad0 (diff)
VXLAN: Allow user to specify a custom vxlan tunnel instance id.
If one is not selected by the user, the next available id will be allocated, thus maintaining backward compatibility. Change-Id: I4691ed0638b8072f9cfa9f20b9fe4f981e708800 Signed-off-by: Jon Loeliger <jdl@netgate.com>
Diffstat (limited to 'src/vnet/vxlan/vxlan.h')
-rw-r--r--src/vnet/vxlan/vxlan.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/vnet/vxlan/vxlan.h b/src/vnet/vxlan/vxlan.h
index f428ee54d78..e50ff6b169e 100644
--- a/src/vnet/vxlan/vxlan.h
+++ b/src/vnet/vxlan/vxlan.h
@@ -111,6 +111,9 @@ typedef struct {
* The tunnels sibling index on the FIB entry's dependency list.
*/
u32 sibling_index;
+
+ u32 dev_instance; /* Real device instance in tunnel vector */
+ u32 user_instance; /* Instance name being shown to user */
} vxlan_tunnel_t;
#define foreach_vxlan_input_next \
@@ -156,6 +159,9 @@ typedef struct {
/* convenience */
vlib_main_t * vlib_main;
vnet_main_t * vnet_main;
+
+ /* Record used instances */
+ uword *instance_used;
} vxlan_main_t;
extern vxlan_main_t vxlan_main;
@@ -173,6 +179,7 @@ typedef struct {
/* we normally use is_ip4, but since this adds to the
* structure, this seems less of abreaking change */
u8 is_ip6;
+ u32 instance;
ip46_address_t src, dst;
u32 mcast_sw_if_index;
u32 encap_fib_index;
@@ -186,3 +193,9 @@ int vnet_vxlan_add_del_tunnel
void vnet_int_vxlan_bypass_mode
(u32 sw_if_index, u8 is_ip6, u8 is_enable);
#endif /* included_vnet_vxlan_h */
+
+/*
+ * Local Variables:
+ * eval: (c-set-style "gnu")
+ * End:
+ */