Received: by 10.192.165.156 with SMTP id m28csp88560imm; Wed, 18 Apr 2018 17:55:41 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+t+PYC57Ncz8K1ysfieJAbrlJqzYVc989SGpjVwk3PKMTVZX/YT31l7GDDPZ7BXV9cJcjq X-Received: by 2002:a17:902:f83:: with SMTP id 3-v6mr4013855plz.336.1524099341548; Wed, 18 Apr 2018 17:55:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524099341; cv=none; d=google.com; s=arc-20160816; b=reDyagdir4l+sMA1yjvLbc261I/RJz7Wdy7smvz3zEasb91eoqWBWTvfbGxsGXHjwG o8VfIAXznhDLZUAC/QubEhO42q/Che4YC9n2shpG/a+C8thLr4FJUBmJ2RKLbK+JiCaa LD3tgS3v6q8uDVENSl5caiWd9X5w326MvEhkQ89u5sXit8nBREecHVd22h+rw7FkCWCZ +HL89EzX8cQoIcfKqBigPqQuwT1mOUytPWCHB65q5cTqpYSTX7ckjQ5mHwEL4IdIX1ha zRypka2ppJIEKmPpK0dN2J73C9FQhVCd0NKiyxr55nGQsN4MFIgc8rrHpAGnNvogpAzu qPJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :dlp-reaction:dlp-version:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:arc-authentication-results; bh=h4gPtMiy82OT93p009+vTj3Rb0Ef4xJdkmVKOF04duU=; b=nUBqP/WIvnjmQzyQF6tkqGxAZrdiw2iv9wgwuX4oEbM4U6AdKEO4RPwwiuVWKVtMcq nxcjsDUCUjMC6XEw40hIhcO2322p+tTTLDHsdsVpaK8pwC1jzoZ17+IHKMd2NQBB/d0v 0ocC/sL1KCEdWOZ6T49JDb9H1CH9QI3LZTZBcFwuceND7Zz6DBcXlaWCFm857zuyYXwi Qqc0YgPpxO4SXFqqFgBfvWHjayPmKPgbjAErh5sdUb7cQajOke01F/f5Y8GREig6D9n4 FAjhS6lN3EQwYE9p9Q0M8ETfM5kYjFOvtrntq9BxeICU2qRa8CGRbweUQ89qCbOLP3G7 EO0w== ARC-Authentication-Results: i=1; mx.google.com; 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 c11-v6si2238638pls.97.2018.04.18.17.55.26; Wed, 18 Apr 2018 17:55:41 -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; 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 S1752810AbeDSAyT convert rfc822-to-8bit (ORCPT + 99 others); Wed, 18 Apr 2018 20:54:19 -0400 Received: from mga14.intel.com ([192.55.52.115]:40499 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752326AbeDSAyR (ORCPT ); Wed, 18 Apr 2018 20:54:17 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Apr 2018 17:54:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,467,1517904000"; d="scan'208";a="47314905" Received: from orsmsx103.amr.corp.intel.com ([10.22.225.130]) by fmsmga004.fm.intel.com with ESMTP; 18 Apr 2018 17:54:17 -0700 Received: from orsmsx114.amr.corp.intel.com (10.22.240.10) by ORSMSX103.amr.corp.intel.com (10.22.225.130) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 18 Apr 2018 17:54:16 -0700 Received: from orsmsx111.amr.corp.intel.com ([169.254.12.154]) by ORSMSX114.amr.corp.intel.com ([169.254.8.92]) with mapi id 14.03.0319.002; Wed, 18 Apr 2018 17:54:16 -0700 From: "Dey, Megha" To: Herbert Xu CC: "linux-kernel@vger.kernel.org" , "linux-crypto@vger.kernel.org" , "davem@davemloft.net" Subject: RE: [PATCH V8 1/5] crypto: Multi-buffer encryption infrastructure support Thread-Topic: [PATCH V8 1/5] crypto: Multi-buffer encryption infrastructure support Thread-Index: AQHTiaT71VA7Q5Or9ESQdIw+yX/ir6N6FLYAgFlFdnuAMogJgIABiP2AgABwaXA= Date: Thu, 19 Apr 2018 00:54:16 +0000 Message-ID: References: <1515542948-24041-1-git-send-email-megha.dey@linux.intel.com> <1515542948-24041-2-git-send-email-megha.dey@linux.intel.com> <20180118113905.GA19904@gondor.apana.org.au> <1516322661.2526.3.camel@megha-Z97X-UD7-TH> <20180316145351.GA6231@gondor.apana.org.au> <20180418110115.v2w3o5yfv4u3gc4r@gondor.apana.org.au> In-Reply-To: <20180418110115.v2w3o5yfv4u3gc4r@gondor.apana.org.au> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMDg2YTNhMDEtYjJjZi00ODczLTk3MjEtNDUyZTE1YTVkYjE3IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6ImRBQWJxU1luaDBmaldZVEZ1MnJsMmJCRlhVaUVGcVZ6UXlBRnZqU0hiTXc9In0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.22.254.139] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >-----Original Message----- >From: Herbert Xu [mailto:herbert@gondor.apana.org.au] >Sent: Wednesday, April 18, 2018 4:01 AM >To: Dey, Megha >Cc: linux-kernel@vger.kernel.org; linux-crypto@vger.kernel.org; >davem@davemloft.net >Subject: Re: [PATCH V8 1/5] crypto: Multi-buffer encryption infrastructure >support > >On Tue, Apr 17, 2018 at 06:40:17PM +0000, Dey, Megha wrote: >> >> >> >-----Original Message----- >> >From: Herbert Xu [mailto:herbert@gondor.apana.org.au] >> >Sent: Friday, March 16, 2018 7:54 AM >> >To: Dey, Megha >> >Cc: linux-kernel@vger.kernel.org; linux-crypto@vger.kernel.org; >> >davem@davemloft.net >> >Subject: Re: [PATCH V8 1/5] crypto: Multi-buffer encryption >> >infrastructure support >> > >> >I have taken a deeper look and I'm even more convinced now that >> >mcryptd is simply not needed in your current model. >> > >> >The only reason you would need mcryptd is if you need to limit the >> >rate of requests going into the underlying mb algorithm. >> > >> >However, it doesn't do that all. Even though it seems to have a >> >batch size of 10, but because it immediately reschedules itself after >> >the batch runs out, it's essentially just dumping all requests at the >> >underlying algorithm as fast as they're coming in. The underlying >> >algorithm doesn't have need throttling anyway because it'll do the work >when the queue is full synchronously. >> > >> >So why not just get rid of mcryptd completely and expose the >> >underlying algorithm as a proper async skcipher/hash? >> >> Hi Herbert, >> >> Most part of the cryptd.c and mcryptd.c are similar, except the logic >> used to flush out partially completed jobs in the case of multibuffer >algorithms. >> >> I think I will try to merge the cryptd and mcryptd adding necessary quirks for >multibuffer where needed. > >I think you didn't quite get my point. From what I'm seeing you don't need >either cryptd or mcryptd. You just need to expose the underlying mb >algorithm directly. Hi Herbert, Yeah I think I misunderstood. I think what you mean is to remove mcryptd.c completely and avoid the extra layer of indirection to call the underlying algorithm, instead call it directly, correct? So currently we have 3 algorithms registered for every multibuffer algorithm: name : __sha1-mb driver : mcryptd(__intel_sha1-mb) name : sha1 driver : sha1_mb name : __sha1-mb driver : __intel_sha1-mb If we remove mcryptd, then we will have just the 2? The outer algorithm:sha1-mb, will > >So I'm not sure what we would gain from merging cryptd and mcryptd. > >Cheers, >-- >Email: Herbert Xu Home Page: >http://gondor.apana.org.au/~herbert/ >PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt