From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753933AbcA0H7K (ORCPT ); Wed, 27 Jan 2016 02:59:10 -0500 Received: from mga04.intel.com ([192.55.52.120]:59036 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752698AbcA0H7I (ORCPT ); Wed, 27 Jan 2016 02:59:08 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,354,1449561600"; d="scan'208";a="36912759" Subject: Re: [PATCH v2 04/10] crypto/compress: add asynchronous compression support To: Herbert Xu , Joonsoo Kim References: <1453796112-14273-1-git-send-email-iamjoonsoo.kim@lge.com> <1453796112-14273-5-git-send-email-iamjoonsoo.kim@lge.com> <20160127074140.GA30335@gondor.apana.org.au> CC: "David S. Miller" , Sergey Senozhatsky , Minchan Kim , "Dan Streetman" , , , Joonsoo Kim From: "Li, Weigang" Message-ID: <56A878C9.8050202@intel.com> Date: Wed, 27 Jan 2016 15:59:05 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <20160127074140.GA30335@gondor.apana.org.au> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.239.127.40] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/27/2016 3:41 PM, Herbert Xu wrote: > On Tue, Jan 26, 2016 at 05:15:06PM +0900, Joonsoo Kim wrote: >> From: Weigang Li >> >> Now, asynchronous compression APIs are supported. There is no asynchronous >> compression driver now but this APIs can be used as front-end to >> synchronous compression algorithm. In this case, scatterlist would be >> linearlized when needed so it would cause some overhead. >> >> Signed-off-by: Weigang Li >> Signed-off-by: Joonsoo Kim > > I think we should be able to use this for the synchronous case > too, like we do with skcipher and ahash. > > The main difference that I can see right now is that acomp always > allocates a context through the request object while scomp does not. > > This difference is entirely artificial as we could also make the > context conditional for acomp. > > The reason we had the shash/ahash division is because the shash > interface offers a direct pointer interface while ahash is SG-based. > Otherwise ahash is just as able as shash to handle synchronous > requests. > > At this point in time I don't see such a fundamental distinction > between acomp and scomp. > > Cheers, > The acomp is also SG-based, while scomp only accepts flat buffer.