Re: [PATCH net-next 2/3] net: mpls: Fixups for GSO

2016-09-27 Thread Jiri Benc
On Tue, 27 Sep 2016 10:38:41 -0600, David Ahern wrote: > On 9/27/16 1:45 AM, Jiri Benc wrote: > > On Mon, 26 Sep 2016 20:04:06 -0600, David Ahern wrote: > >> you know this code better than me, but key_extract pulls the eth > >> header and then sets network header. If MPLS labels are present then >

Re: [PATCH net-next 2/3] net: mpls: Fixups for GSO

2016-09-27 Thread David Ahern
On 9/27/16 1:45 AM, Jiri Benc wrote: > On Mon, 26 Sep 2016 20:04:06 -0600, David Ahern wrote: >> you know this code better than me, but key_extract pulls the eth >> header and then sets network header. If MPLS labels are present then >> it is the labels that the network_header now points to. How di

Re: [PATCH net-next 2/3] net: mpls: Fixups for GSO

2016-09-27 Thread Jiri Benc
On Mon, 26 Sep 2016 20:04:06 -0600, David Ahern wrote: > you know this code better than me, but key_extract pulls the eth > header and then sets network header. If MPLS labels are present then > it is the labels that the network_header now points to. How did come > to the conclusion it is after the

Re: [PATCH net-next 2/3] net: mpls: Fixups for GSO

2016-09-26 Thread David Ahern
On 9/26/16 11:02 AM, Jiri Benc wrote: > On Mon, 26 Sep 2016 17:56:22 +0200, Jiri Benc wrote: >> After push_mpls, network_header points to the start of MPLS headers. >> Which I understand was the point of this patch. However, push_mpls also >> calls invalidate_flow_key. Meaning that, depending on ac

Re: [PATCH net-next 2/3] net: mpls: Fixups for GSO

2016-09-26 Thread Jiri Benc
On Mon, 26 Sep 2016 17:56:22 +0200, Jiri Benc wrote: > After push_mpls, network_header points to the start of MPLS headers. > Which I understand was the point of this patch. However, push_mpls also > calls invalidate_flow_key. Meaning that, depending on actions, we may > end up calling key_extract

Re: [PATCH net-next 2/3] net: mpls: Fixups for GSO

2016-09-26 Thread Jiri Benc
On Wed, 24 Aug 2016 10:37:51 -0600, David Ahern wrote: > Something like this should be able to handle multiple labels. The > inner network header is set once and the outer one pointing to MPLS > is adjusted each time a label is pushed: > > diff --git a/net/openvswitch/actions.c b/net/openvswitch/a

Re: [PATCH net-next 2/3] net: mpls: Fixups for GSO

2016-08-24 Thread David Ahern
On 8/24/16 12:53 PM, David Ahern wrote: > What change is needed in pop_mpls? It already resets the mac_header and if > MPLS labels are removed there is no need to set network_header. I take it you > mean if the protocol is still MPLS and there are still labels then the > network header needs to

Re: [PATCH net-next 2/3] net: mpls: Fixups for GSO

2016-08-24 Thread pravin shelar
On Wed, Aug 24, 2016 at 11:53 AM, David Ahern wrote: > On 8/24/16 11:41 AM, pravin shelar wrote: >> You also need to change pop_mpls(). > > What change is needed in pop_mpls? It already resets the mac_header and if > MPLS labels are removed there is no need to set network_header. I take it you >

Re: [PATCH net-next 2/3] net: mpls: Fixups for GSO

2016-08-24 Thread David Ahern
On 8/24/16 11:41 AM, pravin shelar wrote: > You also need to change pop_mpls(). What change is needed in pop_mpls? It already resets the mac_header and if MPLS labels are removed there is no need to set network_header. I take it you mean if the protocol is still MPLS and there are still labels t

Re: [PATCH net-next 2/3] net: mpls: Fixups for GSO

2016-08-24 Thread pravin shelar
On Wed, Aug 24, 2016 at 9:37 AM, David Ahern wrote: > On 8/24/16 10:28 AM, pravin shelar wrote: >>> How do you feel about implementing the do_output() idea I suggested above? >>> I'm happy to provide testing and review. >> >> I am not sure about changing do_output(). why not just use same scheme >

Re: [PATCH net-next 2/3] net: mpls: Fixups for GSO

2016-08-24 Thread David Ahern
On 8/24/16 10:28 AM, pravin shelar wrote: >> How do you feel about implementing the do_output() idea I suggested above? >> I'm happy to provide testing and review. > > I am not sure about changing do_output(). why not just use same scheme > to track mpls header in OVS datapath as done in mpls devi

Re: [PATCH net-next 2/3] net: mpls: Fixups for GSO

2016-08-24 Thread pravin shelar
On Wed, Aug 24, 2016 at 12:20 AM, Simon Horman wrote: > Hi David, > > On Tue, Aug 23, 2016 at 01:24:51PM -0600, David Ahern wrote: >> On 8/22/16 8:51 AM, Simon Horman wrote: >> > >> > The scheme that OvS uses so far is that mac_len denotes the number of bytes >> > from the start of the MAC header

Re: [PATCH net-next 2/3] net: mpls: Fixups for GSO

2016-08-24 Thread Simon Horman
Hi David, On Tue, Aug 23, 2016 at 01:24:51PM -0600, David Ahern wrote: > On 8/22/16 8:51 AM, Simon Horman wrote: > > > > The scheme that OvS uses so far is that mac_len denotes the number of bytes > > from the start of the MAC header until its end. In the absence of MPLS that > > will be the begi

