Hi I was reading into crypto engine APIs from the kernel documentation as well as other crypto drivers using them, for their proper usage. I found some seemingly contradictory stuff from both sources. [1] says the following: > You must put, at the start of your transform context your_tfm_ctx, the structure crypto_engine: whereas, in already existing implementations inside the kernel I found them not using the same. Eg.: [2]> > struct rk_crypto_info { > struct list_head list; > struct device *dev; > [...] > struct crypto_engine *engine; > [...] > }; and [3] > struct starfive_cryp_dev { > struct list_head list; > struct device *dev; > [...] > struct crypto_engine *engine; > [...] > }; In both these drivers, this is the only struct where crypt_engine object is included. Another thing I found intriguing is that [1] specifies to put the crypto engine struct object in the tfm_ctx structure, which doesn't make sense to me as it is a per tfm object. Now, I have not explored the internal workings of the crypto_engine API completely, but it makes logical sense to me that the queue provided by the engine should be for across all the tfms. Which makes its inclusion in the device struct in [2] and [3] as above intuitive to me. I have looked for any recent changes in either the doc or crypto_engine API to see if any such scenario caused a mismatch here, found probable commit [4] after which the docs are probably not updated. [5] also seems to remove all prepare/unprepare functions but these are still in [1]. I would be glad if I am guided for the correct usage of the crypto_engine API. And, probably, also if the documentation is corrected. Thanks and regards T Pratham <t-pratham@xxxxxx> --- [1] Docs - Crypto Engine: https://github.com/torvalds/linux/blob/master/Documentation/crypto/crypto_engine.rst [2] Rockchip rk3288 crypto driver: https://github.com/torvalds/linux/blob/master/drivers/crypto/rockchip/rk3288_crypto.h [3] Starfive jh7110 crypto driver: https://github.com/torvalds/linux/blob/master/drivers/crypto/starfive/jh7110-cryp.h [4] https://github.com/torvalds/linux/commit/e5e7eb023f24653b07329162b6359283b3a03a20 [5] https://lore.kernel.org/all/ZNh94a7YYnvx0l8C@xxxxxxxxxxxxxxxxxxx/