Linux cryptographic layer development
 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 15:46:58 +0200	[thread overview]
Message-ID: <4B682CD2.3010308@nokia.com> (raw)
In-Reply-To: <4B6819FB.8080607@nokia.com>

in sync API final() does not have any data.

Is async driver also should ignore req->src in final() call?

- Dmitry


Kasatkin Dmitry (Nokia-D/Helsinki) wrote:
> Hi,
>
> It actually would not make sense as final() suppose to cleanup
> everything and in the case of EINPROGRESS we can not do it.
>
> So the question how then to "wait for completion" of the hash by HW if
> not to use finup()
>
> - Dmitry
>
>
> Kasatkin Dmitry (Nokia-D/Helsinki) wrote:
>   
>> 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,
>>>   
>>>     
>>>       
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>   
>>     
> --
> To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>   

  reply	other threads:[~2010-02-02 13:47 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
2010-02-02 12:26     ` Dmitry Kasatkin
2010-02-02 13:46       ` Dmitry Kasatkin [this message]
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=4B682CD2.3010308@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox