From 0b8ee23736f8d221c026947396455210b7891d2d Mon Sep 17 00:00:00 2001 From: Jesse Gross Date: Fri, 3 Jan 2014 15:44:28 -0800 Subject: [PATCH] datapath: Check for backported sctp_compute_cksum(). This is backported by RHEL7. Reported-by: Ashok Byahatti Signed-off-by: Jesse Gross Acked-by: Joe Stringer --- acinclude.m4 | 2 ++ datapath/linux/compat/include/net/sctp/checksum.h | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 7078654b8..8ff58280e 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -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])]) diff --git a/datapath/linux/compat/include/net/sctp/checksum.h b/datapath/linux/compat/include/net/sctp/checksum.h index 59d209b20..7832abce0 100644 --- a/datapath/linux/compat/include/net/sctp/checksum.h +++ b/datapath/linux/compat/include/net/sctp/checksum.h @@ -1,10 +1,9 @@ #ifndef __SCTP_CHECKSUM_WRAPPER_H #define __SCTP_CHECKSUM_WRAPPER_H 1 -#include #include_next -#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) { -- 2.20.1