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

hemant at mnkcg.com hemant at mnkcg.com
Wed Aug 23 22:49:33 EDT 2017


Thanks much, Andy.  I am fine if nested structs in P4-16 are now allowed.  It’s little cumbersome to work with inconsistency in that p4test is accepting nested structs, but p4c-ebpf (EBPF backend) is not.  I know, it is because p4test includes latest and greatest p4c compiler code and backends such as p4c-ebpf tend to slide for keeping up or not accepting changes that are being discussed.

 

Cheers,

 

hemant

 

From: Andy Fingerhut [mailto:andy.fingerhut at gmail.com] 
Sent: Wednesday, August 23, 2017 8:24 PM
To: hemant at mnkcg.com
Cc: p4-dev lists.p4.org <p4-dev at lists.p4.org>
Subject: Re: [P4-dev] clarify nested struct support in P4-16?

 

Related Github issues:

 

https://github.com/p4lang/p4-spec/issues/342 - "Allow headers to contain bit-vector structs".  Structs are currently disallowed as member fields within headers by the P4_16 spec.

 

https://github.com/p4lang/p4-spec/issues/383 - "Allow 'bit-vector structs' to be used everywhere that type bit<W> can".  There is some discussion on this issue about parts of that proposal that require non-trivial work in the current open source P4 tools, e.g. allowing nested structs as a table search key, or a parameter to an action of a table.

 

Andy

 

On Wed, Aug 23, 2017 at 4:46 PM, <hemant at mnkcg.com <mailto:hemant at mnkcg.com> > wrote:

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


_______________________________________________
P4-dev mailing list
P4-dev at lists.p4.org <mailto:P4-dev at lists.p4.org> 
http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20170823/9bf233d9/attachment-0002.html>


More information about the P4-dev mailing list