zlog_debug("vni %u path %pFX unlinked from es %s", es_info->vni,
&pi->net->p, es->esi_str);
- list_delete_node(es->macip_path_list, &es_info->es_listnode);
+ list_delete_node(es->macip_evi_path_list, &es_info->es_listnode);
es_info->es = NULL;
/* if there are no other references against the ES it
/* link mac-ip path to the new destination ES */
es_info->es = es;
listnode_init(&es_info->es_listnode, es_info);
- listnode_add(es->macip_path_list, &es_info->es_listnode);
+ listnode_add(es->macip_evi_path_list, &es_info->es_listnode);
}
/* XXX - When a remote ES is added to a VRF, routes using that as
zlog_debug("update paths linked to es %s on vtep chg",
es->esi_str);
- for (ALL_LIST_ELEMENTS_RO(es->macip_path_list, node, es_info)) {
+ for (ALL_LIST_ELEMENTS_RO(es->macip_evi_path_list, node, es_info)) {
pi = es_info->pi;
if (!CHECK_FLAG(pi->flags, BGP_PATH_VALID))
continue;
listset_app_node_mem(es->es_vrf_list);
/* Initialise the route list used for efficient event handling */
- es->macip_path_list = list_new();
- listset_app_node_mem(es->macip_path_list);
+ es->macip_evi_path_list = list_new();
+ listset_app_node_mem(es->macip_evi_path_list);
QOBJ_REG(es, bgp_evpn_es);
static void bgp_evpn_es_free(struct bgp_evpn_es *es, const char *caller)
{
if ((es->flags & (BGP_EVPNES_LOCAL | BGP_EVPNES_REMOTE))
- || listcount(es->macip_path_list))
+ || listcount(es->macip_evi_path_list))
return;
if (BGP_DEBUG(evpn_mh, EVPN_MH_ES))
list_delete(&es->es_evi_list);
list_delete(&es->es_vrf_list);
list_delete(&es->es_vtep_list);
- list_delete(&es->macip_path_list);
+ list_delete(&es->macip_evi_path_list);
bgp_table_unlock(es->route_table);
/* remove the entry from various databases */
|| bgp_evpn_local_es_is_active(es));
}
-/* Update all MAC-IP routes associated with the ES. When the ES is down
- * the routes are advertised without the L3 extcomm
+/* Update all local MAC-IP routes in the VNI routing table associated
+ * with the ES. When the ES is down the routes are advertised without
+ * the L3 extcomm
*/
static void bgp_evpn_mac_update_on_es_oper_chg(struct bgp_evpn_es *es)
{
es->esi_str);
bgp = bgp_get_evpn();
- for (ALL_LIST_ELEMENTS_RO(es->macip_path_list, node, es_info)) {
+ for (ALL_LIST_ELEMENTS_RO(es->macip_evi_path_list, node, es_info)) {
pi = es_info->pi;
if (!CHECK_FLAG(pi->flags, BGP_PATH_VALID))
continue;
json_object_int_add(json, "vrfCount",
listcount(es->es_vrf_list));
json_object_int_add(json, "macipPathCount",
- listcount(es->macip_path_list));
+ listcount(es->macip_evi_path_list));
json_object_int_add(json, "inconsistentVniVtepCount",
es->incons_evi_vtep_cnt);
if (listcount(es->es_vtep_list)) {
es->remote_es_evi_cnt);
vty_out(vty, " VRF Count: %d\n", listcount(es->es_vrf_list));
vty_out(vty, " MACIP Path Count: %d\n",
- listcount(es->macip_path_list));
+ listcount(es->macip_evi_path_list));
vty_out(vty, " Inconsistent VNI VTEP Count: %d\n",
es->incons_evi_vtep_cnt);
if (es->inconsistencies) {
zlog_debug("es %s vrf %u nhg %u delete", es->esi_str,
bgp_vrf->vrf_id, es_vrf->nhg_id);
- /* update paths in the VRF that may already be associated with
- * this destination ES
- */
- bgp_evpn_es_path_update_on_es_vrf_chg(es_vrf, false);
-
/* Remove the NHG resources */
bgp_evpn_l3nhg_deactivate(es_vrf);
if (es_vrf->nhg_id)
/* remove from the VRF-ESI rb tree */
RB_REMOVE(bgp_es_vrf_rb_head, &bgp_vrf->es_vrf_rb_tree, es_vrf);
+ /* update paths in the VRF that may already be associated with
+ * this destination ES
+ */
+ bgp_evpn_es_path_update_on_es_vrf_chg(es_vrf, false);
+
XFREE(MTYPE_BGP_EVPN_ES_VRF, es_vrf);
}
}
/* Display all MAC-IP VNI routes linked to an ES */
-static void bgp_evpn_show_routes_mac_ip_es(struct vty *vty, esi_t *esi,
- json_object *json, int detail)
+static void bgp_evpn_show_routes_mac_ip_evi_es(struct vty *vty, esi_t *esi,
+ json_object *json, int detail)
{
struct bgp_node *rn;
struct bgp_path_info *pi;
if (esi && memcmp(esi, &es->esi, sizeof(*esi)))
continue;
- for (ALL_LIST_ELEMENTS_RO(es->macip_path_list, node, es_info)) {
+ for (ALL_LIST_ELEMENTS_RO(es->macip_evi_path_list, node,
+ es_info)) {
json_object *json_path = NULL;
pi = es_info->pi;
}
DEFPY_HIDDEN(
- show_bgp_l2vpn_evpn_route_mac_ip_es,
- show_bgp_l2vpn_evpn_route_mac_ip_es_cmd,
- "show bgp l2vpn evpn route mac-ip-es [NAME$esi_str|detail$detail] [json$uj]",
+ show_bgp_l2vpn_evpn_route_mac_ip_evi_es,
+ show_bgp_l2vpn_evpn_route_mac_ip_evi_es_cmd,
+ "show bgp l2vpn evpn route mac-ip-evi-es [NAME$esi_str|detail$detail] [json$uj]",
SHOW_STR BGP_STR L2VPN_HELP_STR EVPN_HELP_STR
"EVPN route information\n"
- "MAC IP routes linked to the ES\n"
+ "MAC IP routes in the EVI tables linked to the ES\n"
"ES ID\n"
"Detailed information\n" JSON_STR)
{
if (uj)
json = json_object_new_object();
- bgp_evpn_show_routes_mac_ip_es(vty, esi_p, json, !!detail);
+ bgp_evpn_show_routes_mac_ip_evi_es(vty, esi_p, json, !!detail);
if (uj) {
vty_out(vty, "%s\n",
json_object_to_json_string_ext(
&show_bgp_l2vpn_evpn_route_vni_multicast_cmd);
install_element(VIEW_NODE, &show_bgp_l2vpn_evpn_route_vni_macip_cmd);
install_element(VIEW_NODE, &show_bgp_l2vpn_evpn_route_vni_all_cmd);
- install_element(VIEW_NODE, &show_bgp_l2vpn_evpn_route_mac_ip_es_cmd);
+ install_element(VIEW_NODE,
+ &show_bgp_l2vpn_evpn_route_mac_ip_evi_es_cmd);
install_element(VIEW_NODE, &show_bgp_l2vpn_evpn_import_rt_cmd);
install_element(VIEW_NODE, &show_bgp_l2vpn_evpn_vrf_import_rt_cmd);