Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Shi Su committed Dec 8, 2021
1 parent b892221 commit 2a72407
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions orchagent/mplsrouteorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,10 @@ bool RouteOrch::addLabelRoute(LabelRouteBulkContext& ctx, const NextHopGroupKey
* in m_syncdLabelRoutes, then we need to update the route with a new next hop
* (group) id. The old next hop (group) is then not used and the reference
* count will decrease by 1.
*
* In case the entry is already pending removal in the bulk, it would be removed
* from m_syncdLabelRoutes during the bulk call. Therefore, such entries need to be
* re-created rather than set attribute.
*/
if (it_route == m_syncdLabelRoutes.at(vrf_id).end() || gLabelRouteBulker.bulk_entry_pending_removal(inseg_entry))
{
Expand Down
4 changes: 4 additions & 0 deletions orchagent/routeorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1826,6 +1826,10 @@ bool RouteOrch::addRoute(RouteBulkContext& ctx, const NextHopGroupKey &nextHops)
* in m_syncdRoutes, then we need to update the route with a new next hop
* (group) id. The old next hop (group) is then not used and the reference
* count will decrease by 1.
*
* In case the entry is already pending removal in the bulk, it would be removed
* from m_syncdRoutes during the bulk call. Therefore, such entries need to be
* re-created rather than set attribute.
*/
if (it_route == m_syncdRoutes.at(vrf_id).end() || gRouteBulker.bulk_entry_pending_removal(route_entry))
{
Expand Down

0 comments on commit 2a72407

Please sign in to comment.