[P4-dev] clone_egress_pkt_to_egress number of parameters

Antonin Bas 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.

Best,

Antonin

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

> 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:
> https://github.com/FOXNEOAdvancedTechnology/mc_nat_P4
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_FOXNEOAdvancedTechnology_mc-5Fnat-5FP4&d=DQMFaQ&c=uw6TLu4hwhHdiGJOgwcWD4AjKQx6zvFcGEsbfiY9-EI&r=lekNOOM5noV61zrPH3rwPyhtNnLLWoLEHgd0quQxly8&m=56gUSGWjQP9GHRmL3w5dq231b14ct1LS1fIiHj5NNrw&s=YFobVq5csdE1FQmL1Vqg09XqEkJEfnQHdtT6Yd3X6Fs&e=>
>
> "ts_switching" switches RTP flows based on RTP timestamp lookup in a
> schedule table with timestamp ranges:
> https://github.com/FOXNEOAdvancedTechnology/ts_switching_P4
>
> -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
>
>
> 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.
>
> 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
>> <https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.p4.org_mailman_listinfo_p4-2Ddev-5Flists.p4.org&d=DQMFaQ&c=uw6TLu4hwhHdiGJOgwcWD4AjKQx6zvFcGEsbfiY9-EI&r=lekNOOM5noV61zrPH3rwPyhtNnLLWoLEHgd0quQxly8&m=kl4X9bm9iEbl9YkAII8lKsS4M3p1ZJbEIp5vs35WThc&s=_HOJkW4iYl1OE112V6J-j2GRpe5DTBEZWauSioFVKng&e=>
>>
>
>
>
> --
> Antonin
>
> _______________________________________________
> 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/456977ba/attachment-0002.html>


More information about the P4-dev mailing list