4acae0ac29
crypto_invoke(). This allows to serve multiple crypto requests in parallel and not bached requests are served lock-less. Drivers should not depend on the queue lock beeing held around crypto_invoke() and if they do, that's an error in the driver - it should do its own synchronization. - Don't forget to wakeup the crypto thread when new requests is queued and only if both symmetric and asymmetric queues are empty. - Symmetric requests use sessions and there is no way driver can disappear when there is an active session, so we don't need to check this, but assert this. This is also safe to not use the driver lock in this case. - Assymetric requests don't use sessions, so don't check the driver in crypto_kinvoke(). - Protect assymetric operation with the driver lock, because if there is no symmetric session, driver can disappear. - Don't send assymetric request to the driver if it is marked as blocked. - Add an XXX comment, because I don't think migration to another driver is safe when there are pending requests using freed session. - Remove 'hint' argument from crypto_kinvoke(), as it serves no purpose. - Don't hold the driver lock around kprocess method call, instead use cc_koperations to track number of in-progress requests. - Cleanup register/unregister code a bit. - Other small simplifications and cleanups. Reviewed by: sam |
||
---|---|---|
.. | ||
cast.c | ||
cast.h | ||
castsb.h | ||
criov.c | ||
crypto_if.m | ||
crypto.c | ||
cryptodev.c | ||
cryptodev.h | ||
cryptosoft.c | ||
cryptosoft.h | ||
deflate.c | ||
deflate.h | ||
rmd160.c | ||
rmd160.h | ||
skipjack.c | ||
skipjack.h | ||
xform.c | ||
xform.h |