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

[SAI-API][Question]Behavior Mode for using SAI API in a uniform manner #1622

Open
richardyu-ms opened this issue Oct 16, 2022 · 1 comment
Open

Comments

@richardyu-ms
Copy link
Collaborator

Summary

From some of the issue submitted in SAI Community, is there should be some definitation for the behavior mode of the usage on SAI APIs?

Details

The Switch Abstraction Interface defines the API to provide a vendor-independent way of controlling forwarding elements, such as a switching ASIC, an NPU or a software switch in a uniform manner.

For those APIs, we have defined what's the APIs and we can understand that from specification in sai header.

But from some of the issues submitted in community, there are some differences for how to use them on different platforms, we can undertand the different from different perspective in different categories as below.

From some of the known issues, and unknown issue that might be, is there should be some Behavior Mode definiation for how to use SAI API in composite scenario for resolving the problems below?

Those APIs, is being used by some other open source project, like SONiC, shall we use those implementation as some example (not limit to SONiC) for how to use them?

Data constraint

Is there should be some definitation/specification/examples on how to use them and how to handle the faulty data?
From those issues below, they are caused by data constraint, like MAC length or default value, for the faulty data or some data which has differnt constaint on different platform

#1606 [SAI-PTF] Need to create default route for default VRF in SaiHelper setup
#1619 [SAI-PTF] Wrong mac address representation in test case

API ordering constraint

Is there should be some definitation/specification/example on what should be an acceptable ordering?
For those issues below, they are caused by how to create a object with SAI APIs, different API ordering might cannot be accepted in different platform.
#1607 [SAI-PTF] Ordering the create/delete api calling sequence

API capability Pre-check and Exception handling

Is there should be some definitation/specification/example on how to check the API and how to handle the error for some unimplement API or using some un-supported attributes?
For those issues below, they are caused by how to handle the error when there are some error happened when invoking some unimplement API or using some un-supported attributes.

[configure.ac] implement SAI API version check sonic-net/sonic-sairedis#1000
#1614 [SAI-PTF] Enhance the function for getting counters in sai_adapter.py
#1610 [SAI-PTF]Precheck or handle the error on unimplemented interface/attribute

@richardyu-ms richardyu-ms changed the title [SAI-API][Question]Behavior Mode for using SAI API on different hardware platforms [SAI-API][Question]Behavior Mode for using SAI API in a uniform manner Oct 16, 2022
@richardyu-ms
Copy link
Collaborator Author

@ravi861, please help to check this issue, any suggestion are welcome.

thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant