Skip to content

Commit 2a72407

Browse files
author
Shi Su
committed
Add comment
1 parent b892221 commit 2a72407

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

orchagent/mplsrouteorch.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,10 @@ bool RouteOrch::addLabelRoute(LabelRouteBulkContext& ctx, const NextHopGroupKey
598598
* in m_syncdLabelRoutes, then we need to update the route with a new next hop
599599
* (group) id. The old next hop (group) is then not used and the reference
600600
* count will decrease by 1.
601+
*
602+
* In case the entry is already pending removal in the bulk, it would be removed
603+
* from m_syncdLabelRoutes during the bulk call. Therefore, such entries need to be
604+
* re-created rather than set attribute.
601605
*/
602606
if (it_route == m_syncdLabelRoutes.at(vrf_id).end() || gLabelRouteBulker.bulk_entry_pending_removal(inseg_entry))
603607
{

orchagent/routeorch.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1826,6 +1826,10 @@ bool RouteOrch::addRoute(RouteBulkContext& ctx, const NextHopGroupKey &nextHops)
18261826
* in m_syncdRoutes, then we need to update the route with a new next hop
18271827
* (group) id. The old next hop (group) is then not used and the reference
18281828
* count will decrease by 1.
1829+
*
1830+
* In case the entry is already pending removal in the bulk, it would be removed
1831+
* from m_syncdRoutes during the bulk call. Therefore, such entries need to be
1832+
* re-created rather than set attribute.
18291833
*/
18301834
if (it_route == m_syncdRoutes.at(vrf_id).end() || gRouteBulker.bulk_entry_pending_removal(route_entry))
18311835
{

0 commit comments

Comments
 (0)