NetBSD/sys/opencrypto/files.opencrypto
tls e5bd2a127e 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, ad@NetBSD.ORG, and darran@snark.us pointed me in the
right direction several times in the course of this.  Remaining bugs
are mine alone.
2008-02-04 00:35:34 +00:00

28 lines
872 B
Plaintext

# $NetBSD: files.opencrypto,v 1.19 2008/02/04 00:35:35 tls Exp $
#
#
# Opencrypto framework.
# Devices that provide crypto transforms via opencrypto, or subsystems
# that use the opencrypto framework, should list opencrypto as a dependency
# to pull in the framework.
define opencrypto
file opencrypto/criov.c opencrypto
file opencrypto/xform.c opencrypto
file opencrypto/crypto.c opencrypto
# Pseudo-device that provides software implementations of various cryptographic
# algorithms.
defpseudo swcrypto: opencrypto,
blowfish, des, cast128, rijndael, skipjack
file opencrypto/cryptosoft.c swcrypto
file opencrypto/deflate.c swcrypto # wrapper around zlib
# Pseudo-device for userspace access to opencrypto
# (and thus crypto hardware accelerators).
defpseudo crypto: opencrypto
file opencrypto/cryptodev.c crypto
defflag opt_ocf.h CRYPTO_DEBUG CRYPTO_TIMING