Skip to content

Commit

Permalink
undo a few changes
Browse files Browse the repository at this point in the history
  • Loading branch information
shi-su committed Mar 12, 2021
1 parent eaed258 commit 625dfbb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion orchagent/mirrororch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,7 @@ bool MirrorOrch::deactivateSession(const string& name, MirrorEntry& session)
if (status != SAI_STATUS_SUCCESS)
{
SWSS_LOG_ERROR("Failed to deactivate mirroring session %s", name.c_str());
return handleSaiRemoveStatus(SAI_API_MIRROR, status);
return false;
}

session.status = false;
Expand Down
12 changes: 4 additions & 8 deletions orchagent/portsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2339,11 +2339,9 @@ void PortsOrch::doPortTask(Consumer &consumer)
{
if (m_lanesAliasSpeedMap.find(it->first) == m_lanesAliasSpeedMap.end())
{
sai_status_t status = removePort(it->second);
if (status != SAI_STATUS_SUCCESS)
if (SAI_STATUS_SUCCESS != removePort(it->second))
{
SWSS_LOG_ERROR("PortsOrch initialization failure.");
handleSaiRemoveStatus(SAI_API_PORT, status);
throw runtime_error("PortsOrch initialization failure.");
}
it = m_portListLaneMap.erase(it);
}
Expand Down Expand Up @@ -2693,8 +2691,7 @@ void PortsOrch::doPortTask(Consumer &consumer)
sai_status_t status = sai_hostif_api->remove_hostif(hif_id);
if (status != SAI_STATUS_SUCCESS)
{
SWSS_LOG_ERROR("Remove hostif for the port failed");
handleSaiRemoveStatus(SAI_API_HOSTIF, status);
throw runtime_error("Remove hostif for the port failed");
}

Port p;
Expand All @@ -2710,8 +2707,7 @@ void PortsOrch::doPortTask(Consumer &consumer)
{
if (SAI_STATUS_OBJECT_IN_USE != status)
{
SWSS_LOG_ERROR("Delete port failed");
handleSaiRemoveStatus(SAI_API_PORT, status);
throw runtime_error("Delete port failed");
}
SWSS_LOG_WARN("Failed to remove port %" PRIx64 ", as the object is in use", port_id);
it++;
Expand Down

0 comments on commit 625dfbb

Please sign in to comment.