diff options
author | Joe Stringer <joestringer@nicira.com> | 2014-04-28 13:59:25 +1200 |
---|---|---|
committer | Joe Stringer <joestringer@nicira.com> | 2014-04-29 14:08:35 +1200 |
commit | bf52ed49bfd2eadbf219c0ac7c87c699bcabd7a8 (patch) | |
tree | 1568955bcebfbc949d4c61215c647f5303c790cd | |
parent | 82e413df62d395f95052ccc3edda941c55258bbe (diff) |
datapath: Check for backported skb_orphan_frags().v2.1.1
This was causing build failures on debian wheezy. Check for the feature
rather than the version.
Signed-off-by: Joe Stringer <joestringer@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
-rw-r--r-- | acinclude.m4 | 1 | ||||
-rw-r--r-- | datapath/linux/compat/include/linux/skbuff.h | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index 8ff58280e..b675e41a8 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -262,6 +262,7 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [ OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [__skb_fill_page_desc]) OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_reset_mac_len]) OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_unclone]) + OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_orphan_frags]) OVS_GREP_IFELSE([$KSRC/include/linux/types.h], [bool], [OVS_DEFINE([HAVE_BOOL_TYPE])]) diff --git a/datapath/linux/compat/include/linux/skbuff.h b/datapath/linux/compat/include/linux/skbuff.h index cc2bf0e1b..714c955be 100644 --- a/datapath/linux/compat/include/linux/skbuff.h +++ b/datapath/linux/compat/include/linux/skbuff.h @@ -243,12 +243,12 @@ static inline int skb_unclone(struct sk_buff *skb, gfp_t pri) } #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(3,6,0) +#ifndef HAVE_SKB_ORPHAN_FRAGS static inline int skb_orphan_frags(struct sk_buff *skb, gfp_t gfp_mask) { return 0; } -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,6,0) */ +#endif #if LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0) #define __skb_get_rxhash rpl__skb_get_rxhash |