]> git.proxmox.com Git - ovs.git/commitdiff
compat: Fix build issue on RHEL 7.7.
authorGreg Rose <gvrose8192@gmail.com>
Thu, 12 Nov 2020 23:10:38 +0000 (15:10 -0800)
committerIlya Maximets <i.maximets@ovn.org>
Mon, 16 Nov 2020 16:47:11 +0000 (17:47 +0100)
RHEL 7.2 introduced a KABI fixup in struct sk_buff for the name
change of  l4_rxhash to l4_hash.  Then patch
9ba57fc7cccc ("datapath: Add hash info to upcall") introduced a
compile error by using l4_hash and not fixing up the HAVE_L4_RXHASH
configuration flag.

Remove all references to HAVE_L4_RXHASH and always use l4_hash to
resolve the issue.  This will break compilation on RHEL 7.0 and
RHEL 7.1 but dropping support for these older kernels shouldn't be
a problem.

Fixes: 9ba57fc7cccc ("datapath: Add hash info to upcall")
Signed-off-by: Greg Rose <gvrose8192@gmail.com>
Acked-by: Yi-Hung Wei <yihung.wei@gmail.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
acinclude.m4
datapath/datapath.c
datapath/linux/compat/include/linux/skbuff.h

index 9c2236f9ec6c24a0abbdbf20c2938dad77b3a70e..ddf4b71e183993329a6f5d84d1f42b44d93830ef 100644 (file)
@@ -877,8 +877,6 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
   OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_clear_hash])
   OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [int.skb_zerocopy(],
                   [OVS_DEFINE([HAVE_SKB_ZEROCOPY])])
-  OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [u8.*l4_rxhash],
-                  [OVS_DEFINE([HAVE_L4_RXHASH])])
   OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_ensure_writable])
   OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_vlan_pop])
   OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [__skb_vlan_pop])
index 52a59f1351c73d5ebad5669ccf8f2df643d78fd5..8e9b9a706194ac3a7112f47d35dc90c41d53ab03 100644 (file)
@@ -529,11 +529,7 @@ static int queue_userspace_packet(struct datapath *dp, struct sk_buff *skb,
                hash |= OVS_PACKET_HASH_SW_BIT;
 #endif
 
-#ifdef HAVE_L4_RXHASH
-       if (skb->l4_rxhash)
-#else
        if (skb->l4_hash)
-#endif
                hash |= OVS_PACKET_HASH_L4_BIT;
 
        if (nla_put(user_skb, OVS_PACKET_ATTR_HASH, sizeof (u64), &hash)) {
index bc73255d5b4c786531a161356d1bdb3333110ff6..396a5e40699fdbdedfd9bb37545f16704c763cdf 100644 (file)
@@ -278,9 +278,7 @@ static inline void skb_clear_hash(struct sk_buff *skb)
 #ifdef HAVE_RXHASH
        skb->rxhash = 0;
 #endif
-#if defined(HAVE_L4_RXHASH)
-       skb->l4_rxhash = 0;
-#endif
+       skb->l4_hash = 0;
 }
 #endif
 
@@ -371,7 +369,7 @@ static inline void skb_pop_mac_header(struct sk_buff *skb)
 #ifndef HAVE_SKB_CLEAR_HASH_IF_NOT_L4
 static inline void skb_clear_hash_if_not_l4(struct sk_buff *skb)
 {
-       if (!skb->l4_rxhash)
+       if (!skb->l4_hash)
                skb_clear_hash(skb);
 }
 #endif
@@ -465,11 +463,7 @@ __skb_set_hash(struct sk_buff *skb, __u32 hash, bool is_sw, bool is_l4)
 #else
        skb->hash = hash;
 #endif
-#if defined(HAVE_L4_RXHASH)
-       skb->l4_rxhash = is_l4;
-#else
        skb->l4_hash = is_l4;
-#endif
 #ifdef HAVE_SW_HASH
        skb->sw_hash = is_sw;
 #endif