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>
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])
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)) {
#ifdef HAVE_RXHASH
skb->rxhash = 0;
#endif
-#if defined(HAVE_L4_RXHASH)
- skb->l4_rxhash = 0;
-#endif
+ skb->l4_hash = 0;
}
#endif
#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
#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