-
Notifications
You must be signed in to change notification settings - Fork 444
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
serializer "introduces" compiler names #309
Comments
Actually NoAction is from core.p4, it corresponds to the noop primitive action from p4-16. |
Yeah, we'll have to I'd like to avoid hardcoding things into p4RuntimeSerializer. If there's a need to not expose certain names from |
@mbudiu-vmw is it as simple as adding the |
If this solves this particular problem, please do. |
To avoid ending up with NoAction_<x> names for NoAction clones in the IR and eventually in the p4runtime data. Addresses #309 partially at least.
To avoid ending up with NoAction_<x> names for NoAction clones in the IR and eventually in the p4runtime data. Addresses #309 partially at least.
@antoninbas, #325 eliminates the excessive number of copies of The next step is probably to detect I can put together a patch that does that. |
Hmm, OK. So if the default action is not const, it's not exposed in P4Info? I guess this makes sense - in that situation, the default action is pretty much just specifying the initial state of the table, so it should be exposed via the PI functions that get and set table state. That means I'm not handling default actions correctly, though. I realize now that I'm currently exposing any default action via |
@sethfowler Yes |
@antoninbas So here's what the P4-16 spec has to say:
The "control-plane bound parameters" here are the action data, so it sounds like the spec requires const action data. It sounds like it would be straightforward, syntactically at least, to permit the action data to be bound at runtime - the programmer could just not supply arguments for the control-plane bound parameters in the default action specification - but currently the spec forbids it. |
IIRC in P4_14 you can do just that: |
@sethfowler You can go ahead and close once #326 is merged |
Check out the @defaultonly annotation in the spec. |
I am putting introduces in quotation marks because I know these are introduced by some pass before the p4runtime serializer.
Consider the following P4_14 program:
The p4runtime serializer produces the following output for actions:
NoAction_1
is not a P4 name. Because of this the control plane shouldn't be able to see this "default-default" action at all. I believe it should be removed from the serialized data.The text was updated successfully, but these errors were encountered: