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

[dash] Refactor libsai #438

Merged
merged 14 commits into from
Sep 17, 2023
Merged

[dash] Refactor libsai #438

merged 14 commits into from
Sep 17, 2023

Conversation

kcudnik
Copy link
Collaborator

@kcudnik kcudnik commented Sep 13, 2023

Many changes, added dummy apis for support swss/orchagent start

  • Add dummy SAI base APIs
  • Start using ObjectIdManager in DashSai
  • Add ObjectIdManager class
  • Extract switch apis to separate file
  • Extract port apis to separate file
  • Add dash quad macros for quad SAI api
  • Dash SAI add quad generic api skeleton
  • Add Makefile include files dependencies
  • Move out non template files to src directory
  • Move generate_dash_api.sh script to proper Makefile
  • Refactor style for saiapi template and add logs

For better understanding which attributes are not implemented yet
We will need makefile for movind source that don't need templates
This will separate files that nedd actual processing from files that are
pure sources
Will be handy when adding support for more base objects
For managing all objects oids
Will be needed for swss orchagent to start properly
@kcudnik kcudnik added the enhancement New feature or request label Sep 13, 2023
@kcudnik
Copy link
Collaborator Author

kcudnik commented Sep 13, 2023

it should be better to review one commit at a time

It require to create switch first
@chrispsommers
Copy link
Collaborator

@kcudnik FYI I am working my way through this one commit at a time, I have not forgotten.

Copy link
Collaborator

@chrispsommers chrispsommers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor typos, otherwise excellent PR. I was able to build and test it locally, it's great.

@chrispsommers chrispsommers merged commit 1729021 into sonic-net:main Sep 17, 2023
10 checks passed
@kcudnik kcudnik deleted the sairef branch September 17, 2023 20:29
clarklee-guizhao added a commit to clarklee-guizhao/DASH that referenced this pull request Dec 3, 2023
* main: (75 commits)
  [dash-SAI] Enable warnings as errors (sonic-net#466)
  [SAI] wrong code generated in libsai sonic-net#415 (sonic-net#463)
  Fix incorrect IP in SONiC-DASH HLD VNET to VNET example. (sonic-net#459)
  DASH pipeline packet flow update proposal. (sonic-net#449)
  [libsai] Add attr name logging when doing get api (sonic-net#451)
  Build libsai deb packages in github workflow (sonic-net#450)
  Add Private Link mapping (sonic-net#327)
  [SAI] Update SAI submodule to the latest origin/master (sonic-net#446)
  [dash] Add libsai-debs target to create libsai debian packages (sonic-net#444)
  update p4 compile dependancy to avoid parallel  docker runs (sonic-net#443)
  [dash] Refactor libsai (sonic-net#438)
  [dash] Update SAI to latest v1.13 (sonic-net#435)
  [dash-pipeline] Refactor Makefiles (sonic-net#432)
  Remove ACL tags from BM (sonic-net#425)
  [submodule] Update SAI submodule to origin/master (sonic-net#431)
  [sai-api-gen] Write files only when changes are detected (sonic-net#429)
  Adds SAI_ROUTE_ENTRY_ATTR_PACKET_ACTION api to dash_underlay_routing (sonic-net#422)
  [SAI] Add missing check for api initialized
  [SAI] Print oids in hex form
  [SAI] Change asserts to return error codes and add missing switch api
  ...
prsunny pushed a commit that referenced this pull request May 14, 2024
The refactoring introduced in #438 only looks for a proper action attribute in SAI objects, not entries. In case of SAI entry, it iterates through all the attributes and matches the values regardless of attribute ID.

This PR aligns action search for both objects and entries, and adds action ID attributes to missing create_entry calls in tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants