Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Kumaresh Perumal committed Nov 9, 2021
1 parent c62e1e4 commit 69167c3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion orchagent/crmorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const map<CrmResourceType, uint32_t> crmResSaiAvailAttrMap =
{ CrmResourceType::CRM_MPLS_INSEG, SAI_OBJECT_TYPE_INSEG_ENTRY },
{ CrmResourceType::CRM_MPLS_NEXTHOP, SAI_SWITCH_ATTR_AVAILABLE_IPV4_NEXTHOP_ENTRY },
{ CrmResourceType::CRM_SRV6_MY_SID_ENTRY, SAI_OBJECT_TYPE_MY_SID_ENTRY },
{ CrmResourceType::CRM_SRV6_NEXTHOP, SAI_OBJECT_TYPE_NEXT_HOP },
{ CrmResourceType::CRM_SRV6_NEXTHOP, SAI_SWITCH_ATTR_AVAILABLE_IPV6_NEXTHOP_ENTRY },
};

const map<string, CrmResourceType> crmThreshTypeResMap =
Expand Down
1 change: 0 additions & 1 deletion orchagent/orchdaemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,6 @@ bool OrchDaemon::init()
* when iterating ConsumerMap. This is ensured implicitly by the order of keys in ordered map.
* For cases when Orch has to process tables in specific order, like PortsOrch during warm start, it has to override Orch::doTask()
*/

m_orchList = { gSwitchOrch, gCrmOrch, gPortsOrch, gBufferOrch, gIntfsOrch, gNeighOrch, gNhgOrch, gRouteOrch, copp_orch, qos_orch, wm_orch, policer_orch, tunnel_decap_orch, sflow_orch, debug_counter_orch, gMacsecOrch, gSrv6Orch};

bool initialize_dtel = false;
Expand Down
14 changes: 7 additions & 7 deletions orchagent/routeorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -590,10 +590,10 @@ void RouteOrch::doTask(Consumer& consumer)

if (fvField(i) == "weight")
weights = fvValue(i);

if (fvField(i) == "nexthop_group")
nhg_index = fvValue(i);

if (fvField(i) == "segment") {
srv6_segments = fvValue(i);
srv6_nh = true;
Expand Down Expand Up @@ -714,6 +714,7 @@ void RouteOrch::doTask(Consumer& consumer)
else
{
SWSS_LOG_ERROR("For SRV6 nexthop ipv should be empty");
it = consumer.m_toSync.erase(it);
continue;
}
nhg_str = ip + NH_DELIMITER + srv6_segv[0] + NH_DELIMITER + srv6_src[0];
Expand All @@ -725,7 +726,7 @@ void RouteOrch::doTask(Consumer& consumer)
nhg_str += NH_DELIMITER + srv6_src[i];
}
nhg = NextHopGroupKey(nhg_str, overlay_nh, srv6_nh);
SWSS_LOG_NOTICE("SRV6 route with nhg %s", nhg.to_string().c_str());
SWSS_LOG_INFO("SRV6 route with nhg %s", nhg.to_string().c_str());
}
else if (overlay_nh == false)
{
Expand Down Expand Up @@ -938,7 +939,6 @@ void RouteOrch::doTask(Consumer& consumer)
{
if(m_syncdNextHopGroups[it_nhg.first].ref_count == 0)
{
SWSS_LOG_NOTICE("Remove NHG in doTask");
removeNextHopGroup(it_nhg.first);
}
else
Expand Down Expand Up @@ -1434,7 +1434,7 @@ bool RouteOrch::removeNextHopGroup(const NextHopGroupKey &nexthops)
}
else
{
SWSS_LOG_NOTICE("Remove ECMP Srv6 nexthops %s", nexthops.to_string().c_str());
SWSS_LOG_INFO("Remove ECMP Srv6 nexthops %s", nexthops.to_string().c_str());
}
}

Expand Down Expand Up @@ -1704,7 +1704,7 @@ bool RouteOrch::addRoute(RouteBulkContext& ctx, const NextHopGroupKey &nextHops)
}
else if (srv6_nh)
{
SWSS_LOG_NOTICE("Single NH: create srv6 nexthop %s", nextHops.to_string().c_str());
SWSS_LOG_INFO("Single NH: create srv6 nexthop %s", nextHops.to_string().c_str());
if (!m_srv6Orch->srv6Nexthops(nextHops, next_hop_id))
{
SWSS_LOG_ERROR("Failed to create SRV6 nexthop %s", nextHops.to_string().c_str());
Expand All @@ -1730,7 +1730,7 @@ bool RouteOrch::addRoute(RouteBulkContext& ctx, const NextHopGroupKey &nextHops)
if(srv6_nh)
{
sai_object_id_t temp_nh_id;
SWSS_LOG_NOTICE("ECMP SRV6 NH: create srv6 nexthops %s", nextHops.to_string().c_str());
SWSS_LOG_INFO("ECMP SRV6 NH: create srv6 nexthops %s", nextHops.to_string().c_str());
if(!m_srv6Orch->srv6Nexthops(nextHops, temp_nh_id))
{
SWSS_LOG_ERROR("Failed to create SRV6 nexthops for %s", nextHops.to_string().c_str());
Expand Down
3 changes: 2 additions & 1 deletion orchagent/srv6orch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ bool Srv6Orch::createSrv6Nexthop(const NextHopKey &nh)
nh_attrs.data());
if (status != SAI_STATUS_SUCCESS)
{
SWSS_LOG_ERROR("FAiled to create srv6 nexthop for %s", nh.to_string(false,true).c_str());
SWSS_LOG_ERROR("Failed to create srv6 nexthop for %s", nh.to_string(false,true).c_str());
return false;
}
m_neighOrch->updateSrv6Nexthop(nh, nexthop_id);
Expand All @@ -218,6 +218,7 @@ bool Srv6Orch::srv6Nexthops(const NextHopGroupKey &nhgKey, sai_object_id_t &next
if (!createSrv6Tunnel(srv6_source))
{
SWSS_LOG_ERROR("Failed to create tunnel for source %s", srv6_source.c_str());
return false;
}
if (!createSrv6Nexthop(nh))
{
Expand Down

0 comments on commit 69167c3

Please sign in to comment.