freebsd-dev/sys/opencrypto
Mark Johnston db6b56441e ktls: Avoid wakeups and locking for synchronous callbacks
When performing encryption in software, the KTLS crypto callback always
locks the session to deliver a wakeup.  But, if we're handling the
operation synchronously this is wasted effort and can result in
sleepqueue lock contention on large systems.

Use CRYPTO_SESS_SYNC() to determine whether the operation will be
completed asynchronously or not, and select a callback appropriately.
Avoid locking the session to check for completion if the session handles
requests synchronously.

Reviewed by:	jhb
Sponsored by:	Ampere Computing
Submitted by:	Klara, Inc.
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D28195
2021-02-08 09:19:27 -05:00
..
_cryptodev.h
cbc_mac.c
cbc_mac.h
criov.c
crypto.c opencrypto: Introduce crypto_dispatch_async() 2021-02-08 09:19:19 -05:00
cryptodeflate.c Replace some K&R function definitions with ANSI C. 2020-11-03 22:32:30 +00:00
cryptodev_if.m
cryptodev.c Remove the cloned file descriptors for /dev/crypto. 2020-11-25 00:10:54 +00:00
cryptodev.h opencrypto: Introduce crypto_dispatch_async() 2021-02-08 09:19:19 -05:00
cryptosoft.c Consistently use C99 fixed-width types in the in-kernel crypto code. 2020-11-03 22:27:54 +00:00
deflate.h Consistently use C99 fixed-width types in the in-kernel crypto code. 2020-11-03 22:27:54 +00:00
gfmult.c
gfmult.h
gmac.c
gmac.h
ktls_ocf.c ktls: Avoid wakeups and locking for synchronous callbacks 2021-02-08 09:19:27 -05:00
rmd160.c Consistently use C99 fixed-width types in the in-kernel crypto code. 2020-11-03 22:27:54 +00:00
rmd160.h Consistently use C99 fixed-width types in the in-kernel crypto code. 2020-11-03 22:27:54 +00:00
xform_aes_icm.c
xform_aes_xts.c Include sys/types.h here 2020-09-15 15:21:29 +00:00
xform_auth.h Consistently use C99 fixed-width types in the in-kernel crypto code. 2020-11-03 22:27:54 +00:00
xform_cbc_mac.c
xform_cml.c
xform_comp.h Consistently use C99 fixed-width types in the in-kernel crypto code. 2020-11-03 22:27:54 +00:00
xform_deflate.c Replace some K&R function definitions with ANSI C. 2020-11-03 22:32:30 +00:00
xform_enc.h Consistently use C99 fixed-width types in the in-kernel crypto code. 2020-11-03 22:27:54 +00:00
xform_gmac.c
xform_null.c Consistently use C99 fixed-width types in the in-kernel crypto code. 2020-11-03 22:27:54 +00:00
xform_poly1305.c
xform_poly1305.h
xform_rijndael.c Consistently use C99 fixed-width types in the in-kernel crypto code. 2020-11-03 22:27:54 +00:00
xform_rmd160.c
xform_sha1.c Consistently use C99 fixed-width types in the in-kernel crypto code. 2020-11-03 22:27:54 +00:00
xform_sha2.c Consistently use C99 fixed-width types in the in-kernel crypto code. 2020-11-03 22:27:54 +00:00
xform.c
xform.h