From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933335AbbKRP7A (ORCPT ); Wed, 18 Nov 2015 10:59:00 -0500 Received: from mga09.intel.com ([134.134.136.24]:30371 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755930AbbKRP66 (ORCPT ); Wed, 18 Nov 2015 10:58:58 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,313,1444719600"; d="scan'208";a="688562546" Message-ID: <1447862336.4933.36.camel@schen9-desk2.jf.intel.com> Subject: Re: [PATCH v2 1/5] crypto: Multi-buffer encryptioin infrastructure support From: Tim Chen To: Herbert Xu Cc: "H. Peter Anvin" , "David S.Miller" , Stephan Mueller , Chandramouli Narayanan , Vinodh Gopal , James Guilford , Wajdi Feghali , Jussi Kivilinna , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Date: Wed, 18 Nov 2015 07:58:56 -0800 In-Reply-To: <20151118050645.GA15327@gondor.apana.org.au> References: <1446157263.14635.15.camel@schen9-desk2.jf.intel.com> <20151117130633.GB8032@gondor.apana.org.au> <1447801169.4933.28.camel@schen9-desk2.jf.intel.com> <20151118000748.GC13894@gondor.apana.org.au> <1447806614.4933.32.camel@schen9-desk2.jf.intel.com> <20151118050645.GA15327@gondor.apana.org.au> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.8.5 (3.8.5-2.fc19) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2015-11-18 at 13:06 +0800, Herbert Xu wrote: > On Tue, Nov 17, 2015 at 04:30:14PM -0800, Tim Chen wrote: > > On Wed, 2015-11-18 at 08:07 +0800, Herbert Xu wrote: > > > On Tue, Nov 17, 2015 at 02:59:29PM -0800, Tim Chen wrote: > > > > > > > > Herbert, would you prefer me to use ablkcipher scatter walk instead, > > > > assuming the overhead of both walk are about the same? > > > > > > Well since you are going to potentially sleep in the middle of > > > an operation I'd think ablkcipher is required, no? > > > > We're using blkcipher walk in the implementation. > > As long as we use kmap and instead of kmap_atomic, > > it allows us to sleep in the middle of the walk. > > What if you were called from an atomic context, such as IPsec? > IPSec will invoke this multi-buffer encrypt with async request. The work is done in crypto daemon, so it wouldn't be in atomic context. But anyway, I'm okay with switching to ablkcipher walk, as long as it doesn't incur too much more overhead than blkcipher walk. Tim