-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[libsai] Implement APIs set/get attribute (#651)
Following #648, continue to refactor libsai implementation for easier read and maintenance: 1. Avoid using compilated j2 template as best 2. Use c++ code directly to express the logic of API implementation, based on p4 table metadata info (p4meta.[h, cpp]) 3. Implement APIs set/get attribute by using common `DashSai::set` and `DashSai::get`, which fix the issue #650 4. Update libsai test (vnet_out.cpp) to cover sanity test of APIs set/get attribute Note: To refactor APIs create/remove with current approach in next PR. The generated sample code of APIs set/get attribute is as below: - SAI object objectID ![image](https://github.com/user-attachments/assets/2df7e786-6d7b-4503-a26f-6f2463748867) p4meta `outbound_routing_group_meta_table` definition ![image](https://github.com/user-attachments/assets/ddf3e5ee-6fab-4ede-b589-48600b885088) - SAI object entry ![image](https://github.com/user-attachments/assets/c4d47442-c4bf-4c88-9e8f-14b54f03668e) p4meta `outbound_routing_entry_meta_table` definition ![image](https://github.com/user-attachments/assets/deb64ef6-e90c-4d2d-9aad-9aa6db133521)
- Loading branch information
Showing
8 changed files
with
1,021 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.