-
Notifications
You must be signed in to change notification settings - Fork 484
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
RO Attr (switch obj) to get a list of supported obj types #989
RO Attr (switch obj) to get a list of supported obj types #989
Conversation
RO attribute for STP Max Instances (#947)
Update meta files to work on new gcc and perl (#950)
Back-Merge from Base on May 9
Update to latest on OCP/SAI
Back-merge from OCP/SAI
A new RO attribute to switch object that returns the list of supported object types that the underlying SAI adapter can support. This allows the clients of SAI to understand the abilities of the underlying silicon as well as the SAI adapter to support the SAI feature set.
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.
I think that adding a new API to https://github.com/opencomputeproject/SAI/blob/master/inc/saiobject.h seems more logical.
yes, new api would make sense to me, since to get this list of supported objects you would need to create swtich first, from the other hand what if there are multiple asic units in the SAI and each of them support different set of objects ? assuming that depeneding on api/attribute meaning, api would give global support, and attr per asic unit? |
@marian-pritsak , @kcudnik : So are you suggesting we add the API suggested by Marian for 'Global capabilities' where as the one I proposed would be for a per-asic capabilities ? I am Okay with and makes sense to me. Please confirm and I will push updates. |
so in this case there would be 2 apis in total? |
Actually I take back my words. |
Vissu, The same thing can be done in syncd by walking through all the sai_api_query's api_method_table and do the processing for API types wherever it has non null callbacks. |
Hi Ravindranath, The proposed mechanism is not meant for syncd to get this attribute and loop through. syncd (in sonic world) is only making the call and returning the SAI returned list back to SONiC. No looping involved. Also, there is no guarantee that the presence non-null callbacks would mean that the corresponding objects can be created. There may be dummy callbacks which would return UNSUPPORTED, to avoid null-pointer dereferencing in syncd. |
maybe the availability of sai object is conditioned on the switch object. for example, different asics are usually supported by one SAI library. I am ok with current proposal. @marian-pritsak , do you agree? |
…eproject#989) * RO Attr (switch obj) to get a list of supported obj types A new RO attribute to switch object that returns the list of supported object types that the underlying SAI adapter can support. This allows the clients of SAI to understand the abilities of the underlying silicon as well as the SAI adapter to support the SAI feature set.
A new RO attribute to switch object that returns the list of supported object types that the underlying SAI adapter can support. This allows the clients of SAI to understand the abilities of the underlying silicon as well as the SAI adapter to support the SAI feature set.