datapath: check for el6 kernels for per_cpu
authorFlavio Leitner <fbl@redhat.com>
Fri, 28 Aug 2015 13:37:11 +0000 (10:37 -0300)
committerJesse Gross <jesse@nicira.com>
Fri, 28 Aug 2015 16:47:54 +0000 (09:47 -0700)
The OVS hook has been backported so it doesn't work to
decide per_cpu work arounds.

Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
acinclude.m4
datapath/linux/compat/include/linux/percpu.h

index 6e28788..73bbe8c 100644 (file)
@@ -449,6 +449,9 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
   OVS_GREP_IFELSE([$KSRC/include/uapi/linux/netdevice.h], [NET_NAME_UNKNOWN],
                   [OVS_DEFINE([HAVE_NET_NAME_UNKNOWN])])
 
+  OVS_GREP_IFELSE([$KSRC/include/linux/utsrelease.h], [el6],
+                  [OVS_DEFINE([HAVE_RHEL6_PER_CPU])])
+
   if cmp -s datapath/linux/kcompat.h.new \
             datapath/linux/kcompat.h >/dev/null 2>&1; then
     rm datapath/linux/kcompat.h.new
index 4ec64cf..2459f55 100644 (file)
@@ -7,7 +7,7 @@
 #define this_cpu_ptr(ptr) per_cpu_ptr(ptr, smp_processor_id())
 #endif
 
-#ifdef HAVE_RHEL_OVS_HOOK
+#ifdef HAVE_RHEL6_PER_CPU
 #undef this_cpu_read
 #undef this_cpu_inc
 #undef this_cpu_dec