crypto: omap-sha1-md5: OMAP3 SHA1 & MD5 driver
----- Original message -----
Quoted 30 lines
Hi:
OK so you did answer my question :)
Quoted 25 lines · Dmitry Kasatkin
Interesting case with hmac.
return
crypto_shash_init(&desc.shash)?:crypto_shash_update(&desc.shash, ipad, bs)?:crypto_shash_export(&desc.shash, ipad)?:crypto_shash_init(&desc.shash)?:crypto_shash_update(&desc.shash, opad, bs)?:crypto_shash_export(&desc.shash, opad);Basically it does not call final.
Then call init again.hw has certain limitation that it requires to process last block with some bit set.
WHen update is called there is no possibility to know that no moreupdate()will come.
So possible last block is stored and then hashed out from the final.I see that above code will not work with the driver.
I wonder how intermediate export/import could be done with omap hw.But if it's not possible, then why not to have hmac(sha1) as just sw. Anyway hmac should not process as huge amount of data as hash itself.
Quoted 19 lines
Quoted 1 line
What is your opinion/advice?
A sha1-only driver is not very useful since the biggest potential user IPsec uses hmac(sha1).
Is the omap hw documentation available publicly?
Thanks,
Signature · 9 lines
Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi.
Sha1 only is also very useful. We calcluate hashes of all binaries for integrity verification. We do not need hmac there.
But in general it is possible do add algo hmac(sha1) to the driver and implement it internally without import/export.
I have to check on documentation publicity.
Br,
Dmitry
Herbert Xu
maintainerQuoted 2 lines · On Thu, Apr 08, 2010 at 06:35:33PM +0200, [email protected] wrote:
Sha1 only is also very useful. We calcluate hashes of all binaries for integrity verification. We do not need hmac there.
But do we do that in the Linux kernel?
Of course it would be useful if we had a user-space API, but that is still on the TODO list.
Quoted 1 line
But in general it is possible do add algo hmac(sha1) to the driver and implement it internally without import/export.
No we don't want to add hmac to every single driver that does sha1. So this would not be a good precedent. In any case, some form of import/export must be possible (maybe not in our current format) because our API requires the ability to perform a partial update and postpone the finalisation indefinitely.
If you couldn't import/export, that would imply that the hardware must have infinite memory.
Quoted 1 line
I have to check on documentation publicity.
Thanks!
Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txtHi,
btw. patch to mv_cesa is actually adding hmac to the driver. How would you comment that?
The same way could be also used here.
I could calc final output with sw.
Any comments?
- Dmitry
Quoted 26 lines · ext Herbert Xu
Quoted 2 lines · On Thu, Apr 08, 2010 at 06:35:33PM +0200, [email protected] wrote:
Sha1 only is also very useful. We calcluate hashes of all binaries for integrity verification. We do not need hmac there.
But do we do that in the Linux kernel?
Of course it would be useful if we had a user-space API, but that is still on the TODO list.
Quoted 2 lines
But in general it is possible do add algo hmac(sha1) to the driver and implement it internally without import/export.
No we don't want to add hmac to every single driver that does sha1. So this would not be a good precedent. In any case, some form of import/export must be possible (maybe not in our current format) because our API requires the ability to perform a partial update and postpone the finalisation indefinitely.
If you couldn't import/export, that would imply that the hardware must have infinite memory.
Quoted 2 lines
I have to check on documentation publicity.
Thanks!
Herbert Xu
maintainerQuoted 3 lines · Dmitry Kasatkin
btw. patch to
mv_cesais actually adding hmac to the driver. How would you comment that?
AFAICS it's doing HMAC in hardware. Uri, is that not the case?
Quoted 1 line
The same way could be also used here.
If your hardware supports HMAC that would definitely be the way to go.
Cheers,
Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txtHi
Quoted 8 lines · ext Herbert Xu
Quoted 3 lines · Dmitry Kasatkin
btw. patch to
mv_cesais actually adding hmac to the driver. How would you comment that?AFAICS it's doing HMAC in hardware. Uri, is that not the case?
As I can see from the patch initial vectors calculated with SW shash Rest is done in hw, basically sha1.
The same can be done with omap driver.
Just in addition to finalize as done in hmac_final().
crypto_shash_import(desc, opad) ?:
crypto_shash_finup(desc, out, ds, req->result);
Quoted 7 lines
Quoted 2 lines
The same way could be also used here.
If your hardware supports HMAC that would definitely be the way to go.
Cheers,
Btw.
But anyway hmac does not support ahash now. right? So the only way currently is to add to the driver.
Quoted 15 lines · ext Herbert Xu
Quoted 3 lines · Dmitry Kasatkin
btw. patch to
mv_cesais actually adding hmac to the driver. How would you comment that?AFAICS it's doing HMAC in hardware. Uri, is that not the case?
Quoted 2 lines
The same way could be also used here.
If your hardware supports HMAC that would definitely be the way to go.
Cheers,
The Marvell CESA needs some software assistance in doing HMAC - the inner and outer blocks need to be prepared and hashed (partial hash). The hash results are fed into the hardware and the hardware uses it as IVs and does the two hash operations. So in effect the HW hmac(sha1) driver needs software sha1 driver.
Note, however, that the above calculation is not per-request, it is per setkey operation. The IVs are stored in the tfm.
I hope that clears things with respect to the mv_cesa driver.
Quoted 22 lines · Dmitry Kasatkin
Btw.
But anyway hmac does not support ahash now. right? So the only way currently is to add to the driver.
Quoted 15 lines · ext Herbert Xu
Quoted 3 lines · Dmitry Kasatkin
btw. patch to
mv_cesais actually adding hmac to the driver. How would you comment that?AFAICS it's doing HMAC in hardware. Uri, is that not the case?
Quoted 2 lines
The same way could be also used here.
If your hardware supports HMAC that would definitely be the way to go.
Cheers,
Herbert Xu
maintainerQuoted 3 lines · Dmitry Kasatkin
As I can see from the patch initial vectors calculated with SW shash Rest is done in hw, basically sha1.
Ideally that code shouldn't be duplicated either, but honestly that doesn't matter when it comes to whether the hardware can do HMAC directly.
You only compute the IVs once for each key, so whether it's done in software or hardware doesn't matter.
Quoted 2 lines
The same can be done with omap driver.
Just in addition to finalize as done inhmac_final().
If you do hmac_final in software, then this is no longer a hw HMAC implementation and we should instead implement an ahash version of hmac.
The difference here is that ipad/opad is computed only once for a key, while final happens many times over the lifetime of that key.
Cheers,
Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txtHerbert Xu
maintainerQuoted 3 lines · Dmitry Kasatkin
But anyway hmac does not support ahash now. right? So the only way currently is to add to the driver.
No the only way is to add an ahash version of hmac.
Anyway, the fact that you can't easily implement import/export is not just a question of supporting hmac. It is in fact a sign that your driver breaks the crypto API.
The fundamental requirement for the ahash interface is that you must be able to launch multiple operations, which means that all state must be stored in the request and not held in hardware (except as a cache).
IOW, you must be able to support
crypto_ahash_update(&reqa); ... crypto_ahash_update(&reqb); ... ahash_request_set_crypt(&reqa, ...); crypto_ahash_finup(&reqa); ... ahash_request_set_crypt(&reqb, ...); crypto_ahash_finup(&reqb);
AFAICS your driver cannot do this correctly in its current form.
Thanks,
Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txtQuoted 16 lines · ext Herbert Xu
Quoted 3 lines · Dmitry Kasatkin
As I can see from the patch initial vectors calculated with SW shash Rest is done in hw, basically sha1.
Ideally that code shouldn't be duplicated either, but honestly that doesn't matter when it comes to whether the hardware can do HMAC directly.
You only compute the IVs once for each key, so whether it's done in software or hardware doesn't matter.
Quoted 3 lines
The same can be done with omap driver.
Just in addition to finalize as done inhmac_final().
Quoted 9 lines
If you do
hmac_finalin software, then this is no longer a hw HMAC implementation and we should instead implement an ahash version of hmac.The difference here is that ipad/opad is computed only once for a key, while final happens many times over the lifetime of that key.
I do not see your point.
As stated by Uri Simchoni, hw hmac(sha1) in mv_cesa case requires sw sha1 driver. Initial vectors are calculated per key by sw.
So it is no longer hw HMAC implementation.
I just want to understand what make it defferent from mv_cesa if in omap-sham case
hash(opad ∥ hash(ipad ∥ message))
I would also:
1. calc hash(opad) using sw, export
2. hash(ipad ∥ message) using hw
3. then import and finup hash from step 1 with results of step 2 (using sw)
What makes it different from mc_cesa case?
Quoted 2 lines
Cheers,
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please see inline. Nice to clarify it.
Quoted 34 lines · ext Herbert Xu
Quoted 3 lines · Dmitry Kasatkin
But anyway hmac does not support ahash now. right? So the only way currently is to add to the driver.
No the only way is to add an ahash version of hmac.
Anyway, the fact that you can't easily implement import/export is not just a question of supporting hmac. It is in fact a sign that your driver breaks the crypto API.
The fundamental requirement for the ahash interface is that you must be able to launch multiple operations, which means that all state must be stored in the request and not held in hardware (except as a cache).
IOW, you must be able to support
crypto_ahash_update(&reqa); ... crypto_ahash_update(&reqb); ... ahash_request_set_crypt(&reqa, ...); crypto_ahash_finup(&reqa); ... ahash_request_set_crypt(&reqb, ...); crypto_ahash_finup(&reqb);
Quoted 3 lines
AFAICS your driver cannot do this correctly in its current form.
Well it can... if reqa occupied hw all other requests will fallback to sw sha1.
But if to do only hw and to follow above algorithm then it is necessary to remove shash support completely from the driver. And have a queue as I have with aes driver..
err = ablkcipher_enqueue_request(&dd->queue, req);
I see there is ahash_enqueue_request() which is in crypto/internal/hash.h and NEVER called.
Also in one of your earlier emails you said that it is not possible to call crypto_ahash_update() before completion. But with having a queue it does not really matter.
Possible to queue several update request from the same tfm.
The only need to wait_for_completion is to export/get results...
Can you confirm my understanding?
Thanks
Well. not like that.
Quoted 2 lines
Thanks,
Also one more question.
can reqa and reqb could come from the same tfm as well?
thanks
Quoted 79 lines · Kasatkin Dmitry (Nokia-D/Helsinki)
Please see inline. Nice to clarify it.
Quoted 36 lines · ext Herbert Xu
Quoted 4 lines · Dmitry Kasatkin
But anyway hmac does not support ahash now. right? So the only way currently is to add to the driver.
No the only way is to add an ahash version of hmac.
Anyway, the fact that you can't easily implement import/export is not just a question of supporting hmac. It is in fact a sign that your driver breaks the crypto API.
The fundamental requirement for the ahash interface is that you must be able to launch multiple operations, which means that all state must be stored in the request and not held in hardware (except as a cache).
IOW, you must be able to support
crypto_ahash_update(&reqa); ... crypto_ahash_update(&reqb); ... ahash_request_set_crypt(&reqa, ...); crypto_ahash_finup(&reqa); ... ahash_request_set_crypt(&reqb, ...); crypto_ahash_finup(&reqb);Quoted 4 lines
AFAICS your driver cannot do this correctly in its current form.
Well it can... if reqa occupied hw all other requests will fallback to sw sha1.
But if to do only hw and to follow above algorithm then it is necessary to remove shash support completely from the driver.
And have a queue as I have with aes driver..
err =ablkcipher_enqueue_request(&dd->queue, req);I see there is
ahash_enqueue_request()which is incrypto/internal/hash.hand NEVER called.Also in one of your earlier emails you said that it is not possible to call
crypto_ahash_update()before completion.
But with having a queue it does not really matter.
Possible to queue several update request from the same tfm.The only need to
wait_for_completionis to export/get results...Can you confirm my understanding?
Thanks
Well. not like that.
Quoted 3 lines
Thanks,
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Herbert Xu
maintainerQuoted 3 lines · Dmitry Kasatkin
Also one more question.
can reqa and reqb could come from the same tfm as well?
Yes of course.
Two packets coming from different CPUs going to through the same IPsec SA for instance.
Cheers,
Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txtHerbert Xu
maintainerQuoted 5 lines · Dmitry Kasatkin
I would also:
1. calc hash(opad) using sw, export
2. hash(ipad ∥ message) using hw
3. then import and finup hash from step 1 with results of step 2 (using sw)
Step 3 is the problem. If you perform step 3 in software then there is no point in exporting a hmac(sha1) object.
We should instead add ahash support to hmac and use that.
Cheers,
Signature · 8 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.htmlHerbert Xu
maintainerQuoted 3 lines · Dmitry Kasatkin
Well it can... if reqa occupied hw all other requests will fallback to sw sha1.
That is unacceptable. If we had a user-space API that would mean a single request can tie up the hardware indefinitely.
If your hardware is not able to produce a non-finalised hash, then you should only do finup/final in hardware, and use a software fallback to implement the rest.
If your hardware is also not able to accept an initial state, then the only thing you can implement is digest. The rest would have to fall back to software.
Cheers,
Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txtDoing step 3 using sw is probably faster than by hw (because it's short and avoid all the hw setup), so the suggested approach is probably faster than generic async hmac.
Quoted 7 lines · Herbert Xu
Quoted 5 lines · Dmitry Kasatkin
I would also:
1. calc hash(opad) using sw, export
2. hash(ipad ∥ message) using hw
3. then import and finup hash from step 1 with results of step 2 (using sw)
Quoted 6 lines
Step 3 is the problem. If you perform step 3 in software then there is no point in exporting a hmac(sha1) object.
We should instead add ahash support to hmac and use that.
Cheers,
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 3 lines · ext Uri Simchoni
Doing step 3 using sw is probably faster than by hw (because it's short and avoid all the hw setup), so the suggested approach is probably faster than generic async hmac.
Yes. that is exactly what happens in hw - it is much slower. And I do not see any problems as well with finishing it with sw.
Quoted 9 lines · Herbert Xu
Quoted 8 lines · Dmitry Kasatkin
Quoted 6 lines
I would also:
1. calc hash(opad) using sw, export
2. hash(ipad ∥ message) using hw
3. then import and finup hash from step 1 with results of step 2 (using sw)
Quoted 8 lines
Quoted 7 lines
Step 3 is the problem. If you perform step 3 in software then there is no point in exporting a hmac(sha1) object.
We should instead add ahash support to hmac and use that.
Cheers,
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 12 lines · ext Herbert Xu
Quoted 4 lines · Dmitry Kasatkin
Also one more question.
can reqa and reqb could come from the same tfm as well?
Yes of course.
Two packets coming from different CPUs going to through the same IPsec SA for instance.
Then state must be kept in req ctx, not tfm ctx.
Right?
Then when handling different request HW must be re-initialized. If handling the same request then no need to reinitialize.
Also not possible to call update(reqa) until previous completed. Otherwise it will mess up data in reqa.
Thanks
Quoted 2 lines
Cheers,
About import/export.
The problem with HW is that it always handles 64 byte blocks except last one.
So until finup/final it is not known if it is the last data. So some buffer is kept in context.
With DMA it is very inefficient to have small buffer. I use page 4k for that.
So after a certain update there is a data in the cache.
Doing export means that we need to get out intermediate hash and that buffer.
Any suggestion?
Thanks
Quoted 19 lines · ext Herbert Xu
Quoted 3 lines · Dmitry Kasatkin
Well it can... if reqa occupied hw all other requests will fallback to sw sha1.
That is unacceptable. If we had a user-space API that would mean a single request can tie up the hardware indefinitely.
If your hardware is not able to produce a non-finalised hash, then you should only do finup/final in hardware, and use a software fallback to implement the rest.
If your hardware is also not able to accept an initial state, then the only thing you can implement is digest. The rest would have to fall back to software.
Cheers,
Herbert Xu
maintainerQuoted 8 lines · Dmitry Kasatkin
Quoted 3 lines · ext Uri Simchoni
Doing step 3 using sw is probably faster than by hw (because it's short and avoid all the hw setup), so the suggested approach is probably faster than generic async hmac.
Yes. that is exactly what happens in hw - it is much slower. And I do not see any problems as well with finishing it with sw.
I never said that you can't do it in software. I just don't want every driver to write its own copy of hmac in software.
If you're going to do it in software, then let's make an ahash version of hmac.
Cheers,
Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txtHerbert Xu
maintainerQuoted 3 lines · Dmitry Kasatkin
Then state must be kept in req ctx, not tfm ctx.
Right?
Correct, the same thing applies to both shash and ahash.
Quoted 2 lines
Then when handling different request HW must be re-initialized. If handling the same request then no need to reinitialize.
Yes, you're allowed to cache state in the HW so that two requests in a row that use the same state can avoid reinitialisation.
Quoted 2 lines
Also not possible to call update(reqa) until previous completed. Otherwise it will mess up data in reqa.
That is up to the user to enforce. You just need to ensure that the hardware remains in a sane state even if the user screws up.
Cheers,
Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txtHerbert Xu
maintainerQuoted 8 lines · Dmitry Kasatkin
About import/export.
The problem with HW is that it always handles 64 byte blocks except last one.
So until finup/final it is not known if it is the last data. So some buffer is kept in context.
Quoted 8 lines
With DMA it is very inefficient to have small buffer. I use page 4k for that.
So after a certain update there is a data in the cache.Doing export means that we need to get out intermediate hash and that buffer.
Any suggestion?
There is no need to buffer extra data in the driver. If we need to do that that should be done in the upper layer.
So my suggestion would be to feed everything you get in update to the hardware immediately, unless of course if it's less than a single block.
Cheers,
Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txtQuoted 9 lines · ext Herbert Xu
Quoted 7 lines · Dmitry Kasatkin
Quoted 4 lines · ext Uri Simchoni
Doing step 3 using sw is probably faster than by hw (because it's short and avoid all the hw setup), so the suggested approach is probably faster than generic async hmac.
Quoted 7 lines
Quoted 3 lines
Yes. that is exactly what happens in hw - it is much slower. And I do not see any problems as well with finishing it with sw.
I never said that you can't do it in software. I just don't want every driver to write its own copy of hmac in software.
I understand that it is better to have more "generic" approach and not duplicate that. I am not objecting that.
The key point is that we use HW accelerators to get speedup, release CPU for something else and reduce power consumption (if possible and specific hw does it more energy efficiently).
Base on above facts hw drivers need to make certain optimization. And that optimization often does not fit well to the "generic" way.
Like just with import/export.
Problems for hw:
1. To have a good performance with DMA we need to have large buffer. Not just 64 bytes block. state becomes large
2. supporting concurrent requests means switching HW state and it takes a time.
All that burden significantly slowdown hw acceleration and increase CPU load.
I guess my points are understandable.
thanks
Quoted 5 lines
If you're going to do it in software, then let's make an ahash version of hmac.
Cheers,
Herbert Xu
maintainerQuoted 6 lines · Dmitry Kasatkin
Like just with import/export.
Problems for hw:1. To have a good performance with DMA we need to have large buffer. Not just 64 bytes block. state becomes large
Sure. But it shouldn't be up to the driver to merge operations. Higher layers (either the end-user or the crypto API) should perform merging.
We don't put request merging into storage drivers for a reason.
Quoted 2 lines
2. supporting concurrent requests means switching HW state and it takes a time.
Well that's just the way it is. I'm not saying that it's going to occur frequently, but if it does, you need to support it.
Quoted 4 lines
All that burden significantly slowdown hw acceleration and increase CPU load.
I guess my points are understandable.
I understand your concerns, but these are really limitations common to all off-chip acceleration. If you have to write drivers for them, then you'll have to deal with these issues.
Cheers,
Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txtQuoted 5 lines · ext Herbert Xu
Quoted 3 lines · Dmitry Kasatkin
Like just with import/export.
Problems for hw:
Quoted 8 lines
Quoted 3 lines
1. To have a good performance with DMA we need to have large buffer. Not just 64 bytes block. state becomes large
Sure. But it shouldn't be up to the driver to merge operations. Higher layers (either the end-user or the crypto API) should perform merging.
What do you mean by "merge operation".
request merging?
Quoted 21 lines
We don't put request merging into storage drivers for a reason.
Quoted 3 lines
2. supporting concurrent requests means switching HW state and it takes a time.
Well that's just the way it is. I'm not saying that it's going to occur frequently, but if it does, you need to support it.
Quoted 5 lines
All that burden significantly slowdown hw acceleration and increase CPU load.
I guess my points are understandable.
I understand your concerns, but these are really limitations common to all off-chip acceleration. If you have to write drivers for them, then you'll have to deal with these issues.
Cheers,
Herbert Xu
maintainerQuoted 3 lines · Dmitry Kasatkin
What do you mean by "merge operation".
request merging?
By buffering user data, you're in essence merging requests.
I have no objections to doing that, but let's not do it in every driver.
Of course, the ultimate solution is for the end-user to produce requests that do not need merging. So when considering this we need to be aware of what users are being targeted.
Thanks,
Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txtHi,
crypto_ahash_update()crypto_ahash_dinup()crypto_ahash_final()
obviously might need to return -EINPROGRESS
but cancrypto_ahash_init(req)
be synchronous?
Or it could also return EINPROGRESS, though not sense.
- Dmitry
Quoted 16 lines · ext Herbert Xu
Quoted 3 lines · Dmitry Kasatkin
What do you mean by "merge operation".
request merging?By buffering user data, you're in essence merging requests.
I have no objections to doing that, but let's not do it in every driver.
Of course, the ultimate solution is for the end-user to produce requests that do not need merging. So when considering this we need to be aware of what users are being targeted.
Thanks,
Herbert Xu
maintainerQuoted 6 lines · Dmitry Kasatkin
Hi,
crypto_ahash_update()crypto_ahash_dinup()crypto_ahash_final()
Quoted 8 lines
obviously might need to return
-EINPROGRESSbut can
crypto_ahash_init(req)be synchronous?
Or it could also return EINPROGRESS, though not sense.
crypto_ahash_init is allowed to return EINPROGRESS, but it certainly doesn't *have* to be asynchronous. Most hardware implementations should be able to do it synchronously by duplicating a precomputed initial state.
Cheers,
Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt