Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/sys



Module Name:    src
Committed By:   tls
Date:           Mon Feb  4 00:35:35 UTC 2008

Modified Files:
        src/sys/netipsec: xform_ah.c xform_esp.c xform_ipcomp.c
        src/sys/opencrypto: crypto.c cryptodev.c cryptodev.h cryptosoft.c
            cryptosoft_xform.c files.opencrypto

Log Message:
Rework opencrypto to use a spin mutex (crypto_mtx) instead of "splcrypto"
(actually splnet) and condvars instead of tsleep/wakeup.  Fix a few
miscellaneous problems and add some debugging printfs while there.

Restore set of CRYPTO_F_DONE in crypto_done() which was lost at some
point after this code came from FreeBSD -- it made it impossible to wait
properly for a condition.

Add flags analogous to the "crp" flags to the key operation's krp struct.
Add a new flag, CRYPTO_F_ONRETQ which tells us a request finished before
the kthread had a chance to dequeue it and call its callback -- this was
letting requests stick on the queues before even though done and copied
out.

Callers of crypto_newsession() or crypto_freesession() must now take the
mutex.  Change netipsec to do so.  Dispatch takes the mutex itself as
needed.

This was tested fairly extensively with the cryptosoft backend and lightly
with a new hardware driver.  It has not been tested with FAST_IPSEC; I am
unable to ascertain whether FAST_IPSEC currently works at all in our tree.

pjd%FreeBSD.ORG@localhost, ad%NetBSD.ORG@localhost, and 
darran%snark.us@localhost pointed me in the
right direction several times in the course of this.  Remaining bugs
are mine alone.


To generate a diff of this commit:
cvs rdiff -r1.19 -r1.20 src/sys/netipsec/xform_ah.c
cvs rdiff -r1.16 -r1.17 src/sys/netipsec/xform_esp.c \
    src/sys/netipsec/xform_ipcomp.c
cvs rdiff -r1.22 -r1.23 src/sys/opencrypto/crypto.c
cvs rdiff -r1.32 -r1.33 src/sys/opencrypto/cryptodev.c
cvs rdiff -r1.11 -r1.12 src/sys/opencrypto/cryptodev.h
cvs rdiff -r1.19 -r1.20 src/sys/opencrypto/cryptosoft.c
cvs rdiff -r1.7 -r1.8 src/sys/opencrypto/cryptosoft_xform.c
cvs rdiff -r1.18 -r1.19 src/sys/opencrypto/files.opencrypto

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index