path: root/sys/sys
diff options
authorMark Johnston <markj@FreeBSD.org>2021-02-08 14:19:19 +0000
committerMark Johnston <markj@FreeBSD.org>2021-02-08 14:19:19 +0000
commit68f6800ce05c386ff045b4416d8595d09c4d8fdd (patch)
tree3bbac508acda51d8f5677fbb894bc7c74f8a76e0 /sys/sys
parent7509b677b413b9551c15b483ec2ed9ce655d2455 (diff)
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
Diffstat (limited to 'sys/sys')
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/sys/param.h b/sys/sys/param.h
index d6f1eb21dcd2..058aef99e077 100644
--- a/sys/sys/param.h
+++ b/sys/sys/param.h
@@ -60,7 +60,7 @@
* in the range 5 to 9.
#undef __FreeBSD_version
-#define __FreeBSD_version 1400003 /* Master, propagated to newvers */
+#define __FreeBSD_version 1400004 /* Master, propagated to newvers */
* __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,