From: Fabien DESSENNE Subject: Re: [PATCH RFC 1/4] crypto: engine - Permit to enqueue all async requests Date: Wed, 6 Dec 2017 11:02:23 +0000 Message-ID: <091ff463-9958-7f96-7ebb-87b36d63cce4@st.com> References: <20171129084121.9385-1-clabbe.montjoie@gmail.com> <20171129084121.9385-2-clabbe.montjoie@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Cc: "linux-arm-kernel@lists.infradead.org" , "linux-crypto@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "virtualization@lists.linux-foundation.org" To: Corentin Labbe , "herbert@gondor.apana.org.au" , Alexandre TORGUE , "arei.gonglei@huawei.com" , "davem@davemloft.net" , "jasowang@redhat.com" , "mcoquelin.stm32@gmail.com" , "mst@redhat.com" Return-path: Received: from mx08-00178001.pphosted.com ([91.207.212.93]:60826 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754696AbdLFLDS (ORCPT ); Wed, 6 Dec 2017 06:03:18 -0500 In-Reply-To: <20171129084121.9385-2-clabbe.montjoie@gmail.com> Content-Language: en-US Content-ID: <7E4628E4AFA148478D200FE2C9C5D684@st.com> Sender: linux-crypto-owner@vger.kernel.org List-ID: DQoNCk9uIDI5LzExLzE3IDA5OjQxLCBDb3JlbnRpbiBMYWJiZSB3cm90ZToNCj4gVGhlIGNyeXB0 byBlbmdpbmUgY291bGQgYWN0dWFsbHkgb25seSBlbnF1ZXVlIGhhc2ggYW5kIGFibGtjaXBoZXIg cmVxdWVzdC4NCj4gVGhpcyBwYXRjaCBwZXJtaXQgaXQgdG8gZW5xdWV1ZSBhbnkgdHlwZSBvZiBj cnlwdG9fYXN5bmNfcmVxdWVzdC4NCj4NCj4gU2lnbmVkLW9mZi1ieTogQ29yZW50aW4gTGFiYmUg PGNsYWJiZS5tb250am9pZUBnbWFpbC5jb20+DQo+IC0tLQ0KPiAgIGNyeXB0by9jcnlwdG9fZW5n aW5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