Skip to content

Commit

Permalink
Merge branch 'master' into rpmarvell_wred_statistics_swss_changes
Browse files Browse the repository at this point in the history
  • Loading branch information
prsunny authored Dec 7, 2024
2 parents 6250ecf + 8387d61 commit c24d638
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
15 changes: 10 additions & 5 deletions orchagent/dash/dashorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,19 @@ bool DashOrch::addApplianceEntry(const string& appliance_id, const dash::applian
appliance_attr.value.u32 = entry.local_region_id();
status = sai_dash_appliance_api->create_dash_appliance(&sai_appliance_id, gSwitchId,
attr_count, &appliance_attr);
if (status != SAI_STATUS_SUCCESS && status != SAI_STATUS_NOT_IMPLEMENTED)
if (status != SAI_STATUS_SUCCESS)
{
SWSS_LOG_ERROR("Failed to create dash appliance object in SAI for %s", appliance_id.c_str());
task_process_status handle_status = handleSaiCreateStatus((sai_api_t) SAI_API_DASH_APPLIANCE, status);
if (handle_status != task_success)
if (status != SAI_STATUS_NOT_IMPLEMENTED)
{
return parseHandleSaiStatusFailure(handle_status);
SWSS_LOG_ERROR("Failed to create dash appliance object in SAI for %s", appliance_id.c_str());
task_process_status handle_status = handleSaiCreateStatus((sai_api_t) SAI_API_DASH_APPLIANCE, status);
if (handle_status != task_success)
{
return parseHandleSaiStatusFailure(handle_status);
}
}
// ignore if not implemented in SAI
sai_appliance_id = 0;
}

sai_vip_entry_t vip_entry;
Expand Down
2 changes: 1 addition & 1 deletion orchagent/routeorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2641,7 +2641,7 @@ bool RouteOrch::removeRoutePost(const RouteBulkContext& ctx)
return true;
}

bool RouteOrch::hasBgpRoute(const IpPrefix& prefix)
bool RouteOrch::isRouteExists(const IpPrefix& prefix)
{
SWSS_LOG_ENTER();

Expand Down
2 changes: 1 addition & 1 deletion orchagent/routeorch.h
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ class RouteOrch : public Orch, public Subject
const NextHopGroupKey getSyncdRouteNhgKey(sai_object_id_t vrf_id, const IpPrefix& ipPrefix);
bool createFineGrainedNextHopGroup(sai_object_id_t &next_hop_group_id, vector<sai_attribute_t> &nhg_attrs);
bool removeFineGrainedNextHopGroup(sai_object_id_t &next_hop_group_id);
bool hasBgpRoute(const IpPrefix& prefix);
bool isRouteExists(const IpPrefix& prefix);
bool removeRoutePrefix(const IpPrefix& prefix);

void addLinkLocalRouteToMe(sai_object_id_t vrf_id, IpPrefix linklocal_prefix);
Expand Down
6 changes: 3 additions & 3 deletions orchagent/vnetorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,7 @@ bool VNetRouteOrch::doRouteTask<VNetVrfObject>(const string& vnet, IpPrefix& ipP
prefixToRemove = adv_prefix;
}
auto prefixSubnet = prefixToRemove.getSubnet();
if(gRouteOrch && gRouteOrch->hasBgpRoute(prefixSubnet))
if(gRouteOrch && gRouteOrch->isRouteExists(prefixSubnet))
{
if (!gRouteOrch->removeRoutePrefix(prefixSubnet))
{
Expand Down Expand Up @@ -2366,7 +2366,7 @@ void VNetRouteOrch::updateVnetTunnel(const BfdUpdate& update)
ipPrefixsubnet = adv_prefix.getSubnet();
}
}
if(gRouteOrch && gRouteOrch->hasBgpRoute(ipPrefixsubnet))
if(gRouteOrch && gRouteOrch->isRouteExists(ipPrefixsubnet))
{
if (!gRouteOrch->removeRoutePrefix(ipPrefixsubnet))
{
Expand Down Expand Up @@ -2611,7 +2611,7 @@ void VNetRouteOrch::updateVnetTunnelCustomMonitor(const MonitorUpdate& update)
}
}
auto prefixsubnet = prefixToUse.getSubnet();
if (gRouteOrch && gRouteOrch->hasBgpRoute(prefixsubnet))
if (gRouteOrch && gRouteOrch->isRouteExists(prefixsubnet))
{
if (!gRouteOrch->removeRoutePrefix(prefixsubnet))
{
Expand Down

0 comments on commit c24d638

Please sign in to comment.