-
Notifications
You must be signed in to change notification settings - Fork 273
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
Adding support for new SAI API sai_query_attribute_capability() #645
Conversation
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.
Please address comments
Typo in the PR title. |
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.
See comments.
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.
LGTM
All comments have been addressed. Please help take a look at my last change and see if anything else needs to be addressed. |
Advanced Submodule head of Sonic-Sairedis and picked up the following changes: Workaround getSwitchType failure due to NPU SAI not yet supporting it (#647) sonic-net/sonic-sairedis#647 Adding support for new SAI API sai_query_attribute_capability() (#645) sonic-net/sonic-sairedis#645 [syncd] ARM32 bit fixes, for 64bit printf format specifier. (#643) Signed-off-by: Rajkumar Pennadam Ramamoorthy <[email protected]> sonic-net/sonic-sairedis#643 [syncd] Add support for synchronous bulk api (#640) sonic-net/sonic-sairedis#640
) Previously the code to support query SAI attribute capabilities were commented out due to discovered missing BRCM Vendor SAI API missing in their 3.7.5.1 debian package that caused linking error during image build. See #645 for details on the SAI attribute capability query support. Since BRCM has provided the patch for the missing API stub code and included them in BRCM SAI 3.7.5.1-2 (see sonic-net/sonic-buildimage#5101), I am raising this PR to re-enable the calling to Vendor SAI API sai_query_attribute_capability(). I have tested this with the new BRCM SAI 3.7.5.1-2 debians and ensured that the linking issue was fixed by that patch.
…c-net#645) * Addind support for new SAI API sai_query_attribute_capability()
…onic-net#651) Previously the code to support query SAI attribute capabilities were commented out due to discovered missing BRCM Vendor SAI API missing in their 3.7.5.1 debian package that caused linking error during image build. See sonic-net#645 for details on the SAI attribute capability query support. Since BRCM has provided the patch for the missing API stub code and included them in BRCM SAI 3.7.5.1-2 (see sonic-net/sonic-buildimage#5101), I am raising this PR to re-enable the calling to Vendor SAI API sai_query_attribute_capability(). I have tested this with the new BRCM SAI 3.7.5.1-2 debians and ensured that the linking issue was fixed by that patch.
This change adds the support of allowing application to invoking SAI API "sai_query_attribute_capability()" from the sonic application side.
This change has been tested using the Mellanox platform by exercising this new change to query the port object attribute SAI_PORT_ATTR_TPID
as well as LAG object attribute SAI_LAG_ATTR_TPID.
These two calls were exercised at orchagent init time in order to test out the changes are working.
I could not test this with BRCM platform due to the required SAI API "sai_query_attribute_capability()" although is defined in the SAI header file but was not part of the BRCM SAI code in 3.7.5.1 and causes link issue during build. So the final change that I am asking to check in comments out the final call to "sai_query_attribute_capability()". When BRCM SAI 4.2 (which has this SAI API support) is finally integrated into the master branch, I will have this uncommented out, tested and raise another PR to enable this full functionality.
Please see attached for the syslog and sairedis record captured during my testing using the Mellanox platform.
AttrCapabilityQueryTestLog.txt
Please note that this PR has a dependency on sonic-net/sonic-swss-common#362
If this PR is needed in other branches, one must ensure that the change for sonic-net/sonic-swss-common#362 is already picked up in that branch as well.