[ovs-dev,02/15] datapath: Remove all references to SKB_GSO_UDP.

Message ID 1505152570-6143-2-git-send-email-gvrose8192@gmail.com
State New
Headers show
Series
  • [ovs-dev,01/15] acinclude: Check for SKB_GSO_UDP
Related show

Commit Message

Greg Rose Sept. 11, 2017, 5:55 p.m.
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>

SKB_GSO_UDP is removed in the upstream kernel.  Use HAVE_SKB_GSO_UDP
define from acinclude to detect if SKB_GSO_UDP exists and if so apply
openvswitch section of this upstream patch.

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

Patch

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