[P4-dev] clone_egress_pkt_to_egress number of parameters
antonin at barefootnetworks.com
Wed Aug 3 18:26:40 EDT 2016
Thanks for the links Thomas. It is my hope that we can soon build a central
database of p4 programs where users can search open-source p4 programs
based on their use-case.
On Wed, Aug 3, 2016 at 3:03 PM, Thomas Edwards <Thomas.Edwards at fox.com>
> Thanks for the info!
> BTW I have made two new P4 programs available:
> "mc_nat" creates a cascade of replicated packets with network address
> translation with the help of clone_egress_pkt_to_egress:
> "ts_switching" switches RTP flows based on RTP timestamp lookup in a
> schedule table with timestamp ranges:
> 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
> From: Antonin Bas <antonin at barefootnetworks.com>
> Date: Wednesday, August 3, 2016 at 2:27 PM
> To: FNG <thomas.edwards at fox.com>
> Cc: "p4-dev at lists.p4.org" <p4-dev at lists.p4.org>
> Subject: Re: [P4-dev] clone_egress_pkt_to_egress number of parameters
> 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.
> On Wed, Aug 3, 2016 at 2:13 PM, Thomas Edwards <Thomas.Edwards at fox.com>
>> 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 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
> P4-dev mailing list
> P4-dev at lists.p4.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the P4-dev