Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751943AbcDRIb5 (ORCPT ); Mon, 18 Apr 2016 04:31:57 -0400 Received: from helcar.hengli.com.au ([209.40.204.226]:51512 "EHLO helcar.hengli.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751736AbcDRIbx (ORCPT ); Mon, 18 Apr 2016 04:31:53 -0400 Date: Mon, 18 Apr 2016 16:31:16 +0800 From: Herbert Xu To: Baolin Wang Cc: David Miller , Alasdair G Kergon , Mike Snitzer , Jens Axboe , dm-devel@redhat.com, Andrew Morton , david.s.gordon@intel.com, Tom Lendacky , Robert Jarzmik , Masahiro Yamada , smueller@chronox.de, tadeusz.struk@intel.com, Masanari Iida , shli@kernel.org, Mark Brown , Linus Walleij , Arnd Bergmann , LKML , linux-crypto@vger.kernel.org, linux-raid@vger.kernel.org Subject: Re: [PATCH v2 0/4] Introduce bulk mode for crypto engine framework Message-ID: <20160418083116.GA18406@gondor.apana.org.au> References: <20160418054511.GA17368@gondor.apana.org.au> <20160418070407.GA17760@gondor.apana.org.au> <20160418072434.GA17954@gondor.apana.org.au> <20160418080454.GA18200@gondor.apana.org.au> <20160418081753.GA18323@gondor.apana.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 855 Lines: 20 On Mon, Apr 18, 2016 at 04:28:46PM +0800, Baolin Wang wrote: > > What I meaning is if the xts engine can support bulk block, then the > engine driver can select bulk mode to do encryption, but if their xts > engine can not support bulk mode, which depends on hardware design, > the engine driver can not select bulk mode. So the dm-crypt can not > know what will be selected by the engine driver, it can not send one > bulk block each time. Why can't the xts code just break it up if it can't handle it? You want to postpone splitting as much as possible. Even if the underlying xts code couldn't handle it, it would still make sense for the crypto API to see the request in one piece. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt