-
Notifications
You must be signed in to change notification settings - Fork 693
Enhance return code handling for queryEnumCapabilitiesSai() #3778
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -458,7 +458,15 @@ void SwitchTrimmingCapabilities::queryTrimQueueModeEnumCapabilities() | |||||
| auto status = queryEnumCapabilitiesSai( | ||||||
| mList, SAI_OBJECT_TYPE_SWITCH, SAI_SWITCH_ATTR_PACKET_TRIM_QUEUE_RESOLUTION_MODE | ||||||
| ); | ||||||
| if (status != SAI_STATUS_SUCCESS) | ||||||
| if (status == SAI_STATUS_NOT_SUPPORTED) | ||||||
| { | ||||||
| SWSS_LOG_NOTICE( | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @adyeung @justin-wong-ce we also need to update the
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will be addressing this in a separate PR. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @kperumalbfn the next SAI 13.2.1 drop will pass the AttrSupported checks required by isSwitchTrimmingSupported(), no need for a change at the func from BRCM
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks @adyeung @justin-wong-ce |
||||||
| "Attribute not supported(%s)enum value capabilities", | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| toStr(SAI_OBJECT_TYPE_SWITCH, SAI_SWITCH_ATTR_PACKET_TRIM_QUEUE_RESOLUTION_MODE).c_str() | ||||||
| ); | ||||||
| return; | ||||||
| } | ||||||
| else if (status != SAI_STATUS_SUCCESS) | ||||||
| { | ||||||
| SWSS_LOG_ERROR( | ||||||
| "Failed to get attribute(%s) enum value capabilities", | ||||||
|
|
@@ -490,7 +498,15 @@ void SwitchTrimmingCapabilities::queryTrimQueueModeAttrCapabilities() | |||||
| auto status = queryAttrCapabilitiesSai( | ||||||
| attrCap, SAI_OBJECT_TYPE_SWITCH, SAI_SWITCH_ATTR_PACKET_TRIM_QUEUE_RESOLUTION_MODE | ||||||
| ); | ||||||
| if (status != SAI_STATUS_SUCCESS) | ||||||
| if (status == SAI_STATUS_NOT_SUPPORTED) | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do you mind to update the other functions in this file? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. otherwise this looks good.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
done, #3798 |
||||||
| { | ||||||
| SWSS_LOG_NOTICE( | ||||||
| "Attribute not supported(%s)enum value capabilities", | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @dhanasekar-arista the new one is approved. Please close the original one
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks @nazariig , i wont have permissions to close this one, @justin-wong-ce will close this one once he is back.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @dhanasekar-arista PR has been closed |
||||||
| toStr(SAI_OBJECT_TYPE_SWITCH, SAI_SWITCH_ATTR_PACKET_TRIM_QUEUE_RESOLUTION_MODE).c_str() | ||||||
| ); | ||||||
| return; | ||||||
| } | ||||||
| else if (status != SAI_STATUS_SUCCESS) | ||||||
| { | ||||||
| SWSS_LOG_ERROR( | ||||||
| "Failed to get attribute(%s) capabilities", | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nazariig please check