summaryrefslogtreecommitdiff
path: root/bgpd/bgp_evpn_private.h
diff options
context:
space:
mode:
authorAnuradha Karuppiah <anuradhak@cumulusnetworks.com>2020-05-08 19:24:56 -0700
committerAnuradha Karuppiah <anuradhak@nvidia.com>2020-11-24 11:06:08 -0800
commitc589d84746d96c1714582e437eb9cec691795252 (patch)
tree2ca0ecf6ec0896991b2e3a3155da69d592f5d308 /bgpd/bgp_evpn_private.h
parentbbc57c6cfac1d471a8d0293cd30af59facdbd8f4 (diff)
bgpd: L3NHG infrastructure for host routes in EVPN
ES-VRF entries are maintained for the purpose of L3-NHG creation - 1. Each ES-EVI entry is associated with a tenant VRF. This associaton triggers the creation of an ES-VRF entry. 2. Type-2/MAC-IP routes are imported into a tenant VRF and programmed as a /32 or host route entry in the dataplane. If the destination of the host route is a remote-ES the route is programmed with the corresponding (keyed in by {vrf,ES-id}) L3-NHG. 3. The reason for this indirection (route->L3-NHG, L3-NHG->list-of-VTEPs) is to avoid route updates to the dplane when a remote-ES link flaps i.e. instead of updating all the dependent routes the NHG's contents are updated. This reduces the amount of dataplane updates (fewer nhg updates vs. route updates) allowing for a faster failover. Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Diffstat (limited to 'bgpd/bgp_evpn_private.h')
-rw-r--r--bgpd/bgp_evpn_private.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/bgpd/bgp_evpn_private.h b/bgpd/bgp_evpn_private.h
index c47576c00c..e8e68c8387 100644
--- a/bgpd/bgp_evpn_private.h
+++ b/bgpd/bgp_evpn_private.h
@@ -218,6 +218,9 @@ static inline struct list *bgpevpn_get_vrf_import_rtl(struct bgpevpn *vpn)
return vpn->bgp_vrf->vrf_import_rtl;
}
+extern void bgp_evpn_es_evi_vrf_ref(struct bgpevpn *vpn);
+extern void bgp_evpn_es_evi_vrf_deref(struct bgpevpn *vpn);
+
static inline void bgpevpn_unlink_from_l3vni(struct bgpevpn *vpn)
{
/* bail if vpn is not associated to bgp_vrf */
@@ -227,6 +230,8 @@ static inline void bgpevpn_unlink_from_l3vni(struct bgpevpn *vpn)
UNSET_FLAG(vpn->flags, VNI_FLAG_USE_TWO_LABELS);
listnode_delete(vpn->bgp_vrf->l2vnis, vpn);
+ bgp_evpn_es_evi_vrf_deref(vpn);
+
/* remove the backpointer to the vrf instance */
bgp_unlock(vpn->bgp_vrf);
vpn->bgp_vrf = NULL;
@@ -255,6 +260,8 @@ static inline void bgpevpn_link_to_l3vni(struct bgpevpn *vpn)
if (bgp_vrf->l3vni &&
!CHECK_FLAG(bgp_vrf->vrf_flags, BGP_VRF_L3VNI_PREFIX_ROUTES_ONLY))
SET_FLAG(vpn->flags, VNI_FLAG_USE_TWO_LABELS);
+
+ bgp_evpn_es_evi_vrf_ref(vpn);
}
static inline int is_vni_configured(struct bgpevpn *vpn)