@@ -4087,6 +4087,8 @@ void bgp_process_gr_deferral_complete(struct bgp *bgp, afi_t afi, safi_t safi)
40874087
40884088 if (!route_sync_pending) {
40894089 bgp->gr_route_sync_pending = false;
4090+ /* Set bgp master GR COMPLETE flag */
4091+ frrtrace(3, frr_bgp, gr_update_complete, bgp->name_pretty, afi, safi);
40904092 bgp_update_gr_completion();
40914093 }
40924094}
@@ -4320,7 +4322,20 @@ static inline void bgp_evpn_handle_deferred_bestpath_for_vrfs(void)
43204322 }
43214323}
43224324
4323- /* Process the routes with the flag BGP_NODE_SELECT_DEFER set */
4325+ /*
4326+ * Process the routes with the flag BGP_NODE_SELECT_DEFER set
4327+ *
4328+ * NOTE: Few important places where bgp_do_deferred_path_selection() is
4329+ * invoked are as below
4330+ * 1) For default VRF when EORs are received.
4331+ * 2) Start of deferral time when config read is done and peers are not in
4332+ * admin down in peer_unshut_after_cfg()
4333+ * 3) Via bgp_gr_start_route_select_timer() in 2 cases
4334+ * a) When there are still routes to be processed at the end of this
4335+ * function
4336+ * b) For non default Vrfs if EVPN is enabled in default vrf via
4337+ * bgp_evpn_handle_deferred_bestpath_for_vrfs()
4338+ */
43244339void bgp_do_deferred_path_selection(struct bgp *bgp, afi_t afi, safi_t safi)
43254340{
43264341 struct afi_safi_info *thread_info;
@@ -4382,6 +4397,9 @@ void bgp_do_deferred_path_selection(struct bgp *bgp, afi_t afi, safi_t safi)
43824397 * is not GR enabled. In which case, none of the GR timers will
43834398 * be started/running. So for such VRFs, this trigger will do
43844399 * the deferred bestpath selection.
4400+ *
4401+ * This also handles the case where default BGP has EVPN enabled
4402+ * and non default VRFs(Tenant VRFs) dont have any peer.
43854403 */
43864404 bgp_evpn_handle_deferred_bestpath_for_vrfs();
43874405 } else if (safi == SAFI_UNICAST && (afi == AFI_IP || afi == AFI_IP6)) {
@@ -4409,7 +4427,7 @@ void bgp_do_deferred_path_selection(struct bgp *bgp, afi_t afi, safi_t safi)
44094427 * OR
44104428 *
44114429 * 2. GR is enabled for l2vpn evpn afi safi in EVPN
4412- * default VRF and GR is complete
4430+ * default VRF and GR is complete for default VRF
44134431 */
44144432 bgp_deferred_path_selection(bgp, afi, safi, bgp->rib[afi][safi], cnt, NULL,
44154433 false);
0 commit comments