Re: [PATCH 8/9] crypto: qat - expose deflate through acomp api for QAT GEN2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 26, 2022 at 03:21:15PM +0100, Giovanni Cabiddu wrote:
>
> It would be nice if the user of the api could provide a hint for the
> size of the destination buffer in acomp_req.dlen.

The whole point of this is that the user has no idea how big
the result will be.  If anyone would have a clue, it would be
whoever is doing the decompression.

Ideally the hardware would take an SG list, dump whatever result
that fits into it, and then stop the decompression, dump the
interim state somewhere so that it can be resumed, ask for memory
from the driver, and then resume the decompression.

I understand that hardware already exists that cannot perform
such an incremental process.  In that case we should hide this
inadequacy in the driver.

Here's a suggestion.  Start with whatever value you want (e.g.,
src * 2), attempt the decompression, if it fails because the
space is to small, then double it and retry the operation.

Cheers,
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux