sonic-net / DASH

Disaggregated APIs for SONiC Hosts
Apache License 2.0
80 stars 89 forks source link

[sai-gen] Update ACL tables type and match type annotations for SAI header generation #486

Closed r12f closed 8 months ago

r12f commented 8 months ago

This PR changes 3 things:

  1. Update the type annotation of ACL table match keys, so we can generate the right types for ACLs.
  2. Add match_type annotation for match keys, so we can fix the optional match kind that we use to make P4 compiler happy.
  3. Update SAI header generation script to handle the new annotation.

The end results is shown as below. The comment and type are now updated to the same as opencompute SAI:

image (no changes showing up in git diff)

To compare with previous generated content:

r12f commented 8 months ago

PR is not ready for review. Need to discuss what is the right way for libsai changes. My feeling is to convert the input to optional, because this is what BMv2 supports.

r12f commented 8 months ago

discussed in today's DASH BM meeting today. For BMv2, we will convert the ACL input to optional by taking the first item of the list.

r12f commented 8 months ago

OK, the tests are fixed now. this PR is ready for review. @marian-pritsak @kcudnik