From patchwork Fri Dec 18 04:50:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 558739 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (li376-54.members.linode.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id 3C2311402B4 for ; Fri, 18 Dec 2015 15:50:55 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=netronome-com.20150623.gappssmtp.com header.i=@netronome-com.20150623.gappssmtp.com header.b=fSUQCu+K; dkim-atps=neutral Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 8F4FE10A24; Thu, 17 Dec 2015 20:50:28 -0800 (PST) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx1e3.cudamail.com (mx1.cudamail.com [69.90.118.67]) by archives.nicira.com (Postfix) with ESMTPS id C339C10A0D for ; Thu, 17 Dec 2015 20:50:27 -0800 (PST) Received: from bar2.cudamail.com (localhost [127.0.0.1]) by mx1e3.cudamail.com (Postfix) with ESMTPS id 3A39242012B for ; Thu, 17 Dec 2015 21:50:27 -0700 (MST) X-ASG-Debug-ID: 1450414224-03dc533ce208490001-byXFYA Received: from mx1-pf2.cudamail.com ([192.168.24.2]) by bar2.cudamail.com with ESMTP id OXbSZqTRgZZtmU4n (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 17 Dec 2015 21:50:24 -0700 (MST) X-Barracuda-Envelope-From: simon.horman@netronome.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.24.2 Received: from unknown (HELO mail-pf0-f180.google.com) (209.85.192.180) by mx1-pf2.cudamail.com with ESMTPS (RC4-SHA encrypted); 18 Dec 2015 04:50:24 -0000 Received-SPF: none (mx1-pf2.cudamail.com: domain at netronome.com does not designate permitted sender hosts) X-Barracuda-RBL-Trusted-Forwarder: 209.85.192.180 Received: by mail-pf0-f180.google.com with SMTP id v86so42518851pfa.2 for ; Thu, 17 Dec 2015 20:50:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Vle1glEEuHO+hn/HqoSDan5hW4jjTZ6v4G/tsLRmFuw=; b=fSUQCu+KlsHfsFWUtn3PDsNPkq8Wbgr/QMgV0mVINwoK8+7910oPnxDUrMNNz0E4q1 7wniWKawl7FnDf/XdB7sxljKzGVL5FL2ROuOCIE6bb2VH7v+ERbLnS+vCo4+zvHGQ68f hBXZZGZ2XIA4GDZp0lLm7123vmYTWLok9kcCAqVUQLWQMQypkTSh/zQbZgDgRLtawOCK itGH61X+k5TZJZW6ExqxloXJS4nBQ0voTdZmQOyBMVKftvIa4M8GeUCmy8vXa3tqWPMc QlQu5p9i/fywuSt+bGzQ4PUUu/Po1gokQNs1flBg+/AXM+F/LtqWT6Mba9IwQbFLhTw5 GxKw== 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:in-reply-to :references; bh=Vle1glEEuHO+hn/HqoSDan5hW4jjTZ6v4G/tsLRmFuw=; b=i82HKM4Nh5Z/OnDBkXiUAvF8hWmype2chm7rOd0+jECMXpw/nd0O4YbbRCSyRHcpUE HLXoUeHtOw0wdQdWPBMbNaSaI6xcfTGd5dXadsCclgq5g66o13B7bb92HpkRiKw8muj8 HgT1tMI46KeSaaKpvbv+foOgrTVdeoSUcVXIqxxJa72qz7Hf2yQzhul+59mcH69WmfoE /IYk+S9Z3YmufI8eXyc15AsuEkrdTl9OHbj2COk3s6o6D5SHnU7hrpdCieJVDqtNenth 0HFrE1HNAOYvEsdIKqtxW9YXKywFU9l62iFNRXrZoIbszkFy5OZYhrWGgA2pjshenKMt hnWg== X-Gm-Message-State: ALoCoQn/cCe+0oSfcM/8hRtnbb9i2YK8NyFsRF5ydDkqqf6+FtYuxU2wJ8hiltl/W9exRLAx5ihtZTfsw9EzwdqLnkyPE9Jagg== X-Received: by 10.98.16.75 with SMTP id y72mr25996pfi.111.1450414223655; Thu, 17 Dec 2015 20:50:23 -0800 (PST) Received: from reginn.isobedori.kobe.vergenet.net (p1027-ipbfp1401kobeminato.hyogo.ocn.ne.jp. [114.152.28.27]) by smtp.gmail.com with ESMTPSA id r90sm14560225pfi.80.2015.12.17.20.50.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 17 Dec 2015 20:50:22 -0800 (PST) X-CudaMail-Envelope-Sender: simon.horman@netronome.com X-Barracuda-Apparent-Source-IP: 114.152.28.27 From: Simon Horman To: dev@openvswitch.org X-CudaMail-MID: CM-E2-1216107266 X-CudaMail-DTE: 121715 X-CudaMail-Originating-IP: 209.85.192.180 Date: Fri, 18 Dec 2015 13:50:03 +0900 X-ASG-Orig-Subj: [##CM-E2-1216107266##][PATCH 4/5] datapath: restrict usage of tstats to kernels older than 2.6.37 Message-Id: <1450414204-9038-5-git-send-email-simon.horman@netronome.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1450414204-9038-1-git-send-email-simon.horman@netronome.com> References: <1450414204-9038-1-git-send-email-simon.horman@netronome.com> X-GBUdb-Analysis: 0, 209.85.192.180, Ugly c=0.444918 p=-0.333333 Source Normal X-MessageSniffer-Rules: 0-0-0-5279-c X-Barracuda-Connect: UNKNOWN[192.168.24.2] X-Barracuda-Start-Time: 1450414224 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.60 X-Barracuda-Spam-Status: No, SCORE=0.60 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=4.0 tests=BSF_SC5_MJ1963, DKIM_SIGNED, RDNS_NONE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.25366 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 DKIM_SIGNED Domain Keys Identified Mail: message has a signature 0.10 RDNS_NONE Delivered to trusted network by a host with no rDNS 0.50 BSF_SC5_MJ1963 Custom Rule MJ1963 Subject: [ovs-dev] [PATCH 4/5] datapath: restrict usage of tstats to kernels older than 2.6.37 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" From: Simon Horman tstats field was added to struct net_device in v2.6.37. Fixes: e23775f20e1a ("datapath: Add support for lwtunnel") Signed-off-by: Simon Horman --- .travis.yml | 1 + datapath/linux/compat/include/linux/netdevice.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d6376ff51bd2..be9ad9ff8caf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,6 +35,7 @@ env: - KERNEL=2.6.39.4 - KERNEL=2.6.38.8 - KERNEL=2.6.37.6 + - KERNEL=2.6.36.4 - KERNEL=2.6.33.20 - KERNEL=2.6.32.68 diff --git a/datapath/linux/compat/include/linux/netdevice.h b/datapath/linux/compat/include/linux/netdevice.h index 19a7b8ef53d2..71de4e54389a 100644 --- a/datapath/linux/compat/include/linux/netdevice.h +++ b/datapath/linux/compat/include/linux/netdevice.h @@ -261,7 +261,8 @@ struct rtnl_link_stats64 *rpl_dev_get_stats(struct net_device *dev, #else #define HAVE_DEV_TSTATS -#if RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(7,0) +#if RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(7,0) || \ + LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37) #undef HAVE_DEV_TSTATS #endif #endif