You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The spec mentions about directionless action arguments:
For an action, a directionless parameter indicates that it is “action data”. See Section 14.1 for the meaning of action data, but its meaning includes the following possibilities:
The parameter's value is provided in the P4 program. In this case, the parameter behaves as if the direction were in.
The phrase "behaves as if the direction were in", I believe, is not quite clear, particularly regarding compile-time known-ness.
The differences between an in parameter and a directionless parameters, aside their copy-in/out semantics, is:
in can be implicitly cast, while directionless cannot (as per the current spec)
directionless argument should be compile-time known, while no such restriction exists for in argument.
So, I wonder if "behaves as if the direction were in" also imply that the directionless arguments supplied to actions in a P4 program (not by the control plane) need not be a compile-time known value?
Relevant to this issue, issue473.p4 in the p4c test suite is expected to be rejected by the frontend.
The spec mentions about directionless action arguments:
The phrase "behaves as if the direction were
in
", I believe, is not quite clear, particularly regarding compile-time known-ness.The differences between an
in
parameter and a directionless parameters, aside their copy-in/out semantics, is:in
can be implicitly cast, while directionless cannot (as per the current spec)in
argument.So, I wonder if "behaves as if the direction were
in
" also imply that the directionless arguments supplied to actions in a P4 program (not by the control plane) need not be a compile-time known value?Relevant to this issue,
issue473.p4
in the p4c test suite is expected to be rejected by the frontend.The text was updated successfully, but these errors were encountered: