Skip to content

Commit bbd2ca6

Browse files
[crm]: Ignore unsupported/non-implemented switch attributes (#1613)
Signed-off-by: Prabhu Sreenivasan <[email protected]>
1 parent f4aefba commit bbd2ca6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

orchagent/crmorch.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -457,10 +457,15 @@ void CrmOrch::getResAvailableCounters()
457457
sai_status_t status = sai_switch_api->get_switch_attribute(gSwitchId, 1, &attr);
458458
if (status != SAI_STATUS_SUCCESS)
459459
{
460-
if(status == SAI_STATUS_NOT_SUPPORTED)
460+
if((status == SAI_STATUS_NOT_SUPPORTED) ||
461+
(status == SAI_STATUS_NOT_IMPLEMENTED) ||
462+
SAI_STATUS_IS_ATTR_NOT_SUPPORTED(status) ||
463+
SAI_STATUS_IS_ATTR_NOT_IMPLEMENTED(status))
461464
{
462465
// remove unsupported resources from map
463466
m_resourcesMap.erase(res.first);
467+
SWSS_LOG_NOTICE("Switch attribute %u not supported", attr.id);
468+
break;
464469
}
465470
SWSS_LOG_ERROR("Failed to get switch attribute %u , rv:%d", attr.id, status);
466471
break;

0 commit comments

Comments
 (0)