[P4-dev] clone_egress_pkt_to_egress number of parameters

Antonin Bas antonin at barefootnetworks.com
Wed Aug 3 17:27:55 EDT 2016


Hi Thomas,

Optional arguments for primitive actions (and primitive action overloading)
are not supported by bmv2, so it was decided to make the field_list
parameter required. I believe the next version of the language (scheduled
to be release before the end of the year) will not include support for
optional parameters, which is why I have not deemed necessary to add the
complexity of optional parameters to bmv2.
I guess we could change p4c-bmv2 to generate an empty field list argument
when clone_* is called without a second argument. But usually P4
programmers want to at least carry some metadata information and include
the standard metadata to the field list.

Thanks,

Antonin

On Wed, Aug 3, 2016 at 2:13 PM, Thomas Edwards <Thomas.Edwards at fox.com>
wrote:

> I noticed that although OK with p4c-bmv2, and listed as optional according
> to the P4 Language Specification v1.0.2, the bmv2 simple_switch target
> appears to be unhappy with clone_egress_pkt_to_egress if is does not have
> the field_list parameter, and reports:
>
> "Invalid number of parameters for primitive action
> clone_egress_pkt_to_egress: expected 2 but for 1"
>
> -Thomas
>
> --
> Thomas Edwards
> VP Engineering & Development
> FOX Networks Engineering and Operations
> thomas.edwards at fox.com
> Phone: +1.310.369.6696
> 10201 West Pico Blvd.
> Los Angeles, CA 90035
>
>
> _______________________________________________
> P4-dev mailing list
> P4-dev at lists.p4.org
> http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org
>



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


More information about the P4-dev mailing list