From patchwork Tue Jan 12 01:53:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Stringer X-Patchwork-Id: 566252 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 262281402D6 for ; Tue, 12 Jan 2016 12:55:03 +1100 (AEDT) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 3CABB10884; Mon, 11 Jan 2016 17:54:26 -0800 (PST) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx1e4.cudamail.com (mx1.cudamail.com [69.90.118.67]) by archives.nicira.com (Postfix) with ESMTPS id 55EC8106FB for ; Mon, 11 Jan 2016 17:54:25 -0800 (PST) Received: from bar5.cudamail.com (unknown [192.168.21.12]) by mx1e4.cudamail.com (Postfix) with ESMTPS id D8BCB1E006E for ; Mon, 11 Jan 2016 18:54:24 -0700 (MST) X-ASG-Debug-ID: 1452563664-09eadd1a1a93b40001-byXFYA Received: from mx1-pf1.cudamail.com ([192.168.24.1]) by bar5.cudamail.com with ESMTP id W2BEin0vsKPsaeX7 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 11 Jan 2016 18:54:24 -0700 (MST) X-Barracuda-Envelope-From: joe@ovn.org X-Barracuda-RBL-Trusted-Forwarder: 192.168.24.1 Received: from unknown (HELO relay2-d.mail.gandi.net) (217.70.183.194) by mx1-pf1.cudamail.com with ESMTPS (DHE-RSA-AES256-SHA encrypted); 12 Jan 2016 01:54:24 -0000 Received-SPF: pass (mx1-pf1.cudamail.com: SPF record at ovn.org designates 217.70.183.194 as permitted sender) X-Barracuda-Apparent-Source-IP: 217.70.183.194 X-Barracuda-RBL-IP: 217.70.183.194 Received: from mfilter26-d.gandi.net (mfilter26-d.gandi.net [217.70.178.154]) by relay2-d.mail.gandi.net (Postfix) with ESMTP id E2E53C5A51; Tue, 12 Jan 2016 02:54:22 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mfilter26-d.gandi.net Received: from relay2-d.mail.gandi.net ([IPv6:::ffff:217.70.183.194]) by mfilter26-d.gandi.net (mfilter26-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id oPm5B9G3NTLK; Tue, 12 Jan 2016 02:54:21 +0100 (CET) X-Originating-IP: 208.91.1.34 Received: from localhost.localdomain (unknown [208.91.1.34]) (Authenticated sender: joe@ovn.org) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id A12DAC5A4E; Tue, 12 Jan 2016 02:54:20 +0100 (CET) X-CudaMail-Envelope-Sender: joe@ovn.org From: Joe Stringer To: dev@openvswitch.org X-CudaMail-Whitelist-To: dev@openvswitch.org X-CudaMail-MID: CM-E1-110088080 X-CudaMail-DTE: 011116 X-CudaMail-Originating-IP: 217.70.183.194 Date: Mon, 11 Jan 2016 17:53:56 -0800 X-ASG-Orig-Subj: [##CM-E1-110088080##][PATCH 08/13] compat: Detect and use __skb_dst_copy(). Message-Id: <1452563641-33507-9-git-send-email-joe@ovn.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1452563641-33507-1-git-send-email-joe@ovn.org> References: <1452563641-33507-1-git-send-email-joe@ovn.org> X-Barracuda-Connect: UNKNOWN[192.168.24.1] X-Barracuda-Start-Time: 1452563664 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 08/13] compat: Detect and use __skb_dst_copy(). 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: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" Signed-off-by: Joe Stringer --- acinclude.m4 | 1 + datapath/linux/compat/include/net/dst.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/acinclude.m4 b/acinclude.m4 index 2d6653d1b8dd..5c758a641e1e 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -472,6 +472,7 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [ OVS_GREP_IFELSE([$KSRC/include/net/checksum.h], [csum_unfold]) OVS_GREP_IFELSE([$KSRC/include/net/dst.h], [dst_discard_sk]) + OVS_GREP_IFELSE([$KSRC/include/net/dst.h], [__skb_dst_copy]) OVS_GREP_IFELSE([$KSRC/include/net/genetlink.h], [genl_has_listeners]) OVS_GREP_IFELSE([$KSRC/include/net/genetlink.h], [mcgrp_offset]) diff --git a/datapath/linux/compat/include/net/dst.h b/datapath/linux/compat/include/net/dst.h index de74c9383b8b..5ec3d307b7b4 100644 --- a/datapath/linux/compat/include/net/dst.h +++ b/datapath/linux/compat/include/net/dst.h @@ -42,7 +42,7 @@ static inline void skb_dst_set_noref(struct sk_buff *skb, struct dst_entry *dst) { } static inline void dst_init_metrics(struct dst_entry *dst, const u32 *metrics, bool read_only) { } -#elif LINUX_VERSION_CODE < KERNEL_VERSION(4,3,0) +#elif !defined(HAVE___SKB_DST_COPY) static inline void __skb_dst_copy(struct sk_buff *nskb, unsigned long refdst) { nskb->_skb_refdst = refdst;