[OVS_DEFINE([HAVE_NLA_NUL_STRING])])
OVS_GREP_IFELSE([$KSRC26/include/linux/err.h], [ERR_CAST],
[OVS_DEFINE([HAVE_ERR_CAST])])
+ OVS_GREP_IFELSE([$KSRC26/include/net/checksum.h], [csum_unfold],
+ [OVS_DEFINE([HAVE_CSUM_UNFOLD])])
+ OVS_GREP_IFELSE([$KSRC26/include/linux/skbuff.h], [skb_cow],
+ [OVS_DEFINE([HAVE_SKB_COW])])
OVS_CHECK_LOG2_H
OVS_CHECK_VETH
if cmp -s datapath/linux-2.6/kcompat.h.new \
#define NET_SKB_PAD 16
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
+#ifndef HAVE_SKB_COW
static inline int __skb_cow(struct sk_buff *skb, unsigned int headroom,
int cloned)
{
{
return __skb_cow(skb, headroom, skb_header_cloned(skb));
}
-#endif /* linux < 2.6.23 */
+#endif /* !HAVE_SKB_COW */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17)
#include_next <net/checksum.h>
-#include <linux/version.h>
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
-
+#ifndef HAVE_CSUM_UNFOLD
static inline __wsum csum_unfold(__sum16 n)
{
return (__force __wsum)n;
}
-
-#endif /* linux kernel < 2.6.20 */
+#endif /* !HAVE_CSUM_UNFOLD */
#endif /* checksum.h */