From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0044.outbound.protection.outlook.com [104.47.42.44]) by dpdk.org (Postfix) with ESMTP id 9D54D1B2A6; Mon, 12 Feb 2018 15:11:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=SwHY1nAUqDsxl9y4X8kLCX6+a6dXNvNLL6OJKbH40rw=; b=YaOHqWZi2z1+UL8beaxSIiYilSRtM1rx+JAXgz3UNMJpzRlJLp19eYjm4SaqN2KoGp3YhjYwdAWot1VPu1Q3VskUQENz8Teu75sF4NsYwyqGBXOImi7P/gr90B4ULeTCECYcnVGUmvZuB658epg+aPxP+gvZvxH/CVoLmPD2B6s= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (115.113.156.3) by CY1PR07MB2523.namprd07.prod.outlook.com (10.167.16.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.485.10; Mon, 12 Feb 2018 14:11:42 +0000 Date: Mon, 12 Feb 2018 19:41:25 +0530 From: Jerin Jacob To: Matan Azrad Cc: "dev@dpdk.org" , "ferruh.yigit@intel.com" , "stable@dpdk.org" , Thomas Monjalon , Konstantin Ananyev , Pavan Nikhilesh Message-ID: <20180212141123.GA18758@jerin> References: <20180212055439.6462-1-jerin.jacob@caviumnetworks.com> <20180212131343.13555-1-jerin.jacob@caviumnetworks.com> <20180212135046.GA16934@jerin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.3 (2018-01-21) X-Originating-IP: [115.113.156.3] X-ClientProxiedBy: PN1PR0101CA0033.INDPRD01.PROD.OUTLOOK.COM (10.174.150.19) To CY1PR07MB2523.namprd07.prod.outlook.com (10.167.16.14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ec5351c0-16a3-4cb9-c47b-08d572228c26 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:CY1PR07MB2523; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2523; 3:1/cp9RwJW6lsWAVkidf34yXOHc4uVfQyRxoUojp2iHEWz+bGGooJa45UlNQDC08U7XSJYQb5uMK+bWBKAqbInJKU8spZaGtg1Esv+tBWhhVFX2Iobw/+rNzu7Gt3hjAxFDOM6LRM2pOOol4msGT+4ixMQcnlc2X1XEQ8K1T1PiMIx8ISaB9X805mP27tO4ARSIu+k93Ih8OahaZwODt2EOdW42l5rIL2+cM2Ia43D2bf98ywFuYHTaqhmnWZu0dk; 25:mnaWzYanaqJs5KizR6jRQBw6V0jkCvgisuT2gGdjvrSMgK21M8CYXytOfb002m3dmi/ixcAXsIWbZzHCHLyliXsKtATDKFUE/llUGajnz7onLxliSsMErFI0KsQ3Hntk/R6+an6Bi9dfQXKNwtqGK2o/G9yFXePNatBeSA/N0ex4swdV6Vv/CUqqBfabl4g5NknWVL1zLHypqsN4m72v8imji5AaIs26WaT3Z8j5RUICu1HlFz6zu+h/jtg9Cuzd7hpeOtDCURTGpVTAdvIfwLMtShpMWZU2YyHip6jQmr23L+KUvnNtdE7G9YBfBXOPnKJ/O8fv8fny2tJ6Z/xzqQ==; 31:WlTB51Y/9v6YsePCPkmhqHgxvYor6jL+QLBF183Ev57cPMroR8OUT2476t955qWNA1x6UmAz2PBQsOhWkKxQuU7DdwdVVq3Ac+6f6e1TO5nCKoDHEsScgz7epLjioYhRzsbbIotWCQoekWlzVbgqM08BbNyvw0eHdlsSfWpapbonm6IkRjyKRznWLlN/QwSoRAhhI4X5gITeq5Rbu3rLc4pmuzCeG+xeI+6Udn9Nlv8= X-MS-TrafficTypeDiagnostic: CY1PR07MB2523: X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2523; 20:zgfyDzOABcsSn82jeiVRaKtcwbxyIdOncEK4GBKb/B/IlQgtJfyGCdUEjbiuT5co6TyJI5+az42Zqgf8qqsosnmtmJ8awZNcmrp037jin7dd2d2rNfkyeaHQdu68Tjst1YEOS8CftBfiQ9pK0S/2DAVqHyqNwSDsoNjHtyhrlhLP8dBOZVwKgBi1iaeqyCXkpiI1o8640w+BGmPZbapKFPh9bJq4hOp0GpTJHeZwWoRZ7gasxXtbX3j8z7LS8k68jw/fo37TcTB54fQBX5rDmxGD1opskOaz1ieN3iPJN2LOKOAz22uWQngWFXGx+srczFbCzbIOKbwW3VtnjCDfVYgIiNKvFscULaH9QYcSU3pvVLOiRTMORj0aO2L31fqKzBO1Y0RTjHii+Tn2aeN0kfwO3vlMBbIcg8j+g9cxUH5P3cVMGwbYrQDITZD7f8+qPVIv4H1Q16JYuQE1JU6/BXAoyG7Hx2Y0eKVZ29uft80drs7y9S1oD3lAlXB87VcGgHyIWUX2z8vzltyBqa/yEolF95xWnIS4sZGZcetAfdZwxMTRYwXe8QbBkXU9FtBiZTQncyDkCmRIJMZ488ju6BAfBc88RkGhpfXc7wcsSxQ= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(60795455431006)(131327999870524)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(8121501046)(5005006)(3231101)(2400082)(944501161)(10201501046)(3002001)(93006095)(6041288)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011); SRVR:CY1PR07MB2523; BCL:0; PCL:0; RULEID:; SRVR:CY1PR07MB2523; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2523; 4:LQ4Q+ssqx6iXNI/UWKG97DzP5+g5LOpkUfNLGCBpLo8HCTcrtjNSS9hhify4zn0/Aj+Ea03Qy71zZGXIINMeEGmI28R2XjKloRtml9IdPIyspb6TdoSMN4fLiNPZWQB1CoIrg9LB1fmEDnbExa0ym8a1l6hkopTb30Mju/izQkFtWtEZDwQWcaKaj/Li0O2yorVUWdK/u3sJRAVAMos91IKKwxJ2wWRCwhLm+nnKD4bXmjgVnkFMc8bYLER7rnHUyvERbKd4IkbWK0mdqqauujX3lBEOAFOPx/tLvlWA/WiHVAoa2eI6cPyiOVwMHvLxI+f5yvQsvg9cN9l5/5ks9NqGQtOZ9ES/s20U6M4m60WvXqo6EOd/CcUgALUXwKAI X-Forefront-PRVS: 0581B5AB35 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(376002)(396003)(366004)(39850400004)(39380400002)(189003)(199004)(13464003)(478600001)(26005)(6666003)(58126008)(55016002)(6916009)(8676002)(54906003)(4326008)(33656002)(33896004)(316002)(8936002)(83506002)(76176011)(81166006)(9686003)(81156014)(386003)(42882006)(105586002)(2950100002)(55236004)(16586007)(68736007)(93886005)(53936002)(72206003)(33716001)(229853002)(1076002)(47776003)(106356001)(66066001)(23726003)(50466002)(3846002)(6116002)(6496006)(25786009)(305945005)(7736002)(52116002)(2906002)(107886003)(6246003)(5660300001)(97736004)(16526019)(186003)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR07MB2523; H:jerin; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR07MB2523; 23:YI1ISO19nFS2ZTUp4+VAXA0q5snwHBgaEwWjiusZn?= =?us-ascii?Q?q48FqAln5j0NHHaRnnSTTRn+OYmsjIKJs9sLTyVEzzX4jQcb1nUFcw8Z2wi0?= =?us-ascii?Q?DQv+EhQUMJwMD4tnGHYppMc8K+QubYLkSWwdqHP4E9rjQx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qgnhUMHgbAlneBSIZNGBYGWFoA+mO9DAA1/0HIo=; 7:4CjEXHp+St9FLgUT9oDEYKfRD+s0NRPtKP3qxswGkyTnUo+ntOzCdNlXRv1p8Dz1QwGAjEPt8pwUhKOPU8b2eFf8zlDlB3nXpKZkhkw7oBdXje3qbShtDZ6aWBm43PBjo76tLA0TxQkN1GTIlzpl/cXYNtmndwPqIhy/kQhSjKgYDIQhh0gGhZ0IXSgUAYDsCPhrqOFUJhyOPmwtmFVmaXl06fxBGQAMPzIidUhVIpRqtldJtZI48ktkE86ErxMA SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Feb 2018 14:11:42.0785 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ec5351c0-16a3-4cb9-c47b-08d572228c26 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB2523 Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v3] ethdev: fix ethdev data alignment X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Feb 2018 14:11:48 -0000 -----Original Message----- > Date: Mon, 12 Feb 2018 14:02:17 +0000 > From: Matan Azrad > To: Jerin Jacob > CC: "dev@dpdk.org" , "ferruh.yigit@intel.com" > , "stable@dpdk.org" , Thomas > Monjalon , Konstantin Ananyev > , Pavan Nikhilesh > > Subject: RE: [dpdk-dev] [PATCH v3] ethdev: fix ethdev data alignment > > > > From: Jerin Jacob, Sent: Monday, February 12, 2018 3:51 PM > > -----Original Message----- > > > Date: Mon, 12 Feb 2018 13:44:54 +0000 > > > From: Matan Azrad > > > To: Jerin Jacob , "dev@dpdk.org" > > > > > > CC: "ferruh.yigit@intel.com" , "stable@dpdk.org" > > > , Thomas Monjalon , > > Konstantin > > > Ananyev , Pavan Nikhilesh > > > > > > Subject: RE: [dpdk-dev] [PATCH v3] ethdev: fix ethdev data alignment > > > > > > Hi Jerin > > > > > > From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com] > > > > The struct rte_eth_dev_data is used in ethdev fastpath routines and > > > > it not aligned to cache line size. This patch fixes the ethdev data > > alignment. > > > > > > > > The alignment was broken from the "first public release" changeset > > > > where ethdev data address was aligned only to the first port. > > > > Remaining ports alignment was defined by the size of the struct > > > > (rte_eth_dev_data). This scheme is not guaranteed to be cache line > > > > aligned all the time. > > > > > > > > "ethdev: add port ownership" change set introduced a > > > > rte_eth_dev_shared_data container for port ownership change, This > > > > resulted in rte_eth_dev->data memory for the first port also as > > > > cache unaligned. > > > > > > > > Added a compiler alignment attribute to make sure rte_eth_dev->data > > > > always cache aligned so that CPU/compiler > > > > 1) Avoid sharing the element with another cache line > > > > 2) Can load/store the elements in struct rte_eth_dev_data as > > > > naturally aligned. > > > > > > > > Some platform like thunderX could see performance regression of 1% > > > > at > > > > "ethdev: add port ownership" change set with > > > > 1 port/1 queue l3fwd application and this patch fixes that regression. > > > > > > > > example command: > > > > sudo ./examples/l3fwd/build/l3fwd -c 0xff00 -- -p 0x1 --config="(0,0,9)" > > > > > > > > Fixes: af75078fece3 ("first public release") > > > > Fixes: 5b7ba31148a8 ("ethdev: add port ownership") > > > > > > I don't think you need the add the 5b7ba31148a8 fix line. > > > Maybe think about it in the next way: > > > Is your fix can stay as a same fix before the port ownership feature > > addition? > > > If yes, You are not fixing it. > > > > I don't think so. 5b7ba31148a8 breaking the first port alignment case(as > > mentioned in the commit log clearly). > > First port alignment was correct prior to 5b7ba31148a8 change set > > > > Do you agree? > > No. > The root cause of the issue this fix is fixing, is that the structure is not aligned, it is not relevant to port ownership. > The port ownership just exposes it. My point is simple. First port alignment was correct prior to 5b7ba31148a8 change set. it is broken from there. It is minor thing. I let, ethdev maintainer to decide what to added in Fixes on apply.