From 21a719d658b44c4a49ba0e46846691cfb7078599 Mon Sep 17 00:00:00 2001 From: Flavio Leitner Date: Fri, 28 Aug 2015 10:37:11 -0300 Subject: [PATCH 1/1] datapath: check for el6 kernels for per_cpu The OVS hook has been backported so it doesn't work to decide per_cpu work arounds. Signed-off-by: Flavio Leitner Signed-off-by: Jesse Gross --- acinclude.m4 | 3 +++ datapath/linux/compat/include/linux/percpu.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/acinclude.m4 b/acinclude.m4 index 6e2878891..73bbe8c4f 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -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 diff --git a/datapath/linux/compat/include/linux/percpu.h b/datapath/linux/compat/include/linux/percpu.h index 4ec64cfa7..2459f55b3 100644 --- a/datapath/linux/compat/include/linux/percpu.h +++ b/datapath/linux/compat/include/linux/percpu.h @@ -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 -- 2.20.1