sonic-net / DASH

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

[sai-gen] Deprecate name attribute for all match keys and action parameters, remove type guessing heuristics on object parent names. #480

Closed r12f closed 8 months ago

r12f commented 8 months ago

This change is based on #479 , hence including all changes in the PR.

No update on SAI headers after this change:

r12f@r12f-dl380:~/data/code/sonic/DASH/dash-pipeline
$ diff SAI/SAI/experimental/ ~/data/code/sonic/DASH-exp/dash-pipeline/SAI/SAI/experimental/

2 comments are updated in lib file, but looks like the previous result is wrong: image

Take route_vnet as an example, it indeed only take 4 parameters, as ip_is_v6 field doesn't count: image

r12f commented 8 months ago

Please ignore this PR for review until #479 is checked in.

r12f commented 8 months ago

looks like in certain cases, @name is required: (@chrispsommers as FYI)

image

chrispsommers commented 8 months ago

looks like in certain cases, @name is required: (@chrispsommers as FYI)

That's fine, there's nothing wrong with the @name annotation, it is widely used and guides P4 artifact generation. The only objection in the past was using the pipe symbol to signify SAI code generation; annotations are preferred.

r12f commented 8 months ago

Rebased on top of #479 without any code changes.

r12f commented 8 months ago

looks like in certain cases, @name is required: (@chrispsommers as FYI)

That's fine, there's nothing wrong with the @name annotation, it is widely used and guides P4 artifact generation. The only objection in the past was using the pipe symbol to signify SAI code generation; annotations are preferred.

Yep, makes sense!