freebsd-dev/sys/opencrypto
Mark Johnston 98d788c867 opencrypto: Fix assignment of crypto completions to worker threads
Since r336439 we simply take the session pointer value mod the number of
worker threads (ncpu by default).  On small systems this ends up
funneling all completion work through a single thread, which becomes a
bottleneck when processing IPSec traffic using hardware crypto drivers.
(Software drivers such as aesni(4) are unaffected since they invoke
completion handlers synchonously.)

Instead, maintain an incrementing counter with a unique value per
session, and use that to distribute work to completion threads.

Reviewed by:	cem, jhb
MFC after:	2 weeks
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D28159
2021-01-19 20:34:35 -05:00
..
_cryptodev.h
cbc_mac.c
cbc_mac.h
criov.c
crypto.c
cryptodeflate.c
cryptodev_if.m
cryptodev.c
cryptodev.h
cryptosoft.c
deflate.h
gfmult.c
gfmult.h
gmac.c
gmac.h
ktls_ocf.c
rmd160.c
rmd160.h
xform_aes_icm.c
xform_aes_xts.c
xform_auth.h
xform_cbc_mac.c
xform_cml.c
xform_comp.h
xform_deflate.c
xform_enc.h
xform_gmac.c
xform_null.c
xform_poly1305.c
xform_poly1305.h
xform_rijndael.c
xform_rmd160.c
xform_sha1.c
xform_sha2.c
xform.c
xform.h