From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 94BB12B87 for ; Fri, 8 Mar 2019 13:59:24 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Mar 2019 04:59:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,455,1544515200"; d="scan'208";a="129924978" Received: from irsmsx151.ger.corp.intel.com ([163.33.192.59]) by fmsmga008.fm.intel.com with ESMTP; 08 Mar 2019 04:59:22 -0800 Received: from irsmsx101.ger.corp.intel.com ([169.254.1.230]) by IRSMSX151.ger.corp.intel.com ([169.254.4.91]) with mapi id 14.03.0415.000; Fri, 8 Mar 2019 12:59:21 +0000 From: "Trahe, Fiona" To: "Ananyev, Konstantin" , "dev@dpdk.org" CC: "akhil.goyal@nxp.com" , "umesh.kartha@caviumnetworks.com" , "De Lara Guarch, Pablo" , "shally.verma@caviumnetworks.com" , "Ananyev, Konstantin" , "Trahe, Fiona" Thread-Topic: [dpdk-dev] [PATCH] cryptodev: fix restore crypto op alignment and layout Thread-Index: AQHU1O/7audjEPoIPkaxF0Gfsl87dKYBsd6w Date: Fri, 8 Mar 2019 12:59:21 +0000 Message-ID: <348A99DA5F5B7549AA880327E580B4358970F211@IRSMSX101.ger.corp.intel.com> References: <1551967994-8112-1-git-send-email-konstantin.ananyev@intel.com> In-Reply-To: <1551967994-8112-1-git-send-email-konstantin.ananyev@intel.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZDg3NWIxZTktNGRmNC00MTYxLWFlMzYtMDA3MzBlYjMzODAzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoib3Vmd1wvNlZoV1lEc3FEZE9HMnNNSWZrZmJJZHE2Qm9DQ2VZcVNiN2VyWGdZdnNwd1kzZWJCOWt6YUhkTWR2R24ifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] cryptodev: fix restore crypto op alignment and layout X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Mar 2019 12:59:25 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Konstantin Ananyev > Sent: Thursday, March 7, 2019 2:13 PM > To: dev@dpdk.org > Cc: akhil.goyal@nxp.com; umesh.kartha@caviumnetworks.com; De Lara Guarch,= Pablo > ; shally.verma@caviumnetworks.com; Ananye= v, Konstantin > > Subject: [dpdk-dev] [PATCH] cryptodev: fix restore crypto op alignment an= d layout >=20 > in 18.08 new cache-aligned structure rte_crypto_asym_op was introduced. > As it also was included into rte_crypto_op, it caused implicit change > in rte_crypto_op layout and alignment: now rte_crypto_op is cahce-line > aligned has a hole of 40/104 bytes between phys_addr and sym/asym op. > It looks like unintended ABI breakage, plus such change can cause > negative performance effects: > - now status and sym[0].m_src lies on different cache-lines, so > post-process code would need extra cache-line read. > - new alignment causes grow of the space requirements and cache-line > reads/updates for structures that contain rte_crypto_op inside. > As there seems no actual need to have rte_crypto_asym_op cache-line > aligned, and rte_crypto_asym_op is not intended to be used on it's own - > the simplest fix is just to remove cache-line alignment for it. > As the immediate positive effect: on IA ipsec-secgw performance increased > by 5-10% (depending on the crypto-dev and algo used). > My guess that on machines with 128B cache-line and lookaside-protocol > capable crypto devices the impact will be even more noticeable. >=20 > Fixes: 26008aaed14c ("cryptodev: add asymmetric xform and op definitions"= ) >=20 > Signed-off-by: Konstantin Ananyev Acked-by: Fiona Trahe