From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?B?SG9yaWEgR2VhbnTEgw==?= Subject: Re: [PATCH v2 5/5] crypto: talitos: Add software backlog queue handling Date: Mon, 9 Mar 2015 14:08:27 +0200 Message-ID: <54FD8D3B.5040409@freescale.com> References: <1425388897-5434-1-git-send-email-mort@bork.org> <1425388897-5434-6-git-send-email-mort@bork.org> <20150303182332.546523088b5891a776880c0f@freescale.com> <54F8235B.5080301@freescale.com> <20150306044821.GA1411@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Kim Phillips , Martin Hicks , Scott Wood , Kumar Gala , , To: Herbert Xu Return-path: Received: from mail-bl2on0134.outbound.protection.outlook.com ([65.55.169.134]:18249 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751689AbbCIMIk (ORCPT ); Mon, 9 Mar 2015 08:08:40 -0400 In-Reply-To: <20150306044821.GA1411@gondor.apana.org.au> Sender: linux-crypto-owner@vger.kernel.org List-ID: On 3/6/2015 6:48 AM, Herbert Xu wrote: > On Thu, Mar 05, 2015 at 11:35:23AM +0200, Horia Geant=C4=83 wrote: >> >>> Only potential problem is getting the crypto API to set the GFP_DMA >>> flag in the allocation request, but presumably a >>> CRYPTO_TFM_REQ_DMA crt_flag can be made to handle that. >> >> Right. And this flag would apply only to request __ctx[]. >> >> Herbert, would this be an acceptable addition to crypto API? >=20 > How would such a flag work? Hm, I thought that GFP_DMA memory could be allocated only for request private ctx. This is obviously not the case. *_request_alloc(tfm, gfp) crypto API functions would do: if (crypto_tfm_get_flags(tfm) & CRYPTO_TFM_REQ_DMA) gfp |=3D GFP_DMA; Thanks, Horia From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1bbn0105.outbound.protection.outlook.com [157.56.111.105]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id A42C41A0008 for ; Mon, 9 Mar 2015 23:08:44 +1100 (AEDT) Message-ID: <54FD8D3B.5040409@freescale.com> Date: Mon, 9 Mar 2015 14:08:27 +0200 From: =?UTF-8?B?SG9yaWEgR2VhbnTEgw==?= MIME-Version: 1.0 To: Herbert Xu Subject: Re: [PATCH v2 5/5] crypto: talitos: Add software backlog queue handling References: <1425388897-5434-1-git-send-email-mort@bork.org> <1425388897-5434-6-git-send-email-mort@bork.org> <20150303182332.546523088b5891a776880c0f@freescale.com> <54F8235B.5080301@freescale.com> <20150306044821.GA1411@gondor.apana.org.au> In-Reply-To: <20150306044821.GA1411@gondor.apana.org.au> Content-Type: text/plain; charset="utf-8" Cc: Martin Hicks , linux-crypto@vger.kernel.org, Scott Wood , linuxppc-dev@lists.ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 3/6/2015 6:48 AM, Herbert Xu wrote: > On Thu, Mar 05, 2015 at 11:35:23AM +0200, Horia Geantă wrote: >> >>> Only potential problem is getting the crypto API to set the GFP_DMA >>> flag in the allocation request, but presumably a >>> CRYPTO_TFM_REQ_DMA crt_flag can be made to handle that. >> >> Right. And this flag would apply only to request __ctx[]. >> >> Herbert, would this be an acceptable addition to crypto API? > > How would such a flag work? Hm, I thought that GFP_DMA memory could be allocated only for request private ctx. This is obviously not the case. *_request_alloc(tfm, gfp) crypto API functions would do: if (crypto_tfm_get_flags(tfm) & CRYPTO_TFM_REQ_DMA) gfp |= GFP_DMA; Thanks, Horia