NetBSD/sys/netipsec
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
..
ah_var.h
ah.h
esp_var.h
esp.h
files.netipsec
ipcomp_var.h Add some statistics for case where compression is not useful 2007-12-29 14:56:35 +00:00
ipcomp.h
ipip_var.h
ipsec6.h
ipsec_input.c
ipsec_mbuf.c - Remove remain <= MHLEN restriction in m_makespace() 2007-12-14 20:55:22 +00:00
ipsec_netbsd.c
ipsec_osdep.h Now that __HAVE_TIMECOUNTER and __HAVE_GENERIC_TODR are invariants, 2008-01-20 18:09:03 +00:00
ipsec_output.c Fix the ipsec processing in case of USE rules with no SA installed. 2007-12-29 16:43:17 +00:00
ipsec_var.h
ipsec.c Simplify the FAST_IPSEC output path 2007-12-29 14:53:24 +00:00
ipsec.h Simplify the FAST_IPSEC output path 2007-12-29 14:53:24 +00:00
key_debug.c
key_debug.h
key_var.h
key.c Let this code compile. 2007-12-07 19:44:38 +00:00
key.h
keydb.h
keysock.c
keysock.h
Makefile
xform_ah.c Rework opencrypto to use a spin mutex (crypto_mtx) instead of "splcrypto" 2008-02-04 00:35:34 +00:00
xform_esp.c Rework opencrypto to use a spin mutex (crypto_mtx) instead of "splcrypto" 2008-02-04 00:35:34 +00:00
xform_ipcomp.c Rework opencrypto to use a spin mutex (crypto_mtx) instead of "splcrypto" 2008-02-04 00:35:34 +00:00
xform_ipip.c Use struct initializers. No functional change. 2007-12-07 19:46:18 +00:00
xform_tcp.c use __KERNEL_RCSID() 2007-12-11 12:40:10 +00:00
xform.h