On (24/06/03 16:34), Herbert Xu wrote: > On Mon, Jun 03, 2024 at 05:28:56PM +0900, Sergey Senozhatsky wrote: > > > > Herbert, I'm not sure I see how tfm sharing is working. > > > > crypto_tfm carries a pointer to __crt_ctx, which e.g. for zstd > > is struct zstd_ctx, where it keeps all the state (zstd_cctx, zstd_dctx, > > and compression/decompression workmem buffers). > > That's the legacy compression interface. You should be looking > at the crypto_acomp interface which handles this properly. Oh, I see, thanks, I didn't know about that, okay now I see what you meant when you said that you'd not add setparams to legacy scomp interface. Alright, so this means 1) zram needs to be converted to acomp interface 2) scomp drivers that zram is using needs to become acomp compatible (for example, I don't think I see acomp support in crypto/zstd.c) 3) zram needs to support setparam 4) zram needs to support tfm sharing, so that setparam can be called once 5) crypto comp drivers need to start support setparam That's quite a bit of work, I should admit.