[P4-dev] P4-16 HLIR with struct support?

Antonin Bas antonin at barefootnetworks.com
Mon May 8 13:04:39 EDT 2017


Compilation fails for me as well, but with a different error message:

includes/headers.p4(18): error: header ipv4_t: Duplicates declaration
header ipv4_t
header_type ipv4_t {
^
includes/headers.p4(18)
header_type ipv4_t {
^
error: 1 errors encountered, aborting compilation

You may want to open an issue in p4lang/p4c

On Sun, May 7, 2017 at 2:53 PM, <hemant at mnkcg.com> wrote:

> In the p4-hlir/tests directory, there is a stateful.p4 file (
> https://github.com/p4lang/p4-hlir/blob/master/tests/stateful.p4).
>
>
>
> I used the following p4c compilation.  The compiler fails to compile this
> P4-14 file.  Did I do anything wrong using the p4c compiler to compile
> P4-14 code?
>
> ~/p4-hlir/tests$ p4c -S -x p4-14 stateful.p4
>
>
>
>
>
> includes/parser.p4(46): error: : No header type ipv4_t
>
> header ipv4_t ipv4;
>
> ^^^^^^^^^^^^^^^^^^^
>
> includes/parser.p4(46)
>
> header ipv4_t ipv4;
>
>        ^^^^^^
>
> error: 1 errors encountered, aborting compilation
>
>
>
> ~/p4-hlir/tests$
>
>
>
> Best,
>
>
>
> Hemant
>
>
>
> *From:* Antonin Bas [mailto:antonin at barefootnetworks.com]
> *Sent:* Monday, May 01, 2017 11:19 PM
> *To:* hemant at mnkcg.com
> *Cc:* p4-dev <p4-dev at lists.p4.org>
> *Subject:* Re: [P4-dev] P4-16 HLIR with struct support?
>
>
>
> Hi Hemant,
>
>
>
> There is no plan to update p4-hlir to support P4_16.
>
> Instead we encourage people to move to the new p4lang/p4c compiler,
> written in C++, which supports both P4_14 and P4_16: https://github.com/
> p4lang/p4c
>
> We will keep maintaining p4-hlir for the time being, but no new features
> will be added.
>
>
>
> Best,
>
>
>
> Antonin
>
>
>
> On Mon, May 1, 2017 at 7:16 PM, <hemant at mnkcg.com> wrote:
>
> I am interested is using a P4-16 struct in a test program with p4-hlir.  I
> don’t see the HLIR updated yet with struct from P4-16.
>
>
>
> Hemant
>
>
> _______________________________________________
> P4-dev mailing list
> P4-dev at lists.p4.org
> http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org
>
>
>
>
>
> --
>
> Antonin
>



-- 
Antonin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20170508/74a938b4/attachment-0002.html>


More information about the P4-dev mailing list