All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Kasatkin <dmitry.kasatkin@nokia.com>
To: ext Herbert Xu <herbert@gondor.apana.org.au>
Cc: "linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>
Subject: Re: Async Crypto API
Date: Tue, 02 Feb 2010 14:17:51 +0200	[thread overview]
Message-ID: <4B6817EF.7060307@nokia.com> (raw)
In-Reply-To: <20100123032039.GA5551@gondor.apana.org.au>

Hi,

In the case when finup() is not used, just update/update/../final
driver finalize calculation from the final function.

It takes a time and if it may not sleep, can final() also return
EINPROGRESS?

Thanks,
Dmitry


ext Herbert Xu wrote:
> Dmitry Kasatkin <dmitry.kasatkin@nokia.com> wrote:
>   
>> Hello,
>>
>> I have one question about async api.
>>
>> I work on AHASH driver and wonder about one thing.
>>
>> while calculating hash, client might call many times
>>
>> ahash_request_set_crypt(req, &sg, sha1, len);
>> crypto_ahash_update(req);
>> ..
>> ..
>> ahash_request_set_crypt(req, &sg, sha1, len);
>> crypto_ahash_finup(req);
>>
>> right?
>>
>> But because it is async and driver does not wait_for_completion,
>> previous request may not be completed before client will call next update.
>>
>> But what should be the behavior of the driver?
>>     
>
> If any async operation returns EINPROGRESS, the client must not
> proceed until that operation has completed.
>
> Cheers,
>   

  parent reply	other threads:[~2010-02-02 12:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-22  8:45 Async Crypto API Dmitry Kasatkin
2010-01-23  3:20 ` Herbert Xu
2010-01-27  6:45   ` Dmitry Kasatkin
2010-01-29  9:03     ` Herbert Xu
2010-02-02 12:17   ` Dmitry Kasatkin [this message]
2010-02-02 12:26     ` Dmitry Kasatkin
2010-02-02 13:46       ` Dmitry Kasatkin
2010-02-09  7:32         ` Herbert Xu
2010-02-09  7:31     ` Herbert Xu

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=4B6817EF.7060307@nokia.com \
    --to=dmitry.kasatkin@nokia.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.