From patchwork Fri Oct 9 20:21:30 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pravin B Shelar X-Patchwork-Id: 528415 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (unknown [IPv6:2600:3c00::f03c:91ff:fe6e:bdf7]) by ozlabs.org (Postfix) with ESMTP id 481931402B7 for ; Sat, 10 Oct 2015 07:21:43 +1100 (AEDT) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 5345610A76; Fri, 9 Oct 2015 13:21:41 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx3v1.cudamail.com (mx3.cudamail.com [64.34.241.5]) by archives.nicira.com (Postfix) with ESMTPS id 0C01710A73 for ; Fri, 9 Oct 2015 13:21:40 -0700 (PDT) Received: from bar3.cudamail.com (bar1 [192.168.15.1]) by mx3v1.cudamail.com (Postfix) with ESMTP id 3315E6189F1 for ; Fri, 9 Oct 2015 14:21:39 -0600 (MDT) X-ASG-Debug-ID: 1444422097-03dd7b7d3f1028d0001-byXFYA Received: from mx3-pf1.cudamail.com ([192.168.14.2]) by bar3.cudamail.com with ESMTP id 40k0sS2e305PkpTC (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 09 Oct 2015 14:21:37 -0600 (MDT) X-Barracuda-Envelope-From: pshelar@nicira.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.14.2 Received: from unknown (HELO mail-pa0-f41.google.com) (209.85.220.41) by mx3-pf1.cudamail.com with ESMTPS (RC4-SHA encrypted); 9 Oct 2015 20:21:37 -0000 Received-SPF: unknown (mx3-pf1.cudamail.com: Multiple SPF records returned) X-Barracuda-RBL-Trusted-Forwarder: 209.85.220.41 Received: by pacex6 with SMTP id ex6so95838005pac.0 for ; Fri, 09 Oct 2015 13:21:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-type:content-transfer-encoding; bh=QoF8u1yVadgf9Jl5vfT3CGeeM8sAnrd/1jOujtws4R8=; b=QhwdCW/Dw9TdMmGGOdaBKYYtfDOqljw6Jkw4m4dabjVR7RlRHlTKs1uKzxOydsouNI yB5jhTrar11+UMe32zGydR41Ygl6rcCPaPXHK/Ik6qVK9wL1vry6jwXszO7p8rCI5qOs j+nb9uBnlyjSa+spvh4hK6FbjmjzS9wZjY4w42yGs/MsKdg8N0Blqt02dzed32/BNqY1 +G5/1wjXl5jHWEQCV1Rf8QIGrOwQ1a18nX0/BC5skJ36JrOlklSm7qXIAldop3ZPutoU j/boE/Ycxj2E/wvcXySMulFKX068nb+kCcmqWSTLPV+0Rf9Ipx6745gi9GRL0HOS7b48 0qag== X-Gm-Message-State: ALoCoQnqjT7rA99nWGZrKcsd0vTp2aGu/qycq/PMk88zdcGqg+pWyIwtNlYvUnz4JEp6WULNa18N X-Received: by 10.66.230.137 with SMTP id sy9mr17768938pac.154.1444422096440; Fri, 09 Oct 2015 13:21:36 -0700 (PDT) Received: from localhost ([208.91.2.3]) by smtp.gmail.com with ESMTPSA id gv1sm4096689pbc.38.2015.10.09.13.21.35 (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Fri, 09 Oct 2015 13:21:35 -0700 (PDT) X-CudaMail-Envelope-Sender: pshelar@nicira.com X-Barracuda-Apparent-Source-IP: 208.91.2.3 From: Pravin B Shelar To: dev@openvswitch.org X-CudaMail-Whitelist-To: dev@openvswitch.org X-CudaMail-MID: CM-V1-1008058414 X-CudaMail-DTE: 100915 X-CudaMail-Originating-IP: 209.85.220.41 Date: Fri, 9 Oct 2015 13:21:30 -0700 X-ASG-Orig-Subj: [##CM-V1-1008058414##][PATCH] datapath: Fix compilation on kernel 2.6.32 Message-Id: <1444422090-1799-1-git-send-email-pshelar@nicira.com> X-Mailer: git-send-email 1.7.1 MIME-Version: 1.0 X-Barracuda-Connect: UNKNOWN[192.168.14.2] X-Barracuda-Start-Time: 1444422097 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-ASG-Whitelist: Header =?UTF-8?B?eFwtY3VkYW1haWxcLXdoaXRlbGlzdFwtdG8=?= X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 Subject: [ovs-dev] [PATCH] datapath: Fix compilation on kernel 2.6.32 X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@openvswitch.org Sender: "dev" Fixes following compilation error: CC [M] /home/travis/build/openvswitch/ovs/datapath/linux/actions.o In file included from /home/travis/build/openvswitch/ovs/datapath/linux/actions.c:21:0: /home/travis/build/openvswitch/ovs/datapath/linux/compat/include/linux/skbuff.h: In function ‘rpl_skb_postpull_rcsum’: /home/travis/build/openvswitch/ovs/datapath/linux/compat/include/linux/skbuff.h:384:4: error: implicit declaration of function ‘skb_checksum_start_offset’ [-Werror=implicit-function-declaration] cc1: some warnings being treated as errors Reported-by: Joe Stringer Signed-off-by: Pravin B Shelar Acked-by: Joe Stringer --- acinclude.m4 | 1 + datapath/linux/compat/include/linux/skbuff.h | 2 ++ 2 files changed, 3 insertions(+), 0 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 42d1f45..e4846d9 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -363,6 +363,7 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [ # quoting rules. OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [[[^@]]proto_data_valid], [OVS_DEFINE([HAVE_PROTO_DATA_VALID])]) + OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_checksum_start_offset]) OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [kfree_skb_list]) OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [rxhash]) OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [u16.*rxhash], diff --git a/datapath/linux/compat/include/linux/skbuff.h b/datapath/linux/compat/include/linux/skbuff.h index 23b13b8..331a523 100644 --- a/datapath/linux/compat/include/linux/skbuff.h +++ b/datapath/linux/compat/include/linux/skbuff.h @@ -380,9 +380,11 @@ static inline void skb_postpull_rcsum(struct sk_buff *skb, { if (skb->ip_summed == CHECKSUM_COMPLETE) skb->csum = csum_sub(skb->csum, csum_partial(start, len, 0)); +#ifdef HAVE_SKB_CHECKSUM_START_OFFSET else if (skb->ip_summed == CHECKSUM_PARTIAL && skb_checksum_start_offset(skb) <= len) skb->ip_summed = CHECKSUM_NONE; +#endif } #define skb_pull_rcsum rpl_skb_pull_rcsum