-
Notifications
You must be signed in to change notification settings - Fork 80
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
Confusing note about action_run
switch
#1260
Comments
The intended meaning is that in a The mention of table hit/miss is attempting to clarify that If you have a suggestion for alternate wording that would make it clearer for you, and yet also explicitly mention that |
Thank you. Maybe something like this?
|
Would you mind creating a PR on this repo with the change you wish to see, so it can be reviewed by others? |
@vlstill we'd love to have a PR with your proposed change! |
In section 12.7.1 Switch statement with action_run expression of P4 spec v1.2.3 (but the paragraph is also in the current main of spec), there is this note below the code:
I find the first sentence confusing. I think it should be concerned with switch labels in general, not with
default
(i.e. switch label is used to match on the kind of action executed). This way, it seem to imply that thedefault
is somehow behaving differently than in normalswitch
, which could suggest it match on whether there was a hit or miss. But that is contradictory to the second sentence. And indeed section 14.2.3. Match-action unit execution semantics indicates that theaction_run
should contain the ID of the action and whether it was a hit or miss does not come into question.Does the
default
label inaction_run
behave as is usual forswitch
(i.e. covering cases that were not mentioned before)? Would it be possible to clarify the note to avoid confusion?The text was updated successfully, but these errors were encountered: