On Sat, Dec 14, 2024 at 12:37:22PM +0800, Herbert Xu wrote: > On Wed, Dec 11, 2024 at 12:39:13PM +0100, Christian Marangi wrote: > > > > Do you have quick example for this? > > Just search for crypto_ahash_set_reqsize in drivers/crypto and see > how they use the reqctx to store temporary data. For each request, > you're guaranteed to have exclusive ownership of the reqctx. > > If you wish to DMA into the reqctx, search for ahash_request_ctx_dma > to see how you should set it up. > Oh ok I didn't understood you were referring to the request_ctx API thanks. I just pushed v9 with the requested changes done. Now we map DMA only when needed and use local struct instead of kmalloc. kmalloc is only used for blocks. For that GFP_ATOMIC is used. The ALLOCATES_MEMORY was already set in the algo flags. Hope I'm making good progress on this. -- Ansuel