aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHongjun Ni <hongjun.ni@intel.com>2016-06-15 01:22:22 +0800
committerHongjun Ni <hongjun.ni@intel.com>2016-06-15 01:22:22 +0800
commit24612b3fb8c4b7cef5f6b725da3321e419cf8216 (patch)
tree06ad39f93dbaaaa37657e361c30cef5cff94bc49
parent5a9c9b8bb50208dac6083dea3313a55caa3c1adf (diff)
Fix name confusion for gre interface index.
Change from free_vxlan_tunnel_hw_if_indices to free_gre_tunnel_hw_if_indices. Change-Id: I32f04f2b6b28fcf80d2fc0c37c67e343317dce7c Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
-rw-r--r--vnet/vnet/gre/gre.h2
-rw-r--r--vnet/vnet/gre/interface.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/vnet/vnet/gre/gre.h b/vnet/vnet/gre/gre.h
index 6cbe4aa1184..d44d8d9d9c6 100644
--- a/vnet/vnet/gre/gre.h
+++ b/vnet/vnet/gre/gre.h
@@ -69,7 +69,7 @@ typedef struct {
uword * tunnel_by_key;
/* Free vlib hw_if_indices */
- u32 * free_vxlan_tunnel_hw_if_indices;
+ u32 * free_gre_tunnel_hw_if_indices;
/* Mapping from sw_if_index to tunnel index */
u32 * tunnel_index_by_sw_if_index;
diff --git a/vnet/vnet/gre/interface.c b/vnet/vnet/gre/interface.c
index ae59b246608..a57367401d5 100644
--- a/vnet/vnet/gre/interface.c
+++ b/vnet/vnet/gre/interface.c
@@ -65,12 +65,12 @@ int vnet_gre_add_del_tunnel
pool_get_aligned (gm->tunnels, t, CLIB_CACHE_LINE_BYTES);
memset (t, 0, sizeof (*t));
- if (vec_len (gm->free_vxlan_tunnel_hw_if_indices) > 0) {
+ if (vec_len (gm->free_gre_tunnel_hw_if_indices) > 0) {
vnet_interface_main_t * im = &vnm->interface_main;
- hw_if_index = gm->free_vxlan_tunnel_hw_if_indices
- [vec_len (gm->free_vxlan_tunnel_hw_if_indices)-1];
- _vec_len (gm->free_vxlan_tunnel_hw_if_indices) -= 1;
+ hw_if_index = gm->free_gre_tunnel_hw_if_indices
+ [vec_len (gm->free_gre_tunnel_hw_if_indices)-1];
+ _vec_len (gm->free_gre_tunnel_hw_if_indices) -= 1;
hi = vnet_get_hw_interface (vnm, hw_if_index);
hi->dev_instance = t - gm->tunnels;
@@ -133,7 +133,7 @@ int vnet_gre_add_del_tunnel
vnet_sw_interface_set_flags (vnm, sw_if_index, 0 /* down */);
/* make sure tunnel is removed from l2 bd or xconnect */
set_int_l2_mode(gm->vlib_main, vnm, MODE_L3, sw_if_index, 0, 0, 0, 0);
- vec_add1 (gm->free_vxlan_tunnel_hw_if_indices, t->hw_if_index);
+ vec_add1 (gm->free_gre_tunnel_hw_if_indices, t->hw_if_index);
gm->tunnel_index_by_sw_if_index[sw_if_index] = ~0;
hash_unset (gm->tunnel_by_key, key);