Enhance return code handling for SAI_SWITCH_ATTR_PACKET_TRIM_QUEUE_RESOLUTION_MODE#3808
Conversation
Sonic seems to expect queryEnumCapabilitiesSai() to only be sucessful when it returns SAI_STATUS_SUCCESS. However, SAI_STATUS_NOT_SUPPORTED is also a valid return code if the attribute queried is not supported on a platform. Change the return code handling such that it does not produce an ERR level syslog in the case that SAI_STATUS_NOT_SUPPORTED is returned. Instead handle it gracefully. Tested with 7260CX3 on 202505
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Please update the PR title to reflect the actual change better. |
done |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Merged to unblock feature, but please add unit tests for coverage for future PRs |
|
Cherry-pick PR to msft-202412: Azure/sonic-swss.msft#128 |
|
@prsunny can you comment why "Request for 202505 Branch" was removed. |
|
@prsunny we also found this error syslog on 202505, should we backport it into 202505? https://github.com/aristanetworks/sonic-qual.msft/issues/772 |
|
Cherry-pick PR to 202505: #3840 |
|
@dhanasekar-arista , in general we want to reduce the cherry-pick unless its a bug fix. For packet trimming, i see a bunch of cherry-picks in the past and my feedback is to target this feature for 202511 and stop backport. But since this is a log level error on 202505, approving the cherry-pick. |
…SOLUTION_MODE (sonic-net#3808) What I did Change the return code handling such that it does not produce an ERR level syslog in the case that SAI_STATUS_NOT_SUPPORTED is returned. Instead handle it gracefully. Why I did it Sonic seems to expect queryEnumCapabilitiesSai() to only be sucessful when it returns SAI_STATUS_SUCCESS. However, SAI_STATUS_NOT_SUPPORTED is also a valid return code if the attribute queried is not supported on a platform.
…SOLUTION_MODE (sonic-net#3808) What I did Change the return code handling such that it does not produce an ERR level syslog in the case that SAI_STATUS_NOT_SUPPORTED is returned. Instead handle it gracefully. Why I did it Sonic seems to expect queryEnumCapabilitiesSai() to only be sucessful when it returns SAI_STATUS_SUCCESS. However, SAI_STATUS_NOT_SUPPORTED is also a valid return code if the attribute queried is not supported on a platform.
…SOLUTION_MODE (sonic-net#3808) What I did Change the return code handling such that it does not produce an ERR level syslog in the case that SAI_STATUS_NOT_SUPPORTED is returned. Instead handle it gracefully. Why I did it Sonic seems to expect queryEnumCapabilitiesSai() to only be sucessful when it returns SAI_STATUS_SUCCESS. However, SAI_STATUS_NOT_SUPPORTED is also a valid return code if the attribute queried is not supported on a platform.
…SOLUTION_MODE (sonic-net#3808) What I did Change the return code handling such that it does not produce an ERR level syslog in the case that SAI_STATUS_NOT_SUPPORTED is returned. Instead handle it gracefully. Why I did it Sonic seems to expect queryEnumCapabilitiesSai() to only be sucessful when it returns SAI_STATUS_SUCCESS. However, SAI_STATUS_NOT_SUPPORTED is also a valid return code if the attribute queried is not supported on a platform. Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
…SOLUTION_MODE (sonic-net#3808) What I did Change the return code handling such that it does not produce an ERR level syslog in the case that SAI_STATUS_NOT_SUPPORTED is returned. Instead handle it gracefully. Why I did it Sonic seems to expect queryEnumCapabilitiesSai() to only be sucessful when it returns SAI_STATUS_SUCCESS. However, SAI_STATUS_NOT_SUPPORTED is also a valid return code if the attribute queried is not supported on a platform. Signed-off-by: Baorong Liu <96146196+baorliu@users.noreply.github.com>
What I did
Change the return code handling such that it does not produce an ERR level syslog in the case that SAI_STATUS_NOT_SUPPORTED is returned. Instead handle it gracefully.
Why I did it
Sonic seems to expect queryEnumCapabilitiesSai() to only be sucessful when it returns SAI_STATUS_SUCCESS. However, SAI_STATUS_NOT_SUPPORTED is also a valid return code if the attribute queried is not supported on a platform.
How I verified it
Tested with 7260CX3 on 202505, new log msg prints in place of previous ERR log
Details if related