Retire asynchronous crypto API as it is no longer required by any driver and
authortobhe <tobhe@openbsd.org>
Sat, 23 Oct 2021 15:42:34 +0000 (15:42 +0000)
committertobhe <tobhe@openbsd.org>
Sat, 23 Oct 2021 15:42:34 +0000 (15:42 +0000)
commit12758001eea79d5f2b115d4e7ba0b79157cb969e
tree4a6f220cd70aac064d1ebea2113d0c0784137cde
parent07fa46780d1dc8f106664c8669ba23101f10acce
Retire asynchronous crypto API as it is no longer required by any driver and
adds unnecessary complexity.  Dedicated crypto offloading devices are not common
anymore.  Modern CPU crypto acceleration works synchronously, eliminating the need
for callbacks.

Replace all occurrences of crypto_dispatch() with crypto_invoke(), which is
blocking and only returns after the operation has completed or an error occured.
Invoke callback functions directly from the consumer (e.g. IPsec, softraid)
instead of relying on the crypto driver to call crypto_done().

ok bluhm@ mvs@ patrick@
17 files changed:
sys/arch/amd64/amd64/aesni.c
sys/arch/amd64/amd64/via.c
sys/arch/arm64/arm64/cryptox.c
sys/arch/i386/i386/via.c
sys/arch/i386/pci/glxsb.c
sys/arch/octeon/dev/octcrypto.c
sys/crypto/crypto.c
sys/crypto/cryptodev.h
sys/crypto/cryptosoft.c
sys/dev/softraid_crypto.c
sys/dev/softraid_raid1c.c
sys/netinet/ip_ah.c
sys/netinet/ip_esp.c
sys/netinet/ip_ipcomp.c
sys/netinet/ip_ipsp.h
sys/netinet/ipsec_input.c
sys/netinet/ipsec_output.c