summaryrefslogtreecommitdiffstats
path: root/src/vnet/vxlan/vxlan.c
diff options
context:
space:
mode:
authorJohn Lo <loj@cisco.com>2018-02-15 15:47:53 -0500
committerDamjan Marion <dmarion.lists@gmail.com>2018-02-16 08:10:06 +0000
commit25d417f28680c78a709792d997884dd80227bb70 (patch)
treeb687b43388065d9763ecb1d2d6d8683909e2e38a /src/vnet/vxlan/vxlan.c
parent9fa5cf46690601e4e25605d548671c84634363e3 (diff)
Minor VXLAN/GRE Tunnel Encap Optimization and Cleanup
Change-Id: I62a2a6524b72115a4239fbd7dc9ac8fdc35e20ed Signed-off-by: John Lo <loj@cisco.com>
Diffstat (limited to 'src/vnet/vxlan/vxlan.c')
-rw-r--r--src/vnet/vxlan/vxlan.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/vnet/vxlan/vxlan.c b/src/vnet/vxlan/vxlan.c
index b34c00d738c..2aec321c8e2 100644
--- a/src/vnet/vxlan/vxlan.c
+++ b/src/vnet/vxlan/vxlan.c
@@ -54,17 +54,10 @@ static u8 * format_decap_next (u8 * s, va_list * args)
u8 * format_vxlan_tunnel (u8 * s, va_list * args)
{
vxlan_tunnel_t * t = va_arg (*args, vxlan_tunnel_t *);
- vxlan_main_t * ngm = &vxlan_main;
- u32 dev_instance;
- u32 user_instance;
-
- dev_instance = t - ngm->tunnels;
- user_instance = t->user_instance;
s = format (s,
"[%d] instance %d src %U dst %U vni %d fib-idx %d sw-if-idx %d ",
- dev_instance,
- user_instance,
+ t->dev_instance, t->user_instance,
format_ip46_address, &t->src, IP46_TYPE_ANY,
format_ip46_address, &t->dst, IP46_TYPE_ANY,
t->vni, t->encap_fib_index, t->sw_if_index);
@@ -563,7 +556,7 @@ int vnet_vxlan_add_del_tunnel
}
vnet_delete_hw_interface (vnm, t->hw_if_index);
- hash_unset (vxlan_main.instance_used, instance);
+ hash_unset (vxm->instance_used, instance);
fib_node_deinit(&t->node);
vec_free (t->rewrite);