diff options
author | Greg Rose <gvrose8192@gmail.com> | 2020-11-12 15:10:38 -0800 |
---|---|---|
committer | Ilya Maximets <i.maximets@ovn.org> | 2020-11-16 17:47:11 +0100 |
commit | f365b41f9dff9340e7da56aeabb8ceb18037c693 (patch) | |
tree | 3dd8882aa0802364bf380b3951d442f4adb19fad /datapath | |
parent | 922553cb9766e4e2f35a7774211289e3bb042e86 (diff) | |
download | openvswitch-f365b41f9dff9340e7da56aeabb8ceb18037c693.tar.gz |
compat: Fix build issue on RHEL 7.7.
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>
Diffstat (limited to 'datapath')
-rw-r--r-- | datapath/datapath.c | 4 | ||||
-rw-r--r-- | datapath/linux/compat/include/linux/skbuff.h | 10 |
2 files changed, 2 insertions, 12 deletions
diff --git a/datapath/datapath.c b/datapath/datapath.c index 52a59f135..8e9b9a706 100644 --- a/datapath/datapath.c +++ b/datapath/datapath.c @@ -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)) { diff --git a/datapath/linux/compat/include/linux/skbuff.h b/datapath/linux/compat/include/linux/skbuff.h index bc73255d5..396a5e406 100644 --- a/datapath/linux/compat/include/linux/skbuff.h +++ b/datapath/linux/compat/include/linux/skbuff.h @@ -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 |