Skip to content

Commit 05bac48

Browse files
author
Shuotian Cheng
committed
Revert "orchagent: Updating the route next hop ID also sets action to forward" (#138)
This change breaks the latest test as the current SAI implementation doesn't support the mid-state that the route with packet action DROP is set with next hop ID and packet action FORWARD by two steps. The implementation also prevents removing the default route and create a new route instead. After the SAI implementation is fixed, this change will be re-introduced. ref: opencomputeproject/SAI#253
1 parent dcc84f0 commit 05bac48

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

orchagent/routeorch.cpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,6 @@ bool RouteOrch::addRoute(IpPrefix ipPrefix, IpAddresses nextHops)
440440
}
441441
else
442442
{
443-
/* Set the next hop ID to a new value */
444443
sai_status_t status = sai_route_api->set_route_attribute(&route_entry, &route_attr);
445444
if (status != SAI_STATUS_SUCCESS)
446445
{
@@ -449,18 +448,6 @@ bool RouteOrch::addRoute(IpPrefix ipPrefix, IpAddresses nextHops)
449448
return false;
450449
}
451450

452-
/* Set the packet action to forward */
453-
route_attr.id = SAI_ROUTE_ATTR_PACKET_ACTION;
454-
route_attr.value.s32 = SAI_PACKET_ACTION_FORWARD;
455-
456-
status = sai_route_api->set_route_attribute(&route_entry, &route_attr);
457-
if (status != SAI_STATUS_SUCCESS)
458-
{
459-
SWSS_LOG_ERROR("Failed to set route %s with packet action forward, %d",
460-
ipPrefix.to_string().c_str(), status);
461-
return false;
462-
}
463-
464451
/* Increase the ref_count for the next hop (group) entry */
465452
increaseNextHopRefCount(nextHops);
466453

0 commit comments

Comments
 (0)