Re: [ovs-dev] [PATCH v5] tunneling: Avoid recirculation on datapath by computing the recirculate actions at translate time.

2017-05-26 Thread Chandran, Sugesh
Thank you Joe for the response. Regards _Sugesh > -Original Message- > From: Joe Stringer [mailto:j...@ovn.org] > Sent: Friday, May 26, 2017 7:02 PM > To: Chandran, Sugesh > Cc: Zoltán Balogh ; Andy Zhou > ; William

Re: [ovs-dev] [PATCH v5] tunneling: Avoid recirculation on datapath by computing the recirculate actions at translate time.

2017-05-26 Thread Joe Stringer
On 26 May 2017 at 10:42, Chandran, Sugesh wrote: > > > Regards > _Sugesh > > >> -Original Message- >> From: Zoltán Balogh [mailto:zoltan.bal...@ericsson.com] >> Sent: Friday, May 26, 2017 3:01 PM >> To: Joe Stringer >> Cc: Chandran, Sugesh

Re: [ovs-dev] [PATCH v5] tunneling: Avoid recirculation on datapath by computing the recirculate actions at translate time.

2017-05-26 Thread Joe Stringer
On 26 May 2017 at 07:00, Zoltán Balogh wrote: > > Hi Joe, > >> Backing up a bit for context, the stats attribution goes roughly like this: >> * First upcall, handler thread calls through the translate code with a >> packet. The resubmit_stats are derived from that

Re: [ovs-dev] [PATCH v5] tunneling: Avoid recirculation on datapath by computing the recirculate actions at translate time.

2017-05-26 Thread Chandran, Sugesh
Regards _Sugesh > -Original Message- > From: Zoltán Balogh [mailto:zoltan.bal...@ericsson.com] > Sent: Friday, May 26, 2017 3:01 PM > To: Joe Stringer > Cc: Chandran, Sugesh ; Andy Zhou > ; William Tu ; >

Re: [ovs-dev] [PATCH v5] tunneling: Avoid recirculation on datapath by computing the recirculate actions at translate time.

2017-05-26 Thread Zoltán Balogh
Hi Joe, > Backing up a bit for context, the stats attribution goes roughly like this: > * First upcall, handler thread calls through the translate code with a > packet. The resubmit_stats are derived from that packet. This goes > through xlate_actions(). > * First dump of flow from revalidator

Re: [ovs-dev] [PATCH v5] tunneling: Avoid recirculation on datapath by computing the recirculate actions at translate time.

