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 in section 6.8. Calling convention that,
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. Such an argument expression need not be a compile-time known value.
The parameter’s value is provided by the control plane software when an entry is added to a table that uses that action. See Section 14.1.
But test issue473.p4 is categorized under p4_16_errors, expecting the frontend to reject the program with:
issue473.p4(70): [--Werror=type-error] error: (bit<8>)meta.d: action argument must be a compile-time constant
default_action = b(meta.c, (bit<8>) meta.d);
^^^^^^^^^^^^^^^
I believe this is not in line with the current spec, since b(meta.c, (bit<8>) meta.d) is written within a P4 program (not by the control plane), thus the directionless argument (bit<8>) meta.d need not be a compile-time known value.
The text was updated successfully, but these errors were encountered:
fruffy
added
bug
This behavior is unintended and should be fixed.
p4-spec
Topics related to the P4 specification (https://github.com/p4lang/p4-spec/).
labels
Dec 2, 2024
The spec mentions in section 6.8. Calling convention that,
But test issue473.p4 is categorized under
p4_16_errors
, expecting the frontend to reject the program with:I believe this is not in line with the current spec, since
b(meta.c, (bit<8>) meta.d)
is written within a P4 program (not by the control plane), thus the directionless argument(bit<8>) meta.d
need not be a compile-time known value.The text was updated successfully, but these errors were encountered: