freebsd-dev/sys/kgssapi
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
..
krb5 opencrypto: Introduce crypto_dispatch_async() 2021-02-08 09:19:19 -05:00
gss_accept_sec_context.c
gss_acquire_cred.c
gss_add_oid_set_member.c
gss_canonicalize_name.c kgssapi: clean up empty lines in .c and .h files 2020-09-01 22:15:02 +00:00
gss_create_empty_oid_set.c sys/kgssapi: general adoption of SPDX licensing ID tags. 2017-11-27 15:49:00 +00:00
gss_delete_sec_context.c kgssapi: clean up empty lines in .c and .h files 2020-09-01 22:15:02 +00:00
gss_display_status.c kgssapi: clean up empty lines in .c and .h files 2020-09-01 22:15:02 +00:00
gss_export_name.c
gss_get_mic.c kgssapi: clean up empty lines in .c and .h files 2020-09-01 22:15:02 +00:00
gss_impl.c State kgssapi dependency on xdr. 2020-09-17 22:29:38 +00:00
gss_import_name.c kgssapi: clean up empty lines in .c and .h files 2020-09-01 22:15:02 +00:00
gss_init_sec_context.c
gss_names.c kgssapi: clean up empty lines in .c and .h files 2020-09-01 22:15:02 +00:00
gss_pname_to_uid.c
gss_release_buffer.c kgssapi: clean up empty lines in .c and .h files 2020-09-01 22:15:02 +00:00
gss_release_cred.c sys/kgssapi: general adoption of SPDX licensing ID tags. 2017-11-27 15:49:00 +00:00
gss_release_name.c kgssapi: clean up empty lines in .c and .h files 2020-09-01 22:15:02 +00:00
gss_release_oid_set.c
gss_set_cred_option.c
gss_test_oid_set_member.c
gss_unwrap.c kgssapi: clean up empty lines in .c and .h files 2020-09-01 22:15:02 +00:00
gss_verify_mic.c kgssapi: clean up empty lines in .c and .h files 2020-09-01 22:15:02 +00:00
gss_wrap_size_limit.c
gss_wrap.c sys/kgssapi: general adoption of SPDX licensing ID tags. 2017-11-27 15:49:00 +00:00
gssapi_impl.h
gssapi.h kgssapi: clean up empty lines in .c and .h files 2020-09-01 22:15:02 +00:00
gssd_prot.c
gssd.x
gsstest.c kgssapi: clean up empty lines in .c and .h files 2020-09-01 22:15:02 +00:00
kgss_if.m