From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com [74.125.82.44]) by dpdk.org (Postfix) with ESMTP id 77A522B8C for ; Tue, 6 Dec 2016 23:41:02 +0100 (CET) Received: by mail-wm0-f44.google.com with SMTP id f82so143688006wmf.1 for ; Tue, 06 Dec 2016 14:41:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=2Ip1XR5jAPGDGWKx6CkFehJSGnJ1kSObKuu4j26iIK8=; b=tp7Y6FX6DMDh08NYqzvmFeMLyQBMTpxEFGA80Zy76UMeF6I+Or5ehc8X3LsBtLVkEe Ds2/gUoNfuo9WCPNf1Ji/NmFmI+OgnjoSIflX8algikPd1/4rTft6d2p3D1W77FR5pRr pos886afMqjeWejcBSXxlgkr7BXZY0T8PpY2ZyN6L8Jo5QFOdJbrkJi9MZYck/xP4Ohh aGmZKS4to4+lMf/orZ/vmmIORVri54pTGow+5PAXps/vzgUPpsTLX6+jcZ9C57iW/HZY ThqC7+hv3H70Twytbs7bPh5P+0cFlAZ4xxGIVqe1IXNRAW7JNHr6ehZUx0EsUou2G5OZ f0Vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=2Ip1XR5jAPGDGWKx6CkFehJSGnJ1kSObKuu4j26iIK8=; b=UDchGRLkxqtKj3ib77gtErWWOQ6rcCNRIpSuedNuQhgbgWk+mSSFSqbbc3IEDRK4Xw tuOTSgmUShu5bZqzHE2E9kacjX7KimI3d/X6JX1F9XOPMqq+afciZVug96iIS0SW6dhV uwsdrcbEhdfW1DQZZk7w9M1DtuAmeZP+IbkaRfcaMPQmoEZx6DaAOCctO9jfg1ELfpNJ VeGIbanW548rbJ+XyOAq40voTdqsav2F5+k/r19uPRlR0UGmulGz4xyRb+gN4II4Kf/l jydymuRhC4PNRLxJ2xO7dXBECKIFU9BSMQsfvWcOgvZUk/KgW00ScNEWKHqKAbWdJwWd dX1w== X-Gm-Message-State: AKaTC03Coma97y1vJBtQ6hs13kUzf5hStkj/vGtSm4rMHjhXhhjINA3+vy93aDyIV3C2TYGk X-Received: by 10.28.69.130 with SMTP id l2mr654346wmi.123.1481064062027; Tue, 06 Dec 2016 14:41:02 -0800 (PST) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id g184sm6256209wme.23.2016.12.06.14.41.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Dec 2016 14:41:01 -0800 (PST) Date: Tue, 06 Dec 2016 14:41:01 -0800 (PST) X-Google-Original-Date: Tue, 06 Dec 2016 23:41 +0100 From: Thomas Monjalon To: Jerin Jacob Cc: zbigniew.bodek@caviumnetworks.com, dev@dpdk.org, pablo.de.lara.guarch@intel.com, Emery Davis Message-ID: <3445082.xGUuZ4ynkZ@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <20161206220502.GA23846@localhost.localdomain> References: <1480851219-45071-1-git-send-email-zbigniew.bodek@caviumnetworks.com> <6384628.bAnifqqFcF@xps13> <20161206220502.GA23846@localhost.localdomain> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v2 03/12] crypto/armv8: Add core crypto operations for ARMv8 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: Tue, 06 Dec 2016 22:41:02 -0000 2016-12-07 03:35, Jerin Jacob: > On Tue, Dec 06, 2016 at 10:42:51PM +0100, Thomas Monjalon wrote: > > 2016-12-07 02:48, Jerin Jacob: > > > On Tue, Dec 06, 2016 at 09:29:25PM +0100, Thomas Monjalon wrote: > > > > 2016-12-06 18:32, zbigniew.bodek@caviumnetworks.com: > > > > > From: Zbigniew Bodek > > > > > > > > > > This patch adds core low-level crypto operations > > > > > for ARMv8 processors. The assembly code is a base > > > > > for an optimized PMD and is currently excluded > > > > > from the build. > > > > > > > > It's a bit sad that you cannot achieve the same performance with > > > > C code and a good compiler. > > > > Have you tried it? How much is the difference? > > > > > > Like AES-NI on IA side(exposed as separate PMD in dpdk), > > > armv8 has special dedicated instructions for crypto operation using SIMD. > > > This patch is using the "dedicated" armv8 crypto instructions and SIMD > > > operation to achieve better performance. > > > > It does not justify to have all the code in asm. > > Why ? if we can have separate dpdk pmd for AES-NI on IA . Why not for ARM? Jerin, you or me is not understanding the other. It is perfectly fine to have a separate PMD. I am just talking about the language C vs ASM. > > > We had compared with openssl implementation.Here is the performance > > > improvement for chained crypto operations case WRT openssl pmd > > > > > > Buffer > > > Size(B) OPS(M) Throughput(Gbps) > > > 64 729 % 742 % > > > 128 577 % 592 % > > > 256 483 % 476 % > > > 512 336 % 351 % > > > 768 300 % 286 % > > > 1024 263 % 250 % > > > 1280 225 % 229 % > > > 1536 214 % 213 % > > > 1792 186 % 203 % > > > 2048 200 % 193 % > > > > OK but what is the performance difference between this asm code > > and a C equivalent? > > Do you you want compare against the scalar version of C code? its not > even worth to think about it. The vector version will use > dedicated armv8 instruction for crypto so its not portable anyway. > We would like to asm code so that we can have better control on what we do > and we cant rely compiler for that. No I'm talking about comparing a PMD written in C vs this one in ASM. It"s just harder to read ASM. Most of DPDK code is in C. And only some small functions are written in ASM. The vector instructions use some C intrinsics. Do you mean that the instructions that you are using have no intrinsics equivalent? Nobody made it into GCC?