compat: Backport dev_recursion_level().
authorJoe Stringer <joestringer@nicira.com>
Thu, 3 Dec 2015 07:53:42 +0000 (23:53 -0800)
committerJoe Stringer <joe@ovn.org>
Fri, 4 Dec 2015 01:08:16 +0000 (17:08 -0800)
Signed-off-by: Joe Stringer <joestringer@nicira.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
acinclude.m4
datapath/linux/compat/include/linux/netdevice.h

index 090712e..5aaaa10 100644 (file)
@@ -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])
index 576989d..19a7b8e 100644 (file)
@@ -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