2017-05-17 Thread Joe Stringer
On 17 May 2017 at 04:37, Zoltán Balogh wrote: > Hi Joe > > I started to rework my patch based on your comments and suggestions. I had > some > difficulties with the last one. Let us focus on this below. > >> >> > if (credit_counts) { >> >> > +uint64_t

Re: [ovs-dev] [PATCH v5] tunneling: Avoid recirculation on datapath by computing the recirculate actions at translate time.

2017-05-17 Thread Zoltán Balogh
Hi Joe I started to rework my patch based on your comments and suggestions. I had some difficulties with the last one. Let us focus on this below. > >> > if (credit_counts) { > >> > +uint64_t stats_n_bytes = 0; > >> > + > >> > +if (rule->truncated_packet_size) { > >> > +

Re: [ovs-dev] [PATCH v5] tunneling: Avoid recirculation on datapath by computing the recirculate actions at translate time.

2017-05-13 Thread Darrell Ball
On 5/11/17, 7:31 AM, "William Tu" wrote: On Wed, May 10, 2017 at 11:04 AM, Darrell Ball wrote: > What are the use case(s) of truncate “outside” of sampling/mirroring ? > The use of truncation in the context of sampling/mirroring is well known.

Re: [ovs-dev] [PATCH v5] tunneling: Avoid recirculation on datapath by computing the recirculate actions at translate time.

2017-05-11 Thread Andy Zhou
On Thu, May 11, 2017 at 9:12 AM, Joe Stringer wrote: > On 10 May 2017 at 17:08, Andy Zhou wrote: >> On Wed, May 10, 2017 at 2:30 PM, Joe Stringer wrote: >>> On 10 May 2017 at 12:59, Andy Zhou wrote: On Wed, May 10, 2017 at 7:56 AM,

Re: [ovs-dev] [PATCH v5] tunneling: Avoid recirculation on datapath by computing the recirculate actions at translate time.

2017-05-11 Thread Andy Zhou
On Thu, May 11, 2017 at 7:57 AM, William Tu wrote: > [snip] Picking up the topic of trunc on patch port. Instead of banning trunc output to a patch port, any down side of translating that to trunc, clone()? After all, native tunneling looks a lot

Re: [ovs-dev] [PATCH v5] tunneling: Avoid recirculation on datapath by computing the recirculate actions at translate time.

2017-05-11 Thread Joe Stringer
On 11 May 2017 at 09:04, Zoltán Balogh wrote: > Hi Joe, > > Thank you for your comments! Please, find my answers below. > >> I had trouble trying to review this, in part because I felt like >> changes to fix multiple issues are being placed into one patch. If >> there

Re: [ovs-dev] [PATCH v5] tunneling: Avoid recirculation on datapath by computing the recirculate actions at translate time.

2017-05-11 Thread Joe Stringer
On 10 May 2017 at 17:08, Andy Zhou wrote: > On Wed, May 10, 2017 at 2:30 PM, Joe Stringer wrote: >> On 10 May 2017 at 12:59, Andy Zhou wrote: >>> On Wed, May 10, 2017 at 7:56 AM, William Tu wrote: > It may be cleaner if we add

Re: [ovs-dev] [PATCH v5] tunneling: Avoid recirculation on datapath by computing the recirculate actions at translate time.

2017-05-11 Thread Zoltán Balogh
Hi Joe, Thank you for your comments! Please, find my answers below. > I had trouble trying to review this, in part because I felt like > changes to fix multiple issues are being placed into one patch. If > there are separate issues being addressed, each issue should be fixed > in a separate

Re: [ovs-dev] [PATCH v5] tunneling: Avoid recirculation on datapath by computing the recirculate actions at translate time.

2017-05-11 Thread William Tu
[snip] >>> Picking up the topic of trunc on patch port. >>> >>> Instead of banning trunc output to a patch port, any down side of >>> translating that >>> to trunc, clone()? After all, native tunneling >>> looks a lot like patch port conceptually. >> >> How does clone() interact with trunc() in

Re: [ovs-dev] [PATCH v5] tunneling: Avoid recirculation on datapath by computing the recirculate actions at translate time.

2017-05-11 Thread William Tu
On Wed, May 10, 2017 at 11:04 AM, Darrell Ball wrote: > What are the use case(s) of truncate “outside” of sampling/mirroring ? > The use of truncation in the context of sampling/mirroring is well known. > I don't know any other use cases outside sampling/mirroring. Truncate the

Re: [ovs-dev] [PATCH v5] tunneling: Avoid recirculation on datapath by computing the recirculate actions at translate time.

2017-05-10 Thread Andy Zhou
On Wed, May 10, 2017 at 2:30 PM, Joe Stringer wrote: > On 10 May 2017 at 12:59, Andy Zhou wrote: >> On Wed, May 10, 2017 at 7:56 AM, William Tu wrote: It may be cleaner if we add a new trunc action for the datapath, say trunc2 that

Re: [ovs-dev] [PATCH v5] tunneling: Avoid recirculation on datapath by computing the recirculate actions at translate time.

2017-05-10 Thread Jarno Rajahalme
> > On May 10, 2017, at 12:59 PM, Andy Zhou > wrote: > > On Wed, May 10, 2017 at 7:56 AM, William Tu > wrote: >>> It may be cleaner if we add a new trunc action for the datapath, say >>> trunc2 that

Re: [ovs-dev] [PATCH v5] tunneling: Avoid recirculation on datapath by computing the recirculate actions at translate time.

2017-05-10 Thread Jarno Rajahalme
> On May 10, 2017, at 12:59 PM, Andy Zhou wrote: > > On Wed, May 10, 2017 at 7:56 AM, William Tu > wrote: >>> It may be cleaner if we add a new trunc action for the datapath, say >>> trunc2 that applies >>> to all outputs within

Re: [ovs-dev] [PATCH v5] tunneling: Avoid recirculation on datapath by computing the recirculate actions at translate time.

2017-05-10 Thread Joe Stringer
On 10 May 2017 at 12:59, Andy Zhou wrote: > On Wed, May 10, 2017 at 7:56 AM, William Tu wrote: >>> It may be cleaner if we add a new trunc action for the datapath, say >>> trunc2 that applies >>> to all outputs within the clone. >>> >>> So the translation will

Re: [ovs-dev] [PATCH v5] tunneling: Avoid recirculation on datapath by computing the recirculate actions at translate time.

2017-05-10 Thread Andy Zhou
On Wed, May 10, 2017 at 7:56 AM, William Tu wrote: >> It may be cleaner if we add a new trunc action for the datapath, say >> trunc2 that applies >> to all outputs within the clone. >> >> So the translation will look like: clone(trunc2, native tunnel >> translation). Would

Re: [ovs-dev] [PATCH v5] tunneling: Avoid recirculation on datapath by computing the recirculate actions at translate time.

2017-05-10 Thread Joe Stringer
On 9 May 2017 at 04:46, Zoltán Balogh wrote: > Hi, > > Thank you for your comments. Actually, I was wrong in my previous e-mail when > I stated that packet is truncated only at the end of the pipeline, when > output is applied. The packet size is set according

Re: [ovs-dev] [PATCH v5] tunneling: Avoid recirculation on datapath by computing the recirculate actions at translate time.

2017-05-10 Thread William Tu
> It may be cleaner if we add a new trunc action for the datapath, say > trunc2 that applies > to all outputs within the clone. > > So the translation will look like: clone(trunc2, native tunnel > translation). Would this > approach work? > Or how about we apply actual packet truncation when

Re: [ovs-dev] [PATCH v5] tunneling: Avoid recirculation on datapath by computing the recirculate actions at translate time.

2017-05-09 Thread Zoltán Balogh
Hi, Thank you for your comments. Actually, I was wrong in my previous e-mail when I stated that packet is truncated only at the end of the pipeline, when output is applied. The packet size is set according max_len set by truncate when tunnel_push is applied. So the size of packet is correct.

Re: [ovs-dev] [PATCH v5] tunneling: Avoid recirculation on datapath by computing the recirculate actions at translate time.

2017-05-08 Thread Andy Zhou
On Mon, May 8, 2017 at 11:29 AM, Zoltán Balogh wrote: > Hi William, > > The reason of 'incorrect' n_bytes stats could be due to the mechanism truncate > and tunneling with clone action do work. As you wrote, the packet size is > changed when the output action is

Re: [ovs-dev] [PATCH v5] tunneling: Avoid recirculation on datapath by computing the recirculate actions at translate time.

2017-05-08 Thread Zoltán Balogh
Hi William, The reason of 'incorrect' n_bytes stats could be due to the mechanism truncate and tunneling with clone action do work. As you wrote, the packet size is changed when the output action is applied. Let's say, I have the config below: ns1 | +--o-+ |

Re: [ovs-dev] [PATCH v5] tunneling: Avoid recirculation on datapath by computing the recirculate actions at translate time.

2017-05-08 Thread William Tu
Hi Zoltan, Yes, we disallow truncate followed by patch port as output on purpose. The reason is that truncate action sets the packet's new length in its metadata instead of immediately change the size. Actual change of the packet size happens when we see the output action. Carrying this

Re: [ovs-dev] [PATCH v5] tunneling: Avoid recirculation on datapath by computing the recirculate actions at translate time.

2017-05-08 Thread Zoltán Balogh
Hi, I looked into the code of truncate, I saw that patch ports are not handled. On the other hand I saw that "Avoid recirculation" commit should not be affected by this fact. I verified that packets are truncated correctly with my last patch I sent you before, but flow stats are not correct on

Re: [ovs-dev] [PATCH v5] tunneling: Avoid recirculation on datapath by computing the recirculate actions at translate time.

2017-05-07 Thread Zoltán Balogh
> >> I have a patch that fixes tunneling over patch ports. The 14th > >> system-userspace > >> test still does fail, but now the packet size in the dump flow remains 242. > >> > >> ./system-traffic.at:554: ovs-ofctl dump-flows br0 | grep "in_port=2" | sed > >> -n 's/.*\(n\_bytes=[0-9]*\).*/\1/p'

Re: [ovs-dev] [PATCH v5] tunneling: Avoid recirculation on datapath by computing the recirculate actions at translate time.

2017-05-05 Thread Joe Stringer
On 5 May 2017 at 11:50, Joe Stringer wrote: > On 5 May 2017 at 10:54, Zoltán Balogh wrote: >> Hi, >> >>> Thanks for taking a look. Andy and I have been throwing some thoughts >>> around about this, but I'm not sure we came to a concrete solution yet >>>

Re: [ovs-dev] [PATCH v5] tunneling: Avoid recirculation on datapath by computing the recirculate actions at translate time.

2017-05-05 Thread Joe Stringer
On 5 May 2017 at 10:54, Zoltán Balogh wrote: > Hi, > >> Thanks for taking a look. Andy and I have been throwing some thoughts >> around about this, but I'm not sure we came to a concrete solution yet >> either. My main thought is that I think that the 'flow' needs to

Re: [ovs-dev] [PATCH v5] tunneling: Avoid recirculation on datapath by computing the recirculate actions at translate time.

2017-05-05 Thread Zoltán Balogh
Hi, > Thanks for taking a look. Andy and I have been throwing some thoughts > around about this, but I'm not sure we came to a concrete solution yet > either. My main thought is that I think that the 'flow' needs to be > modified in the similar way that the 'push_tnl' would work in the >

Re: [ovs-dev] [PATCH v5] tunneling: Avoid recirculation on datapath by computing the recirculate actions at translate time.

2017-05-05 Thread Chandran, Sugesh
Regards _Sugesh > -Original Message- > From: Zoltán Balogh [mailto:zoltan.bal...@ericsson.com] > Sent: Friday, May 5, 2017 9:19 AM > To: Joe Stringer ; Chandran, Sugesh > > Cc: ovs dev ; Ben Pfaff ; William Tu

Re: [ovs-dev] [PATCH v5] tunneling: Avoid recirculation on datapath by computing the recirculate actions at translate time.

2017-05-05 Thread Zoltán Balogh
Hi Joe, > Thanks for taking a look. Andy and I have been throwing some thoughts > around about this, but I'm not sure we came to a concrete solution yet > either. My main thought is that I think that the 'flow' needs to be > modified in the similar way that the 'push_tnl' would work in the >

Re: [ovs-dev] [PATCH v5] tunneling: Avoid recirculation on datapath by computing the recirculate actions at translate time.

2017-05-04 Thread Joe Stringer
On 4 May 2017 at 04:39, Zoltán Balogh wrote: >> I think that what's happening is that when build_tunnel_send() >> serializes the ODP action for push_tunnel, it doesn't update the >> 'flow' to reflect the new encapsulated state of the packet. Then, when >> calling

Re: [ovs-dev] [PATCH v5] tunneling: Avoid recirculation on datapath by computing the recirculate actions at translate time.

2017-05-04 Thread William Tu
On Thu, May 4, 2017 at 4:39 AM, Zoltán Balogh wrote: >> I think that what's happening is that when build_tunnel_send() >> serializes the ODP action for push_tunnel, it doesn't update the >> 'flow' to reflect the new encapsulated state of the packet. Then, when >>

Re: [ovs-dev] [PATCH v5] tunneling: Avoid recirculation on datapath by computing the recirculate actions at translate time.

2017-05-04 Thread Zoltán Balogh
> I think that what's happening is that when build_tunnel_send() > serializes the ODP action for push_tunnel, it doesn't update the > 'flow' to reflect the new encapsulated state of the packet. Then, when > calling apply_nested_clone_actions() it performs lookup in the second > bridge using the

Re: [ovs-dev] [PATCH v5] tunneling: Avoid recirculation on datapath by computing the recirculate actions at translate time.

2017-05-03 Thread Joe Stringer
On 11 April 2017 at 03:14, Sugesh Chandran wrote: > Openvswitch datapath recirculates packets for tunneling, i.e. > the incoming packets are encapsulated at first pass. Further actions are > applied on encapsulated packets on the second pass after recirculating. > The

Re: [ovs-dev] [PATCH v5] tunneling: Avoid recirculation on datapath by computing the recirculate actions at translate time.

2017-04-21 Thread Ben Pfaff
Thanks for keeping this going! I applied it to master. On Thu, Apr 13, 2017 at 08:25:07AM +, Chandran, Sugesh wrote: > Can anyone have a look on this patch?? > > Regards > _Sugesh > > > > -Original Message- > > From: Chandran, Sugesh > > Sent: Tuesday, April 11, 2017 11:14 AM > >

Re: [ovs-dev] [PATCH v5] tunneling: Avoid recirculation on datapath by computing the recirculate actions at translate time.

2017-04-13 Thread Chandran, Sugesh
Can anyone have a look on this patch?? Regards _Sugesh > -Original Message- > From: Chandran, Sugesh > Sent: Tuesday, April 11, 2017 11:14 AM > To: d...@openvswitch.org; b...@ovn.org > Cc: Chandran, Sugesh ; Zoltán Balogh > >

[ovs-dev] [PATCH v5] tunneling: Avoid recirculation on datapath by computing the recirculate actions at translate time.

2017-04-11 Thread Sugesh Chandran
Openvswitch datapath recirculates packets for tunneling, i.e. the incoming packets are encapsulated at first pass. Further actions are applied on encapsulated packets on the second pass after recirculating. The proposed patch compute and append the post tunnel actions at the time of translation