From 05bac483585dd5e564ed5db43efb1020fa25c703 Mon Sep 17 00:00:00 2001 From: Shuotian Cheng Date: Wed, 16 Nov 2016 17:00:26 -0800 Subject: [PATCH] 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: https://github.com/opencomputeproject/SAI/pull/253 --- orchagent/routeorch.cpp | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/orchagent/routeorch.cpp b/orchagent/routeorch.cpp index ddb19fe0e0d4..ff34dbe449b0 100644 --- a/orchagent/routeorch.cpp +++ b/orchagent/routeorch.cpp @@ -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) { @@ -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);