Re: [PATCH net-next 2/3] net: mpls: Fixups for GSO

2016-08-23 Thread David Ahern
On 8/22/16 8:51 AM, Simon Horman wrote: > > The scheme that OvS uses so far is that mac_len denotes the number of bytes > from the start of the MAC header until its end. In the absence of MPLS that > will be the beginning of the network header. And in the presence of MPLS it > will be the beginnin

Re: [PATCH net-next 2/3] net: mpls: Fixups for GSO

2016-08-22 Thread Simon Horman
On Mon, Aug 22, 2016 at 07:11:27AM -0600, David Ahern wrote: > On 8/22/16 6:21 AM, Simon Horman wrote: > >> diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c > >> index 1ecbd7715f6d..6d78f162a88b 100644 > >> --- a/net/openvswitch/actions.c > >> +++ b/net/openvswitch/actions.c > >>

Re: [PATCH net-next 2/3] net: mpls: Fixups for GSO

2016-08-22 Thread David Ahern
On 8/22/16 6:21 AM, Simon Horman wrote: >> diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c >> index 1ecbd7715f6d..6d78f162a88b 100644 >> --- a/net/openvswitch/actions.c >> +++ b/net/openvswitch/actions.c >> @@ -167,6 +167,12 @@ static int push_mpls(struct sk_buff *skb, struct >>

Re: [PATCH net-next 2/3] net: mpls: Fixups for GSO

2016-08-22 Thread Simon Horman
On Fri, Aug 19, 2016 at 10:09:01AM -0700, David Ahern wrote: > As reported by Lennert the MPLS GSO code is failing to properly segment > large packets. There are a couple of problems: > > 1. the inner protocol is not set so the gso segment functions for inner >protocol layers are not getting r

Re: [PATCH net-next 2/3] net: mpls: Fixups for GSO

2016-08-19 Thread Alexander Duyck
On Fri, Aug 19, 2016 at 10:09 AM, David Ahern wrote: > As reported by Lennert the MPLS GSO code is failing to properly segment > large packets. There are a couple of problems: > > 1. the inner protocol is not set so the gso segment functions for inner >protocol layers are not getting run, and

[PATCH net-next 2/3] net: mpls: Fixups for GSO

2016-08-19 Thread David Ahern
As reported by Lennert the MPLS GSO code is failing to properly segment large packets. There are a couple of problems: 1. the inner protocol is not set so the gso segment functions for inner protocol layers are not getting run, and 2 MPLS labels for packets that use the "native" (non-OVS) MPL

Re: [PATCH net-next 2/3] net: mpls: Fixups for GSO

2016-08-18 Thread David Ahern
On 8/18/16 8:37 AM, Alexander Duyck wrote: > Thought I would go through and do a second pass since it sounds like > the inner_mac_header idea isn't going to fly. If we can't push this > as an L2 encapsulation there are few tweaks we probably need in order > to make this work as an L3. I have incl

Re: [PATCH net-next 2/3] net: mpls: Fixups for GSO

2016-08-18 Thread Alexander Duyck
Thought I would go through and do a second pass since it sounds like the inner_mac_header idea isn't going to fly. If we can't push this as an L2 encapsulation there are few tweaks we probably need in order to make this work as an L3. I have included comments inline below. Also I haven't worked

Re: [PATCH net-next 2/3] net: mpls: Fixups for GSO

2016-08-17 Thread David Ahern
On 8/17/16 7:06 PM, Alexander Duyck wrote: > On Wed, Aug 17, 2016 at 4:23 PM, David Ahern wrote: >> On 8/17/16 5:16 PM, Alexander Duyck wrote: diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c index 1ecbd7715f6d..6d78f162a88b 100644 --- a/net/openvswitch/actions.c >

Re: [PATCH net-next 2/3] net: mpls: Fixups for GSO

2016-08-17 Thread Alexander Duyck
On Wed, Aug 17, 2016 at 4:23 PM, David Ahern wrote: > On 8/17/16 5:16 PM, Alexander Duyck wrote: >>> diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c >>> index 1ecbd7715f6d..6d78f162a88b 100644 >>> --- a/net/openvswitch/actions.c >>> +++ b/net/openvswitch/actions.c >>> @@ -167,6

Re: [PATCH net-next 2/3] net: mpls: Fixups for GSO

2016-08-17 Thread David Ahern
On 8/17/16 5:16 PM, Alexander Duyck wrote: >> diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c >> index 1ecbd7715f6d..6d78f162a88b 100644 >> --- a/net/openvswitch/actions.c >> +++ b/net/openvswitch/actions.c >> @@ -167,6 +167,12 @@ static int push_mpls(struct sk_buff *skb, struct

Re: [PATCH net-next 2/3] net: mpls: Fixups for GSO

2016-08-17 Thread Alexander Duyck
On Wed, Aug 17, 2016 at 2:49 PM, David Ahern wrote: > As reported by Lennert the MPLS GSO code is failing to properly segment > large packets. There are a couple of problems: > > 1. the inner protocol is not set so the gso segment functions for inner >protocol layers are not getting run, and >

[PATCH net-next 2/3] net: mpls: Fixups for GSO

2016-08-17 Thread David Ahern
As reported by Lennert the MPLS GSO code is failing to properly segment large packets. There are a couple of problems: 1. the inner protocol is not set so the gso segment functions for inner protocol layers are not getting run, and 2 MPLS labels for packets that use the "native" (non-OVS) MPL