datapath: compat: Fix build on RHEL 6.6
authorPravin B Shelar <pshelar@nicira.com>
Wed, 12 Nov 2014 02:56:34 +0000 (18:56 -0800)
committerPravin B Shelar <pshelar@nicira.com>
Wed, 19 Nov 2014 23:44:08 +0000 (15:44 -0800)
RHEL 6.6 kernel percpu APIs are broken, so following patch is using OVS
backported version.

Reported-by: Wang Sheng-Hui <shhuiw@gmail.com>
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
datapath/linux/compat/include/linux/percpu.h
datapath/linux/compat/include/linux/skbuff.h

index e0941f7..4ec64cf 100644 (file)
@@ -7,6 +7,12 @@
 #define this_cpu_ptr(ptr) per_cpu_ptr(ptr, smp_processor_id())
 #endif
 
+#ifdef HAVE_RHEL_OVS_HOOK
+#undef this_cpu_read
+#undef this_cpu_inc
+#undef this_cpu_dec
+#endif
+
 #if !defined this_cpu_read
 #define this_cpu_read(ptr) percpu_read(ptr)
 #endif
index 7be0271..67a14b7 100644 (file)
@@ -302,7 +302,7 @@ static inline void skb_clear_hash(struct sk_buff *skb)
 #ifdef HAVE_RXHASH
        skb->rxhash = 0;
 #endif
-#ifdef HAVE_L4_RXHASH
+#if defined(HAVE_L4_RXHASH) && !defined(HAVE_RHEL_OVS_HOOK)
        skb->l4_rxhash = 0;
 #endif
 }