]> git.proxmox.com Git - ovs.git/commitdiff
datapath: Check for backported sctp_compute_cksum().
authorJesse Gross <jesse@nicira.com>
Fri, 3 Jan 2014 23:44:28 +0000 (15:44 -0800)
committerJesse Gross <jesse@nicira.com>
Sat, 4 Jan 2014 00:08:37 +0000 (16:08 -0800)
This is backported by RHEL7.

Reported-by: Ashok Byahatti <ashok.byahatti@embrane.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Joe Stringer <joestringer@nicira.com>
acinclude.m4
datapath/linux/compat/include/net/sctp/checksum.h

index 7078654b88050d7d569a21eaccb390f2e6cc0a79..8ff58280e9d7694819d8841898ba1accabe4283a 100644 (file)
@@ -281,6 +281,8 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
   OVS_GREP_IFELSE([$KSRC/include/net/netlink.h], [nla_put_be64])
   OVS_GREP_IFELSE([$KSRC/include/net/netlink.h], [nla_find_nested])
 
+  OVS_GREP_IFELSE([$KSRC/include/net/sctp/checksum.h], [sctp_compute_cksum])
+
   OVS_GREP_IFELSE([$KSRC/include/linux/if_vlan.h], [ADD_ALL_VLANS_CMD],
                   [OVS_DEFINE([HAVE_VLAN_BUG_WORKAROUND])])
 
index 59d209b20d41af74e78f0a0a9687834e161053b3..7832abce01348a10351d37a29b82f74b2190e26a 100644 (file)
@@ -1,10 +1,9 @@
 #ifndef __SCTP_CHECKSUM_WRAPPER_H
 #define __SCTP_CHECKSUM_WRAPPER_H 1
 
-#include <linux/version.h>
 #include_next <net/sctp/checksum.h>
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,12,0)
+#ifndef HAVE_SCTP_COMPUTE_CKSUM
 static inline __le32 sctp_compute_cksum(const struct sk_buff *skb,
                                        unsigned int offset)
 {