[P4-discuss] headers syntax
antonin at barefootnetworks.com
Thu May 12 17:47:13 EDT 2016
You are referring to 2 different versions of the P4 language. 1)
corresponds to P4 v1.1, while 2) corresponds to P4 v1.0. The specs for both
versions are available on p4.org: http://p4.org/spec/
The officially supported version on p4lang is P4 v1.0. However we do have
some limited P4 v1.1 support available. You can refer to this email I sent
to the p4-dev mailing list a couple months ago:
In particular we provide a p4-hlir package for P4 v1.1, which is able to
parse and verify P4 v1.1 code. The bmv2 compiler also supports P4 v1.1
through a command line switch.
Let us know if you have further questions.
On Thu, May 12, 2016 at 1:43 PM, ori marcovitch <marcovitch.ori at gmail.com>
> I'm a little bit confused about the header declaration syntax,
> I saw 2 versions for defining fields size:
> *bit<3> pcp; *
> *bit cfi; *
> *bit<12> vid; *
> *pcp : 3; cfi : 1; vid : 12;*
> For what I saw in the specifications i understand the first is the newer
> syntax (although it's less comfortable...). Is this true? and how do I
> define to my p4-compiler which syntax to use?
> Thanks in advance'
> P4-discuss mailing list
> P4-discuss at lists.p4.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the P4-discuss