diff mbox

[ovs-dev,1/5] datapath: Remove all references to SKB_GSO_UDP.

Message ID 1503512502-8836-1-git-send-email-gvrose8192@gmail.com
State Superseded
Headers show

Commit Message

Gregory Rose Aug. 23, 2017, 6:21 p.m. UTC
Upstream commit:
    commit 880388aa3c07fdea4f9b85e35641753017b1852f
    Author: David S. Miller <davem@davemloft.net>
    Date:   Mon Jul 3 07:29:12 2017 -0700

    net: Remove all references to SKB_GSO_UDP.

    Such packets are no longer possible.

    Signed-off-by: David S. Miller <davem@davemloft.net>

Apply openvswitch section of this upstream patch.

Signed-off-by: Greg Rose <gvrose8192@gmail.com>
---
 datapath/flow.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

Comments

Joe Stringer Aug. 23, 2017, 11:21 p.m. UTC | #1
On 23 August 2017 at 11:21, Greg Rose <gvrose8192@gmail.com> wrote:
> Upstream commit:
>     commit 880388aa3c07fdea4f9b85e35641753017b1852f
>     Author: David S. Miller <davem@davemloft.net>
>     Date:   Mon Jul 3 07:29:12 2017 -0700
>
>     net: Remove all references to SKB_GSO_UDP.
>
>     Such packets are no longer possible.
>
>     Signed-off-by: David S. Miller <davem@davemloft.net>
>
> Apply openvswitch section of this upstream patch.
>
> Signed-off-by: Greg Rose <gvrose8192@gmail.com>
> ---

I think that the background context of this patch is that there are no
SKB_GSO_UDP frames in the latest upstream versions of the kernel.
However, in the OVS datapath we will be running against earlier
kernels that still have these flags. If we think that this could
impact forwarding (and we care about such configurations on older
kernels) then we might have to consider #ifdefing these pieces.
Otherwise this seems OK.
Gregory Rose Aug. 24, 2017, 12:41 a.m. UTC | #2
On 08/23/2017 04:21 PM, Joe Stringer wrote:
> On 23 August 2017 at 11:21, Greg Rose <gvrose8192@gmail.com> wrote:
> > Upstream commit:
> >      commit 880388aa3c07fdea4f9b85e35641753017b1852f
> >      Author: David S. Miller <davem@davemloft.net>
> >      Date:   Mon Jul 3 07:29:12 2017 -0700
> >
> >      net: Remove all references to SKB_GSO_UDP.
> >
> >      Such packets are no longer possible.
> >
> >      Signed-off-by: David S. Miller <davem@davemloft.net>
> >
> > Apply openvswitch section of this upstream patch.
> >
> > Signed-off-by: Greg Rose <gvrose8192@gmail.com>
> > ---
>
> I think that the background context of this patch is that there are no
> SKB_GSO_UDP frames in the latest upstream versions of the kernel.
> However, in the OVS datapath we will be running against earlier
> kernels that still have these flags. If we think that this could
> impact forwarding (and we care about such configurations on older
> kernels) then we might have to consider #ifdefing these pieces.
> Otherwise this seems OK.
>
Ah, right.  The patches all passed a travis build for the various kernels but that doesn't necessarily mean it
all works right.  I'll add the appropriate acinclude check and #ifdef and then send a V2.

Thanks for the review!

- Greg
diff mbox

Patch

diff --git a/datapath/flow.c b/datapath/flow.c
index c4f63b0..9bf3eba 100644
--- a/datapath/flow.c
+++ b/datapath/flow.c
@@ -589,8 +589,7 @@  static int key_extract(struct sk_buff *skb, struct sw_flow_key *key)
 			key->ip.frag = OVS_FRAG_TYPE_LATER;
 			return 0;
 		}
-		if (nh->frag_off & htons(IP_MF) ||
-			skb_shinfo(skb)->gso_type & SKB_GSO_UDP)
+		if (nh->frag_off & htons(IP_MF))
 			key->ip.frag = OVS_FRAG_TYPE_FIRST;
 		else
 			key->ip.frag = OVS_FRAG_TYPE_NONE;
@@ -707,9 +706,6 @@  static int key_extract(struct sk_buff *skb, struct sw_flow_key *key)
 
 		if (key->ip.frag == OVS_FRAG_TYPE_LATER)
 			return 0;
-		if (skb_shinfo(skb)->gso_type & SKB_GSO_UDP)
-			key->ip.frag = OVS_FRAG_TYPE_FIRST;
-
 		/* Transport layer. */
 		if (key->ip.proto == NEXTHDR_TCP) {
 			if (tcphdr_ok(skb)) {