diff mbox

[ovs-dev,06/23] compat: Backport dev_recursion_level().

Message ID 1446926401-55723-7-git-send-email-joestringer@nicira.com
State Superseded
Headers show

Commit Message

Joe Stringer Nov. 7, 2015, 7:59 p.m. UTC
Signed-off-by: Joe Stringer <joestringer@nicira.com>
---
 acinclude.m4                                    | 1 +
 datapath/linux/compat/include/linux/netdevice.h | 4 ++++
 2 files changed, 5 insertions(+)
diff mbox

Patch

diff --git a/acinclude.m4 b/acinclude.m4
index cb3326227f82..aae4e1b6be49 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -357,6 +357,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 c793a8b6c731..667e5b095ea6 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