freebsd-skq/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 Adjust crypto_apply function callbacks for OCF. 2020-06-10 21:18:19 +00:00
cbc_mac.h Adjust crypto_apply function callbacks for OCF. 2020-06-10 21:18:19 +00:00
criov.c crypto(9): add CRYPTO_BUF_VMPAGE 2020-08-26 02:37:42 +00:00
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 Refactor driver and consumer interfaces for OCF (in-kernel crypto). 2020-03-27 18:25:23 +00:00
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 Adjust crypto_apply function callbacks for OCF. 2020-06-10 21:18:19 +00:00
gmac.h Adjust crypto_apply function callbacks for OCF. 2020-06-10 21:18:19 +00:00
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 Improve support for stream ciphers in the software encryption interface. 2020-05-22 16:29:09 +00:00
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 Adjust crypto_apply function callbacks for OCF. 2020-06-10 21:18:19 +00:00
xform_cml.c Various cleanups to the software encryption transform interface. 2020-05-20 21:21:01 +00:00
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 Adjust crypto_apply function callbacks for OCF. 2020-06-10 21:18:19 +00:00
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 Adjust crypto_apply function callbacks for OCF. 2020-06-10 21:18:19 +00:00
xform_poly1305.h Adjust crypto_apply function callbacks for OCF. 2020-06-10 21:18:19 +00:00
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 Adjust crypto_apply function callbacks for OCF. 2020-06-10 21:18:19 +00:00
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 Remove MD5 HMAC from OCF. 2020-05-11 22:08:08 +00:00
xform.h Remove MD5 HMAC from OCF. 2020-05-11 22:08:08 +00:00