[ovs-dev] [PATCH 2/2] datapath: compat: Add configure check for lockdep_rtnl_is_held()

Pravin B Shelar pshelar at nicira.com
Fri Dec 20 22:30:34 UTC 2013


RHEL6-openstack kernel has backported lockdep_rtnl_is_held().

Signed-off-by: Pravin B Shelar <pshelar at nicira.com>
---
 acinclude.m4                                    |    1 +
 datapath/linux/compat/include/linux/rtnetlink.h |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/acinclude.m4 b/acinclude.m4
index 1509b2e..99b4054 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -233,6 +233,7 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
   OVS_GREP_IFELSE([$KSRC/include/linux/rcupdate.h], [rcu_read_lock_held], [],
                   [OVS_GREP_IFELSE([$KSRC/include/linux/rtnetlink.h],
                                    [rcu_read_lock_held])])
+  OVS_GREP_IFELSE([$KSRC/include/linux/rtnetlink.h], [lockdep_rtnl_is_held])
   
   # Check for the proto_data_valid member in struct sk_buff.  The [^@]
   # is necessary because some versions of this header remove the
diff --git a/datapath/linux/compat/include/linux/rtnetlink.h b/datapath/linux/compat/include/linux/rtnetlink.h
index a1b689c..cd1e1a0 100644
--- a/datapath/linux/compat/include/linux/rtnetlink.h
+++ b/datapath/linux/compat/include/linux/rtnetlink.h
@@ -3,7 +3,7 @@
 
 #include_next <linux/rtnetlink.h>
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,34)
+#ifndef HAVE_LOCKDEP_RTNL_IS_HELD
 #ifdef CONFIG_PROVE_LOCKING
 static inline int lockdep_rtnl_is_held(void)
 {
-- 
1.7.1




More information about the dev mailing list