[P4-dev] Cut-through switching specification at P4 level

Saulo Queiroz ssaulojorge at gmail.com
Sat May 20 12:06:23 EDT 2017


Many thanks Han, you clarified me a lot of things. Only let me check if i
got the
central point I need.

Based on what you said about slide 45, I understood that "MyIngress()"
immediatelly forwards to PRE each byte it receives i.e.  "MyIngress()" does
not await all bytes of a frame to start forwarding each of them, right?

This is what I need to implement my extern functionality in PRE.

thanks again.



2017-05-18 14:16 GMT-03:00 Han Wang <hw342 at cornell.edu>:

> Hi Saulo,
>
> Here is my 2c.
>
> "Cut-through" and "store-and-forward” features are often implemented in
> the packet queueing engine in a packet processing pipeline. If you look at
> slide 45 in the p4-16 tutorial slides from yesterday’s P4 workshop.
> http://p4.org/wp-content/uploads/2017/05/P4D2-P4_16-Introduction.pdf ,
> the big red box in the middle — “Packet Replication Engine” is where the
> ‘cut-through' feature should be implemented. In P4-16, the packet
> replication engine is represented as an ‘extern’, which exposes a set of
> APIs for controlling its forwarding behaviors. “Cut-through” and
> “store-and-forward’ mode switching could be one of these APIs.
>
> As for your question of whether in a P4 program, one can specify if a
> packet is forwarded in cut-through mode or store-and-forward mode, my
> answer would be: the language supports it through the extern mechanism, but
> it is up to the backend and target to implement such feature in a real
> device.
>
> Han
>
> On May 18, 2017, at 9:33 AM, Saulo Queiroz <ssaulojorge at gmail.com> wrote:
>
> If i'm not wrong, some targets offer the feature as an administrative
> configuration parameter, i.e.
> store-and-forward, cut-through or "dynamic" (following some heuristic to
> determine the forwarding mode
> in a per frame basis). Unless cut-through is definetly left-behind, would
> not be the case to offer such option at
> P4 level to be even more platform-generic?
>
> Also, some researchers may test specific algorithms based on the options.
>
>
>
> 2017-05-17 19:59 GMT-03:00 Andy Fingerhut <andy.fingerhut at gmail.com>:
>
>> I am not aware of any way to specify this in the P4 language (and I've
>> read through the spec several times in the last couple of weeks).  The most
>> the spec has to say about it is to note that if you want to access a packet
>> length field, that would be impossible on a cut-through target
>> implementation, so a program accessing such information would not be
>> portable to such a target (Section 11.8 "Data Extraction" of the P4-16
>> spec).
>>
>> Just about everything I can think of that you would want to write a P4
>> program would be independent of whether the target was cut-through or
>> store-and-forward.  Do you have some application or feature in mind where
>> that would make a difference to you when writing P4 code?
>>
>> Andy
>>
>>
>> On Wed, May 17, 2017 at 5:36 AM, Saulo Queiroz <ssaulojorge at gmail.com>
>> wrote:
>>
>>> Hi all,
>>>
>>> Is it possible to specify at P4 level whether a given target operate
>>> as cut-though or store-and-forward?
>>>
>>> BTW, does switch.p4 support cut-through?
>>>
>>>
>>> thanks in advance
>>>
>>> --
>>> Saulo Jorge bq
>>> - "Beware of bugs in the above code; I have only proved it correct, not
>>> tried it."
>>> Donald Knuth.
>>>
>>> _______________________________________________
>>> P4-dev mailing list
>>> P4-dev at lists.p4.org
>>> http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org
>>>
>>
>>
>
>
> --
> Saulo Jorge bq
> - "Beware of bugs in the above code; I have only proved it correct, not
> tried it."
> Donald Knuth.
> _______________________________________________
> P4-dev mailing list
> P4-dev at lists.p4.org
> http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org
>
>
>


-- 
Saulo Jorge bq
- "Beware of bugs in the above code; I have only proved it correct, not
tried it."
Donald Knuth.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20170520/da586d2a/attachment-0002.html>


More information about the P4-dev mailing list