[ovs-dev] [PATCHv2 06/20] compat: Backport dev_recursion_level().

Joe Stringer joe at ovn.org
Thu Dec 3 07:53:42 UTC 2015


From: Joe Stringer <joestringer at nicira.com>

Signed-off-by: Joe Stringer <joestringer at nicira.com>
---
 acinclude.m4                                    | 1 +
 datapath/linux/compat/include/linux/netdevice.h | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/acinclude.m4 b/acinclude.m4
index 090712e356df..5aaaa1081262 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -355,6 +355,7 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
   OVS_GREP_IFELSE([$KSRC/include/linux/netdevice.h], [dev_disable_lro])
   OVS_GREP_IFELSE([$KSRC/include/linux/netdevice.h], [dev_get_stats])
   OVS_GREP_IFELSE([$KSRC/include/linux/netdevice.h], [dev_get_by_index_rcu])
+  OVS_GREP_IFELSE([$KSRC/include/linux/netdevice.h], [dev_recursion_level])
   OVS_GREP_IFELSE([$KSRC/include/linux/netdevice.h], [__skb_gso_segment])
   OVS_GREP_IFELSE([$KSRC/include/linux/netdevice.h], [can_checksum_protocol])
   OVS_GREP_IFELSE([$KSRC/include/linux/netdevice.h], [ndo_get_iflink])
diff --git a/datapath/linux/compat/include/linux/netdevice.h b/datapath/linux/compat/include/linux/netdevice.h
index 576989da5312..19a7b8ef53d2 100644
--- a/datapath/linux/compat/include/linux/netdevice.h
+++ b/datapath/linux/compat/include/linux/netdevice.h
@@ -199,6 +199,10 @@ struct pcpu_sw_netstats {
 })
 #endif
 
+#ifndef HAVE_DEV_RECURSION_LEVEL
+static inline bool dev_recursion_level(void) { return false; }
+#endif
+
 #ifndef NET_NAME_USER
 #define NET_NAME_USER 3
 #endif
-- 
2.1.4




More information about the dev mailing list