Open jafingerhut opened 5 years ago
Also, if an action parameter, table search key field, etc. has a type that is a serializable enum type (like myenum1_t
in my previous comment code snippet), is it expected that the type name myenum1_t
should appear as the value of the type_name
field describing that thing?
OK, maybe my last comment on this issue, but who knows?
myenum1_t
to be the type_name
of a table search key field, action parameter, etc. with that declared type, andtype myenum1_t myT
definition based upon myenum1_t
, andmyT
to be the type_name
of a table search key field that is declared as type myT
then:
myT
has myenum1_t
as its underlying type?AI for me to think about this a little bit more, and clarify the limitation if there is one.
Agreed that this combination of a serializable enum with a type
definition "on top of it" is probably unlikely to be a burning desire for anyone to run out and use in their P4 programs. This questions in this issue are really from someone (me) worrying over what combinations of things to test in the p4c compiler, and which ones will or won't work.
Right now p4c supports
type bit<8> mytypename;
, but not this:It supports the enum definition, but not the
type
definition on top of it.Any thoughts on whether this is a serious issue for P4Runtime v1.0? I would not be surprised if it were straightforward to extend p4c and the P4_16 language spec to say that the case above is explicitly supported, but so far it is not.