Skip to content

Commit

Permalink
[crm]: Ignore unsupported/non-implemented switch attributes (#1613)
Browse files Browse the repository at this point in the history
Signed-off-by: Prabhu Sreenivasan <prabhu.sreenivasan@broadcom.com>
  • Loading branch information
PrabhuSreenivasan authored Jan 28, 2021
1 parent f4aefba commit bbd2ca6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion orchagent/crmorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -457,10 +457,15 @@ void CrmOrch::getResAvailableCounters()
sai_status_t status = sai_switch_api->get_switch_attribute(gSwitchId, 1, &attr);
if (status != SAI_STATUS_SUCCESS)
{
if(status == SAI_STATUS_NOT_SUPPORTED)
if((status == SAI_STATUS_NOT_SUPPORTED) ||
(status == SAI_STATUS_NOT_IMPLEMENTED) ||
SAI_STATUS_IS_ATTR_NOT_SUPPORTED(status) ||
SAI_STATUS_IS_ATTR_NOT_IMPLEMENTED(status))
{
// remove unsupported resources from map
m_resourcesMap.erase(res.first);
SWSS_LOG_NOTICE("Switch attribute %u not supported", attr.id);
break;
}
SWSS_LOG_ERROR("Failed to get switch attribute %u , rv:%d", attr.id, status);
break;
Expand Down

0 comments on commit bbd2ca6

Please sign in to comment.