Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1456178imm; Thu, 19 Jul 2018 01:51:25 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeSnC8iLnvG1/QwWKy0sHgSTijj0IqOyDoIn/MLeA+D8Y0VutdbS3myccQwj8tA/9K5OKEn X-Received: by 2002:a63:6b86:: with SMTP id g128-v6mr9285236pgc.344.1531990285855; Thu, 19 Jul 2018 01:51:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531990285; cv=none; d=google.com; s=arc-20160816; b=W9J/vX8akBQqm2gg2hUETSUYvagrPaFQ4dV/6mE7zopIFNCDBr4g5sgomT6x6YrrUz pzu619+NPhQthuIdyuvTmpm3Hsp4mKCbId4toe+MWKCWyrv8JsuFuC8fglELLqEdwr9S Lh2uZZ/jMr+TAVCH7R5M+rEzamPrCgQg97cL8Q8VogFkf6W7cHWIrZ7AvgBFvG9v+aNK 7h+GMpRoKN5TnWIsssD8/GK/UOjawFpwpemM4wsD8V98m4ma4B6FITsj9LtkdV1JGvVr 3MA5UnQqwEWznt4MkEPabGtgMHKwweStdgEoI+9ypzlu50426t6ouNe8jamj6dgOIiC7 4obw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=kk9zcbuA4v1yYPsDKhqCoSLVwSLnJadQcRc2LhHyIYE=; b=m9LPKeO37uQqaCk0TNcJZVrCfFwNQjyF1WRfKqKOH4KdLFWhvq/jnDMclNF4XkEQW/ 51hidrGRdm/8o5+6nILHWc3jKnylgF6nPJ8UvboFflYG844dfLwtU8H7IK1jqBSOontj zvr/f4XmFwcmYpg3ZRtFk3HUdyW7rgX8PacEp0JEYkfufowumrH8F+S26MorgRi/ZqNz L7GdSf8CMtsdEdnLG24uzGdengpwyOegLWtGNt90uV8DFPnOsCWQ0yjuZ4pGZNbynON3 WBemN/8tYM5dTHRSKkVcd2/0KYeT3TjTxPDL9qEOicdTuzBos+2HUeAuH4LV/LqOiNbG ffDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=s5BzJ4TI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b3-v6si5446460pgl.267.2018.07.19.01.51.11; Thu, 19 Jul 2018 01:51:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=s5BzJ4TI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731623AbeGSJcW (ORCPT + 99 others); Thu, 19 Jul 2018 05:32:22 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:33859 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726846AbeGSJcV (ORCPT ); Thu, 19 Jul 2018 05:32:21 -0400 Received: by mail-lf0-f68.google.com with SMTP id n96-v6so5458024lfi.1 for ; Thu, 19 Jul 2018 01:50:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=kk9zcbuA4v1yYPsDKhqCoSLVwSLnJadQcRc2LhHyIYE=; b=s5BzJ4TIJ0wsSLh3g04HKiLFVDjTvMIIa6nfya3TqtLdxen2UfSa76u4tHl8BO8f3Y DuwacOsd+IllRq5HGqfGBMbWIMTZVmzVtdgGRd0Bpms+sPp+lNA0Gdpxr9JcUqdY0Y1C Py3EshV8HM6Fl8/Nj+wVrFuolUjcOM3LfiXcr1z6NIOirJ1wFzaeGfm7y/vKWy7ivXYw RBtYWRb5uHj4WH6z8xOE3myY6bST76eXhTFqCzrDksLlhUl6E4gGKYYBK3xTdNsl6wo4 W1KE1mQ4pSqYeNiqsEUb0f13ekGzSIP2VmFfaxJYmEo1VtHDXEgN+SpTmKc/5neU9xPn MEVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=kk9zcbuA4v1yYPsDKhqCoSLVwSLnJadQcRc2LhHyIYE=; b=Ozz4ZfPZkI5ODUmh3+1fX3PI6N4lH40F//T1e1XD0IJvjxYZhAP0TEVpEKvPNPZjfY 3NhIZL3GhKze9UaNV2KW37yVL/zKvlaZfQHAmJRmmvd9ARPggekPj8h0YFfCdZPsnyXy N3mSUmnzoNHF92DxNY5LCGK6t+HelwQNPc1AfLH5+52t84fVBWMNl/lKFFakEx5BqIGY KddHkFgB/+8m0txg1sWd8S5/DzqbcBZ9XPywEOmWx+nHFePUACBO3m9D/eJXabnZd/je tWZolGvy46Q3FwWkEUMSzg5Y+nViPjhshk4Vf0Vg6Tps1WI/nF9STI0LMWg/syBn604S ZIJw== X-Gm-Message-State: AOUpUlGL2Eczzaadge1OvYnvBdk5jhULYOkorKdvVkGRwI8WklKqhw+y sdJGZ/gvpITvWDk9c4YwoDlfaEaoc9OFWU6IavU= X-Received: by 2002:a19:5c06:: with SMTP id q6-v6mr6292447lfb.6.1531990213211; Thu, 19 Jul 2018 01:50:13 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:41c1:0:0:0:0:0 with HTTP; Thu, 19 Jul 2018 01:50:12 -0700 (PDT) In-Reply-To: References: <1531899055-29362-1-git-send-email-wangxiongfeng2@huawei.com> <1531899055-29362-5-git-send-email-wangxiongfeng2@huawei.com> <20180718164625.GA20360@sirena.org.uk> <82248c13-42fe-b598-0cd7-68e5db0b51be@gmail.com> From: Arnd Bergmann Date: Thu, 19 Jul 2018 10:50:12 +0200 X-Google-Sender-Auth: 9wbA-mGSGXGaj8Ejv8PLkvNRhlg Message-ID: Subject: Re: [PATCH 4/5] crypto: Add IV generation templates To: Xiongfeng Wang Cc: Milan Broz , Mark Brown , Alasdair Kergon , Mike Snitzer , Herbert Xu , dm-devel@redhat.com, Linux Kernel Mailing List , Jonathan Cameron Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 19, 2018 at 3:46 AM, Xiongfeng Wang wrote: > Hi, > > On 2018/7/19 1:17, Milan Broz wrote: >> On 18/07/18 18:46, Mark Brown wrote: >>> On Wed, Jul 18, 2018 at 10:16:05AM +0200, Milan Broz wrote: >>> >>>> So we are here again and moving INTERNAL dm-crypt functionality into >>>> cryptoapi. >> >> 2) If the reason is performance, please provide numbers with the patch. >> What I see now is that the performance is almost the same. So why you are doing it? >> Any real hw that benefits from it? > > Because the internal implementation of the IV template 'benbi()' is still > dividing the whole bio into sectors, so the performance is almost the same. > The purpose of this patch is to let dm-crypt rely on the new algorithm 'aes-cbc-benbi' > and pass the whole bio to the new algorithm. > And then if the hardware driver implements this new algorithm, it can get the data of > the bio at one time, and return the processed data at one time. > I think it will decrease the overhead of passing each sector alternatively. > But the hardware need to implement the new algorithm if it want to benefit from this. There seems to be some support for at least essiv(aes) in drivers/crypto/ccree/cc_cipher.c, is that compatible with your essiv(*) template, or is that something else? Arnd