All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Kasatkin <dmitry.kasatkin@nokia.com>
To: ext Herbert Xu <herbert@gondor.hengli.com.au>
Cc: <linux-crypto@vger.kernel.org>
Subject: Re: hash finup() issue
Date: Thu, 27 Jan 2011 08:47:40 +0200	[thread overview]
Message-ID: <4D41150C.90806@nokia.com> (raw)
In-Reply-To: <20110126233217.GA26664@gondor.apana.org.au>

No.no.. That is not a flag for particular request...
The flag is how total hash will be handled...

FINUP flag means that client will call finup().
So it will be

update()
update()
...
update()
finup()


not
update()
...
update()
final()...

In other words...
update() means that it will be more data coming (like MSG_MORE)
finup() is just final update...

Basically driver on update() will not do extra buffering..

Is it clear now?

How would you solve such issue?

- Dmitry

On 27/01/11 01:32, ext Herbert Xu wrote:
> On Wed, Jan 26, 2011 at 09:47:27AM +0200, Dmitry Kasatkin wrote:
>> I am not talking about user space API at all.
>>
>> I talk about kernel crypto API and kernel clients.
>>
>> Please understand the following: when update() is called driver does not
>> know if it is last update or not...
>> That is essential.
>> If client code would always use update/finup then it is fine..
>> But original API and clients uses update/final...
>> That is why some way (flag) needed to tell if finup() will be used or not...
>>
>> It gave up 20% performance improvement in some case because no extra
>> memcpy has been done...
>>
>> If you think about other solution, please share...
> If the crypto user can set the FINUP flag then it can just call
> finup, simple.
>
> Cheers,

  reply	other threads:[~2011-01-27  6:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-25 13:44 hash finup() issue Dmitry Kasatkin
2011-01-25 23:29 ` Herbert Xu
2011-01-26  7:47   ` Dmitry Kasatkin
2011-01-26 23:32     ` Herbert Xu
2011-01-27  6:47       ` Dmitry Kasatkin [this message]
2011-01-27  7:18         ` 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=4D41150C.90806@nokia.com \
    --to=dmitry.kasatkin@nokia.com \
    --cc=herbert@gondor.hengli.com.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.