Module Name: src Committed By: riastradh Date: Thu May 19 20:51:46 UTC 2022
Modified Files: src/sys/opencrypto: crypto.c cryptodev.c cryptodev.h Log Message: opencrypto: Nix CRYPTO_F_USER, CRYPTO_F_CBIMM, CRYPTO_F_CBIFSYNC. CRYPTO_F_USER is no longer needed. It was introduced in 2008 by darran@ in crypto.c 1.30, cryptodev.c 1.45 in an attempt to avoid double-free between the issuing thread and asynchronous callback. But the `fix' didn't work. In 2017, knakahara@ fixed it properly in cryptodev.c 1.87 by distinguishing `the crypto operation has completed' (CRYPTO_F_DONE) from `the callback is done touching the crp object' (CRYPTO_F_DQRETQ, now renamed to CRYPTODEV_F_RET). CRYPTO_F_CBIMM formerly served to invoke the callback synchronously from the driver's interrupt completion routine, to reduce contention on what was once a single cryptoret thread. Now, there is a per-CPU queue and softint for much cheaper processing, so there is less motivation for this in the first place. So let's remove the complicated logic. This means the callbacks never run in hard interrupt context, which means we don't need to worry about recursion into crypto_dispatch in hard interrupt context. To generate a diff of this commit: cvs rdiff -u -r1.117 -r1.118 src/sys/opencrypto/crypto.c cvs rdiff -u -r1.112 -r1.113 src/sys/opencrypto/cryptodev.c cvs rdiff -u -r1.42 -r1.43 src/sys/opencrypto/cryptodev.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.