Jeongkeun Lee jklee@hp.com
Joan Cirer joan@ev0.net
John Galgay john@galgay.net
+Koichi Yagishita yagishita.koichi@jrc.co.jp
Krishna Miriyala krishna@nicira.com
Luiz Henrique Ozaki luiz.ozaki@gmail.com
Michael Mao mmao@nicira.com
OVS_GREP_IFELSE([$KSRC26/include/linux/types.h], [__wsum],
[OVS_DEFINE([HAVE_CSUM_TYPES])])
+ OVS_GREP_IFELSE([$KSRC26/include/net/checksum.h], [csum_replace4])
OVS_GREP_IFELSE([$KSRC26/include/net/checksum.h], [csum_unfold])
OVS_GREP_IFELSE([$KSRC26/include/net/netlink.h], [NLA_NUL_STRING])
csum_and_copy_to_user(src, dst, len, sum, NULL, err_ptr)
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25)
+#ifndef HAVE_CSUM_REPLACE4
static inline void csum_replace4(__sum16 *sum, __be32 from, __be32 to)
{
__be32 diff[] = { ~from, to };
*sum = csum_fold(csum_partial((char *)diff, sizeof(diff), ~csum_unfold(*sum)));
}
+#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25)
#define inet_proto_csum_replace2(sum, skb, from, to, pseudohdr) \
inet_proto_csum_replace4(sum, skb, (__force __be32)(from), \
(__force __be32)(to), pseudohdr)