datapath: Check for skb_cow_head(), not skb_cow().
authorBen Pfaff <blp@nicira.com>
Thu, 27 May 2010 22:29:29 +0000 (15:29 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 27 May 2010 22:38:56 +0000 (15:38 -0700)
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.

acinclude.m4
datapath/linux-2.6/compat-2.6/include/linux/skbuff.h

index cabe7d3a74cafee3f4a175d854c183646372916f..015bf6654dc5f8371de00369d6b290ccfc09477b 100644 (file)
@@ -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],
index 5ed0e48ff3c73fc8f60447e2023748da776c96fd..15acea9e63565506c062e622b9d5ca81671243e8 100644 (file)
@@ -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)