-
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
Where should a @hidden
annotation on an action be placed?
#1271
Comments
I think if it removes the fully qualified name, then it only makes sense for the annotation to be on the action itself... That said, it's not totally clear to me how this would ripple to any usage. Would it not be exposed as an action in that table in the control plane either? In P4Runtime at least, that's largely not dependent on a fully-qualified name... (Also not sure what this is for though). |
The one use case I know of off the top of my head for the I do not know of any examples where I have seen a P4 table be not-hidden, but it is defined with at least one action that is hidden. I am not sure what would be intended to happen if a controller attempted to read all entries of the table, while some of those entries used a hidden action, for example. I doubt the P4Runtime API specification has an answer to what ought to happen in this situation (but perhaps it does, and I am forgetting it). This sounds to me like a scenario where it is likely that no one wanted to do this, and no one has thought before to ask what ought to happen. |
Mm, I think this would fall under the 'read-write' symmetry requirement basically, so no such entries should be visible. If that table was additionally marked as dataplane volatile, then I really don't know, but would probably err on the side of still 'not visible' for simplicity. |
@vlstill If you look in the directory testdata/p4_16_samples_outputs, the output of this command shows many examples of git clone https://github.com/p4lang/p4c
cd p4c/testdata/p4_16_samples_outputs
grep @hidden *.p4 The list of p4c passes below might not be exhaustive, but are at least a few examples of compiler passes that can add entities with the
|
The spec (v1.2.4) says:
and also:
To me, it is not entirely clear where the
@hidden
annotation of an action is allowed, I can see two possibilities, both make some sense.While the first one makes more sense if we think about
@hidden
as a property of the name, the second option could make sense because the same action can be used in multiple tables.What was the intention behind the spec?
(That said, I don't really see a motivation for hiding actions at all.)
The text was updated successfully, but these errors were encountered: