[P4-dev] [bmv2] Why does the <H> headers struct forbit nested structs?

Kamila Součková kamila at ksp.sk
Fri Feb 1 11:42:03 EST 2019


Hello,

I am trying to create a modular design in P4, and I have come across the
> "Type struct scion_all_headers_t should only contain headers, header
> stacks, or header unions" error. After some searching, I found
> https://github.com/p4lang/behavioral-model/blob/master/docs/simple_switch.md#p4_16-plus-v1model-architecture-notes
> , which confirms that structs in the headers type are in fact not allowed
> in v1model, although the spec does not forbid it. This means that I cannot
> easily keep things hierarchical. So I am wondering, why does this
> restriction exist? And is there any chance that it might go away?
>
A possible alternative question would be "is there an alternative target
that can be used with p4c and does not have this restriction"?

(Also, did my email make it through? I do not see it in the archives...)

Thank you!

Best,
Kamila
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20190201/8c9770ca/attachment-0001.html>


More information about the P4-dev mailing list