Re: [PATCH v7] crypto: zstd - convert to acomp

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

 



On Mon, Jun 16, 2025 at 04:19:44AM +0100, Suman Kumar Chakraborty wrote:
> Convert the implementation to a native acomp interface using zstd
> streaming APIs, eliminating the need for buffer linearization.
> 
> This includes:
>    - Removal of the scomp interface in favor of acomp
>    - Refactoring of stream allocation, initialization, and handling for
>      both compression and decompression using Zstandard streaming APIs
>    - Replacement of crypto_register_scomp() with crypto_register_acomp()
>      for module registration
> 
> Signed-off-by: Suman Kumar Chakraborty <suman.kumar.chakraborty@xxxxxxxxx>
> Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@xxxxxxxxx>
> ---
> v6->v7:
>    - Used __aligned(8) instead of  __attribute__((aligned(8)))
>    - Used mapped address from the walk object instead of sg_virt in
>      zstd_compress_one() and zstd_decompress_one()
> 
> v5->v6:
>    - On x86 (i386), u64 _align only guarantees 4-byte alignment,
>      which causes the test to fail. To ensure consistent 8-byte alignment
>      across all architectures, explicitly specify the alignment using the
>      __aligned(8) attribute.
> 
> v4->v5
>    - Swapping the order of acomp_walk_done_src/dst during
>      decompression for a single flat buffer.
> 
> v3->v4:
>    - Added acomp_walk_done_src/dst calls after completing
>      compression/decompression for a single flat buffer
>    
> v2->v3:
>    - Updated the logic to verify the existence of a single flat
>      buffer using the acomp walk API.
> 
> v1->v2:
>    - Made the wksp address to be 8 byte aligned.
>    - Added logic to use Zstd non streaming APIs for single flat buffer.
> 
>  crypto/zstd.c | 386 ++++++++++++++++++++++++++++++++------------------
>  1 file changed, 249 insertions(+), 137 deletions(-)

Patch applied.  Thanks.
-- 
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