[P4-dev] clarify nested struct support in P4-16?

Mihai Budiu mbudiu at vmware.com
Wed Aug 23 23:10:45 EDT 2017


P4-16 allows nested structures to an arbitrary degree. Various targets and back-ends may introduce additional restrictions. Some restrictions are due to target limitations, and may never be lifted, some are due to code immaturity in the compilers.

The bmv2 backend removes nested structs that do not appear in control apis (arguments),because bmv does not support nested structs.  More work is needed to remove the other ones. In principle ebpf does not need to remove nested structs, because it generates c, which supports nested structs. However, there are currently no tests with nested structs, so it is possible that they don’t work.

Mihai

From: hemant at mnkcg.com<mailto:hemant at mnkcg.com>
Sent: Wednesday, August 23, 2017 16:47
To: 'p4-dev lists.p4.org'<mailto:p4-dev at lists.p4.org>
Subject: [P4-dev] clarify nested struct support in P4-16?

I don’t see any text in the P4-16 spec that says nested struct is not supported.  At least, when I use p4test, I see a nested struct pass compilation.  When folks get a chance, the EBPF backend could use the same behavior because p4c-ebpf does not support a nested struct.

Hemant
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20170824/3becda0b/attachment-0002.html>


More information about the P4-dev mailing list