datapath: Check for backported skb_frag_page().
authorTadaaki Nagao <nagao@stratosphere.co.jp>
Thu, 12 Jul 2012 07:25:29 +0000 (16:25 +0900)
committerJesse Gross <jesse@nicira.com>
Thu, 12 Jul 2012 22:40:26 +0000 (15:40 -0700)
Recently released CentOS 6.3 (and probably also RHEL 6.3, I assume)
backported skb_frag_page() and others to their 2.6.32-based kernel,
which caused build failure of Open vSwitch kernel modules.

Signed-off-by: Tadaaki Nagao <nagao@stratosphere.co.jp>
Signed-off-by: Jesse Gross <jesse@nicira.com>
acinclude.m4
datapath/linux/compat/include/linux/skbuff.h

index 43f044a95e5b3b0c0fa34987dfae1587afe364c4..b5876a880325d7af7a9a9962088f0c66ea81c4e0 100644 (file)
@@ -247,6 +247,7 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
   OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_warn_if_lro],
                   [OVS_DEFINE([HAVE_SKB_WARN_LRO])])
   OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [consume_skb])
+  OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_frag_page])
 
   OVS_GREP_IFELSE([$KSRC/include/linux/string.h], [kmemdup], [],
                   [OVS_GREP_IFELSE([$KSRC/include/linux/slab.h], [kmemdup])])
index 01e524ef717d37c9ea9982e39d1161948e296cf7..7fbe9d81a3136e05c89ef2340ac33956ca116ebd 100644 (file)
@@ -238,7 +238,7 @@ static inline bool skb_warn_if_lro(const struct sk_buff *skb)
 #define consume_skb kfree_skb
 #endif
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,2,0)
+#ifndef HAVE_SKB_FRAG_PAGE
 static inline struct page *skb_frag_page(const skb_frag_t *frag)
 {
        return frag->page;