From patchwork Thu Oct 13 09:58:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Bodireddy, Bhanuprakash" X-Patchwork-Id: 681717 X-Patchwork-Delegate: diproiettod@vmware.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (archives.nicira.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id 3svmXL1SQdz9s9N for ; Thu, 13 Oct 2016 21:03:46 +1100 (AEDT) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 9D709105EE; Thu, 13 Oct 2016 03:03:07 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx3v3.cudamail.com (mx3.cudamail.com [64.34.241.5]) by archives.nicira.com (Postfix) with ESMTPS id 20D92105E0 for ; Thu, 13 Oct 2016 03:03:06 -0700 (PDT) Received: from bar6.cudamail.com (localhost [127.0.0.1]) by mx3v3.cudamail.com (Postfix) with ESMTPS id A77671619F6 for ; Thu, 13 Oct 2016 04:03:05 -0600 (MDT) X-ASG-Debug-ID: 1476352985-0b32374304039e0001-byXFYA Received: from mx3-pf2.cudamail.com ([192.168.14.1]) by bar6.cudamail.com with ESMTP id IRP6ObQj35Qi9Br5 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 13 Oct 2016 04:03:05 -0600 (MDT) X-Barracuda-Envelope-From: bhanuprakash.bodireddy@intel.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.14.1 Received: from unknown (HELO mga06.intel.com) (134.134.136.31) by mx3-pf2.cudamail.com with ESMTPS (DHE-RSA-AES256-SHA encrypted); 13 Oct 2016 10:03:04 -0000 Received-SPF: pass (mx3-pf2.cudamail.com: SPF record at intel.com designates 134.134.136.31 as permitted sender) X-Barracuda-Apparent-Source-IP: 134.134.136.31 X-Barracuda-RBL-IP: 134.134.136.31 Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga104.jf.intel.com with ESMTP; 13 Oct 2016 03:03:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,339,1473145200"; d="scan'208";a="179397905" Received: from silpixa00393942.ir.intel.com ([10.237.223.42]) by fmsmga004.fm.intel.com with ESMTP; 13 Oct 2016 03:03:03 -0700 X-CudaMail-Envelope-Sender: bhanuprakash.bodireddy@intel.com From: Bhanuprakash Bodireddy To: dev@openvswitch.org X-CudaMail-MID: CM-V2-1012002961 X-CudaMail-DTE: 101316 X-CudaMail-Originating-IP: 134.134.136.31 Date: Thu, 13 Oct 2016 10:58:30 +0100 X-ASG-Orig-Subj: [##CM-V2-1012002961##][PATCH v2 07/12] dpif-netdev: Cache align netdev_flow_keys. Message-Id: <1476352715-110467-8-git-send-email-bhanuprakash.bodireddy@intel.com> X-Mailer: git-send-email 2.4.11 In-Reply-To: <1476352715-110467-1-git-send-email-bhanuprakash.bodireddy@intel.com> References: <1476352715-110467-1-git-send-email-bhanuprakash.bodireddy@intel.com> X-GBUdb-Analysis: 0, 134.134.136.31, Ugly c=0.226425 p=-0.333333 Source Normal X-MessageSniffer-Rules: 0-0-0-3182-c X-Barracuda-Connect: UNKNOWN[192.168.14.1] X-Barracuda-Start-Time: 1476352985 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 global scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=4.0 tests=BSF_SC5_MJ1963, RDNS_NONE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.33670 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 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 v2 07/12] dpif-netdev: Cache align netdev_flow_keys. 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" Aligning the 'keys' array seems to have positive performance impact. Signed-off-by: Bhanuprakash Bodireddy Co-authored-by: Antonio Fischetti Acked-by: Daniele Di Proietto --- lib/dpif-netdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index 84aa570..93ea49d 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -4166,7 +4166,7 @@ dp_netdev_input__(struct dp_netdev_pmd_thread *pmd, /* Sparse or MSVC doesn't like variable length array. */ enum { PKT_ARRAY_SIZE = NETDEV_MAX_BURST }; #endif - struct netdev_flow_key keys[PKT_ARRAY_SIZE]; + struct netdev_flow_key keys[PKT_ARRAY_SIZE] OVS_ALIGNED_VAR(CACHE_LINE_SIZE); struct packet_batch_per_flow batches[PKT_ARRAY_SIZE]; long long now = time_msec(); size_t newcnt, n_batches, i;