cvs commit: src/sys/opencrypto crypto.c cryptodev.h

Pawel Jakub Dawidek pjd at
Wed May 17 11:19:02 PDT 2006

On Wed, May 17, 2006 at 06:12:44PM +0000, Pawel Jakub Dawidek wrote:
+> pjd         2006-05-17 18:12:44 UTC
+>   FreeBSD src repository
+>   Modified files:
+>     sys/opencrypto       crypto.c cryptodev.h 
+>   Log:
+>   - Make opencrypto more SMP friendly by dropping the queue lock around
+>     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

Forgot to add:

	Tested on:	hifn(4), ubsec(4), cryptosoft

Pawel Jakub Dawidek             
pjd at                 
FreeBSD committer                         Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url :

More information about the cvs-src mailing list