Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[crm] Ignore unsupported switch attributes #1613

Merged
merged 2 commits into from
Jan 28, 2021

Conversation

PrabhuSreenivasan
Copy link
Contributor

Signed-off-by: Prabhu Sreenivasan prabhu.sreenivasan@broadcom.com

Fix sonic-net/sonic-buildimage#6563

What I did
Added checks for SAI_STATUS_ATTR_NOT_SUPPORTED_0 and SAI_STATUS_ATTR_NOT_IMPLEMENTED_0 to ignore unsupported CRM attributes.

Why I did it
Switch attributes SAI_SWITCH_ATTR_AVAILABLE_SNAT_ENTRY, SAI_SWITCH_ATTR_AVAILABLE_DNAT_ENTRY and SAI_SWITCH_ATTR_AVAILABLE_IPMC_ENTRY are currently unsupported by some SAI implementations and below logs were appearing on those switches.

Jan 26 07:08:51.743298 mts-sonic-dut ERR swss#orchagent: :- getResAvailableCounters: Failed to get switch attribute 60 , rv:-327680
Jan 26 07:08:51.745972 mts-sonic-dut ERR swss#orchagent: :- getResAvailableCounters: Failed to get switch attribute 61 , rv:-196608
Jan 26 07:08:51.759107 mts-sonic-dut ERR swss#orchagent: :- getResAvailableCounters: Failed to get switch attribute 62 , rv:-196608

How I verified it
SWSS unit test

Details if related

Signed-off-by: Prabhu Sreenivasan <prabhu.sreenivasan@broadcom.com>
@@ -457,10 +457,14 @@ 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_ATTR_NOT_SUPPORTED_0) ||
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Signed-off-by: Prabhu Sreenivasan <prabhu.sreenivasan@broadcom.com>
@PrabhuSreenivasan
Copy link
Contributor Author

retest vs please

@lguohan lguohan merged commit bbd2ca6 into sonic-net:master Jan 28, 2021
@PrabhuSreenivasan PrabhuSreenivasan deleted the crm_ignore_unsupported branch January 28, 2021 17:06
lguohan pushed a commit that referenced this pull request Jan 29, 2021
Signed-off-by: Prabhu Sreenivasan <prabhu.sreenivasan@broadcom.com>
DavidZagury pushed a commit to DavidZagury/sonic-swss that referenced this pull request Mar 4, 2021
…t#1613)

Signed-off-by: Prabhu Sreenivasan <prabhu.sreenivasan@broadcom.com>
raphaelt-nvidia pushed a commit to raphaelt-nvidia/sonic-swss that referenced this pull request Oct 5, 2021
…t#1613)

Signed-off-by: Prabhu Sreenivasan <prabhu.sreenivasan@broadcom.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Not supported attribute SAI_SWITCH_ATTR_AVAILABLE_IPMC_ENTRY
3 participants