Skip to content

Commit

Permalink
Revert "orchagent: Updating the route next hop ID also sets action to…
Browse files Browse the repository at this point in the history
… forward" (sonic-net#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
  • Loading branch information
Shuotian Cheng committed Nov 17, 2016
1 parent dcc84f0 commit 05bac48
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions orchagent/routeorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,6 @@ bool RouteOrch::addRoute(IpPrefix ipPrefix, IpAddresses nextHops)
}
else
{
/* Set the next hop ID to a new value */
sai_status_t status = sai_route_api->set_route_attribute(&route_entry, &route_attr);
if (status != SAI_STATUS_SUCCESS)
{
Expand All @@ -449,18 +448,6 @@ bool RouteOrch::addRoute(IpPrefix ipPrefix, IpAddresses nextHops)
return false;
}

/* Set the packet action to forward */
route_attr.id = SAI_ROUTE_ATTR_PACKET_ACTION;
route_attr.value.s32 = SAI_PACKET_ACTION_FORWARD;

status = sai_route_api->set_route_attribute(&route_entry, &route_attr);
if (status != SAI_STATUS_SUCCESS)
{
SWSS_LOG_ERROR("Failed to set route %s with packet action forward, %d",
ipPrefix.to_string().c_str(), status);
return false;
}

/* Increase the ref_count for the next hop (group) entry */
increaseNextHopRefCount(nextHops);

Expand Down

0 comments on commit 05bac48

Please sign in to comment.