freebsd-src/sys
Mark Johnston 68f6800ce0 opencrypto: Introduce crypto_dispatch_async()
Currently, OpenCrypto consumers can request asynchronous dispatch by
setting a flag in the cryptop.  (Currently only IPSec may do this.)   I
think this is a bit confusing: we (conditionally) set cryptop flags to
request async dispatch, and then crypto_dispatch() immediately examines
those flags to see if the consumer wants async dispatch. The flag names
are also confusing since they don't specify what "async" applies to:
dispatch or completion.

Add a new KPI, crypto_dispatch_async(), rather than encoding the
requested dispatch type in each cryptop. crypto_dispatch_async() falls
back to crypto_dispatch() if the session's driver provides asynchronous
dispatch. Get rid of CRYPTOP_ASYNC() and CRYPTOP_ASYNC_KEEPORDER().

Similarly, add crypto_dispatch_batch() to request processing of a tailq
of cryptops, rather than encoding the scheduling policy using cryptop
flags.  Convert GELI, the only user of this interface (disabled by
default) to use the new interface.

Add CRYPTO_SESS_SYNC(), which can be used by consumers to determine
whether crypto requests will be dispatched synchronously. This is just
a helper macro. Use it instead of looking at cap flags directly.

Fix style in crypto_done(). Also get rid of CRYPTO_RETW_EMPTY() and
just check the relevant queues directly. This could result in some
unnecessary wakeups but I think it's very uncommon to be using more than
one queue per worker in a given workload, so checking all three queues
is a waste of cycles.

Reviewed by:	jhb
Sponsored by:	Ampere Computing
Submitted by:	Klara, Inc.
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D28194
2021-02-08 09:19:19 -05:00
..
amd64 amd64 GENERIC: compile in mlx5en(4) 2021-02-05 03:22:26 +02:00
arm Remove obsolete code gated on _ARM_ARCH_* 2021-01-28 10:41:45 +00:00
arm64 arm64: optimize set_syscall_retval() 2021-02-08 10:46:47 +00:00
bsm Add aio_writev and aio_readv 2021-01-02 19:57:58 -07:00
cam Exclude reserved iSCSI Target Transfer Tag. 2021-01-24 13:58:29 -05:00
cddl arm64: Improve DDB backtrace support 2021-02-01 14:15:57 +00:00
compat epoll: Store epoll_event udata member in ext member of kevent. 2021-02-08 02:46:14 +03:00
conf WITH_OFED build option: fix 2021-02-02 18:44:52 +02:00
contrib ipfilter: Use the softn (NAT softc) host map size in ip_nat6 calculation. 2021-02-05 18:39:38 -08:00
crypto armv8crypto: Extract GCM state into a structure 2021-02-08 09:19:10 -05:00
ddb ddb: add ability to print user registers 2021-01-08 14:53:06 -04:00
dev mrsas: unbreak i386 build 2021-02-05 15:43:48 -03:00
dts Remove DTS files for arm boards we don't support 2021-01-27 10:02:01 +00:00
fs msdosfs: fix vnode leak with msdosfs_rename() 2021-01-31 21:37:44 +00:00
gdb gdb(4): allow bulk write of registers 2020-12-23 14:37:05 -04:00
geom opencrypto: Introduce crypto_dispatch_async() 2021-02-08 09:19:19 -05:00
gnu Remove the old dts imported tree. 2021-01-15 20:09:55 +01:00
i386 Fix a typo. 2021-01-27 21:52:41 -08:00
isa
kern ktls: Make configuration sysctls available as tunables 2021-02-08 09:19:02 -05:00
kgssapi opencrypto: Introduce crypto_dispatch_async() 2021-02-08 09:19:19 -05:00
libkern Revert "Reimplement strlen" 2021-02-03 19:38:10 +00:00
mips mips: fix NLM platforms breakage caused by e0a0a3ef 2021-01-31 23:56:22 -08:00
modules zfs: update zfs_config.h to match OpenZFS gf11b09dec 2021-02-01 22:21:33 +01:00
net Enable multipath routing by default. 2021-02-03 08:49:58 +00:00
net80211 net80211: fix a typo 2020-11-04 12:07:33 +00:00
netgraph netgraph/ng_base: Allow larger BINARY2ASCII conversions 2021-02-08 14:31:58 +01:00
netinet Allow setting alias port ranges in libalias and ipfw. This will allow a system 2021-02-02 13:24:17 -08:00
netinet6 Fix unused-function waring when compiling with FIB_ALGO. 2021-01-30 23:25:56 +00:00
netipsec opencrypto: Introduce crypto_dispatch_async() 2021-02-08 09:19:19 -05:00
netpfil Allow setting alias port ranges in libalias and ipfw. This will allow a system 2021-02-02 13:24:17 -08:00
netsmb
nfs
nfsclient
nfsserver nfs: Mark unused statistics variable as reserved 2020-11-18 04:35:49 +00:00
nlm
ofed Fix mismerge in OFED update 2021-02-04 13:58:24 -05:00
opencrypto opencrypto: Introduce crypto_dispatch_async() 2021-02-08 09:19:19 -05:00
powerpc powerpc64: Fix boot on virtual-mode OF (PowerMac G5) 2021-02-07 16:13:55 -06:00
riscv riscv: add SBI system reset extension 2021-01-27 19:19:54 -04:00
rpc nfs-over-tls: handle res.gid.gid_val correctly for memory allocation 2021-01-12 13:59:52 -08:00
security Convert remaining cap_rights_init users to cap_rights_init_one 2021-01-12 13:16:10 +00:00
sys opencrypto: Introduce crypto_dispatch_async() 2021-02-08 09:19:19 -05:00
teken loader: implement framebuffer console 2021-01-02 21:41:36 +02:00
tests Enable running fib tests inside vnet jail. 2021-01-17 20:32:26 +00:00
tools syscalls.master: Add a new syscall type: RESERVED 2021-01-26 18:27:44 +00:00
ufs Revert 2d4422e799, Eliminate lock order reversal in UFS ffs_unmount(). 2021-01-30 00:03:37 -08:00
vm Add a VM flag to prevent reclaim on a failed contig allocation 2021-02-03 16:16:51 -05:00
x86 x86: use compiler intrinsics for bswap* 2021-02-01 04:53:23 +00:00
xdr
xen xen: remove .swp file from public headers 2021-01-11 18:14:11 +01:00
Makefile