From: Ben Pfaff Date: Thu, 27 May 2010 22:29:29 +0000 (-0700) Subject: datapath: Check for skb_cow_head(), not skb_cow(). X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4eb26d3cd41b6bcbd3e12e85bc9e4f36f47eb430;p=openvswitch datapath: Check for skb_cow_head(), not skb_cow(). skb_cow() has been present since 2.6.12 or earlier, but skb_cow_head() was added only in 2.6.23, so we were checking for the wrong identifier here. --- diff --git a/acinclude.m4 b/acinclude.m4 index cabe7d3a..015bf665 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -157,8 +157,8 @@ AC_DEFUN([OVS_CHECK_LINUX26_COMPAT], [ OVS_GREP_IFELSE([$KSRC26/include/linux/skbuff.h], [skb_copy_from_linear_data_offset], [OVS_DEFINE([HAVE_SKB_COPY_FROM_LINEAR_DATA_OFFSET])]) - OVS_GREP_IFELSE([$KSRC26/include/linux/skbuff.h], [skb_cow], - [OVS_DEFINE([HAVE_SKB_COW])]) + OVS_GREP_IFELSE([$KSRC26/include/linux/skbuff.h], [skb_cow_head], + [OVS_DEFINE([HAVE_SKB_COW_HEAD])]) OVS_GREP_IFELSE([$KSRC26/include/linux/skbuff.h], [skb_transport_header], [OVS_DEFINE([HAVE_SKBUFF_HEADER_HELPERS])]) OVS_GREP_IFELSE([$KSRC26/include/linux/skbuff.h], [skb_warn_if_lro], diff --git a/datapath/linux-2.6/compat-2.6/include/linux/skbuff.h b/datapath/linux-2.6/compat-2.6/include/linux/skbuff.h index 5ed0e48f..15acea9e 100644 --- a/datapath/linux-2.6/compat-2.6/include/linux/skbuff.h +++ b/datapath/linux-2.6/compat-2.6/include/linux/skbuff.h @@ -53,7 +53,7 @@ static inline void skb_copy_to_linear_data_offset(struct sk_buff *skb, #define NET_SKB_PAD 16 #endif -#ifndef HAVE_SKB_COW +#ifndef HAVE_SKB_COW_HEAD static inline int __skb_cow(struct sk_buff *skb, unsigned int headroom, int cloned) { @@ -74,7 +74,7 @@ static inline int skb_cow_head(struct sk_buff *skb, unsigned int headroom) { return __skb_cow(skb, headroom, skb_header_cloned(skb)); } -#endif /* !HAVE_SKB_COW */ +#endif /* !HAVE_SKB_COW_HEAD */ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23) static inline int skb_clone_writable(struct sk_buff *skb, int len)