[P4-dev] Any use case for resubmit and recirculation in P4?
hamkuu at gmail.com
Fri Dec 16 03:48:04 EST 2016
Thanks for your advice.
Motivated by what you mentioned as follows:
> An example of recursive packet processing is parsing options in IPv6 packet.
I was trying to implement a P4 program that can parse IPv6 extension headers. But I’m still confused on how to implement it in a recursive way.
Whether “resubmit” or “recirculation”, they will move the packet back to the Parser and start parsing all over again, though different parsing decision might be made. But I don’t think that’s kind of “recursive packet processing”.
Besides, I noticed that IPv6 extension header and IPv4 options are similar in terms of organization, i.e. in a chaining way. And the example program “TLV_parsing.p4” obviously does not use “resubmit” or “recirculation” for parsing IPv4 options.
Can you articulate what you mean by “An example of recursive packet processing is parsing options in IPv6 packet”?
If that’s wrong literally, can you provide any example concerning “recursive packet processing”?
Thanks in advance.
> On Dec 2, 2016, at 9:29 PM, hemant at mnkcg.com wrote:
> The P4 specification is clear. See text from the P4 document shown between squared brackets below.
> [Many standard networking functions, such as mirroring and recursive packet processing, require more complicated primitives than setting or testing fields. To support such operations, P4 provides primitive actions that allow a packet to be recirculated (sent back to the start of the processing pipeline) or cloned (a second instance of the packet is created).]
> Have programmed a router/switch data plane before? If you had, it’s very common for the data plane to send a packet to the recycle queue, say, for packet replication. Replication is same as mirroring. Another use case is, by default, the data plane matches 64-bits of an IPv6 address but in some cases, the whole 128-bits of the IPv6 address needs matching. Then the data plane sends the packet to the recycle queue. An example of recursive packet processing is parsing options in IPv6 packet.
> -----Original Message-----
> From: P4-dev [mailto:p4-dev-bounces at lists.p4.org] On Behalf Of HAOJU XIAO
> Sent: Friday, December 02, 2016 5:13 AM
> To: p4-dev at lists.p4.org
> Subject: [P4-dev] Any use case for resubmit and recirculation in P4?
> Dear all,
> I noticed that P4 provides primitive operations like resubmit and recirculation. They can redirect packet back to the Parser to have different parsing decisions.
> I'm wondering what kind of scenario when we need "different parsing decisions"? Any hint is appreciated.
> Best Regards,
> Haoju Xiao
> Sent from my iPhone
> P4-dev mailing list
> P4-dev at lists.p4.org <mailto:P4-dev at lists.p4.org>
> http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org <http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the P4-dev