Netdev List
 help / color / mirror / Atom feed
From: Dave Watson <davejwatson@fb.com>
To: Vakul Garg <vakul.garg@nxp.com>
Cc: <linux-crypto@vger.kernel.org>, <ilyal@mellanox.com>,
	<aviadye@mellanox.com>, <davem@davemloft.net>,
	<netdev@vger.kernel.org>, Gilad Ben-Yossef <gilad@benyossef.com>
Subject: Re: [PATCHv2] tls: Add support for encryption using async offload accelerator
Date: Wed, 31 Jan 2018 07:22:28 -0800	[thread overview]
Message-ID: <20180131152228.GA24247@davejwatson-mba> (raw)
In-Reply-To: <20180131160437.6583-1-vakul.garg@nxp.com>

On 01/31/18 09:34 PM, Vakul Garg wrote:
> Async crypto accelerators (e.g. drivers/crypto/caam) support offloading
> GCM operation. If they are enabled, crypto_aead_encrypt() return error
> code -EINPROGRESS. In this case tls_do_encryption() needs to wait on a
> completion till the time the response for crypto offload request is
> received.

Comments from V1
> On Wed, Jan 31, 2018 at 8:10 AM, Gilad Ben-Yossef <gilad@benyossef.com> wrote:
>> Hi Vakul,
>>
>> On Wed, Jan 31, 2018 at 12:36 PM, Vakul Garg <vakul.garg@nxp.com> wrote:
>>> Async crypto accelerators (e.g. drivers/crypto/caam) support offloading
>>> GCM operation. If they are enabled, crypto_aead_encrypt() return error
>>> code -EINPROGRESS. In this case tls_do_encryption() needs to wait on a
>>> completion till the time the response for crypto offload request is
>>> received.
>>>
>>
>> Thank you for this patch. I think it is actually a bug fix and should
>> probably go into stable
>
> On second though in stable we should probably just disable async tfm
> allocations.
> It's simpler. But this approach is still good for -next
>
>
> Gilad

I agree with Gilad, just disable async for now. 

If the flag MSG_DONTWAIT is set, we should be returning -EINPROGRESS
and not wait for a response.  I had started working on a patch for
that, but it's pretty tricky to get right.

  reply	other threads:[~2018-01-31 15:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-31 16:04 [PATCHv2] tls: Add support for encryption using async offload accelerator Vakul Garg
2018-01-31 15:22 ` Dave Watson [this message]
2018-01-31 17:22   ` Vakul Garg
2018-01-31 17:34     ` Dave Watson
2018-01-31 17:48       ` Gilad Ben-Yossef
2018-02-01  6:17       ` Vakul Garg
2018-01-31 15:33 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180131152228.GA24247@davejwatson-mba \
    --to=davejwatson@fb.com \
    --cc=aviadye@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=gilad@benyossef.com \
    --cc=ilyal@mellanox.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=vakul.garg@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox