freebsd-dev/sys/crypto/aesni
Matt Macy ff2038a9bf Generalize AES iov optimization
Right now, aesni_cipher_alloc does a bit of special-casing
for CRYPTO_F_IOV, to not do any allocation if the first uio
is large enough for the requested size. While working on ZFS
crypto port, I ran into horrible performance because the code
uses scatter-gather, and many of the times the data to encrypt
was in the second entry. This code looks through the list, and
tries to see if there is a single uio that can contain the
requested data, and, if so, uses that.

This has a slight impact on the current consumers, in that the
check is a little more complicated for the ones that use
CRYPTO_F_IOV -- but none of them meet the criteria for testing
more than one.

Submitted by:	sef at ixsystems.com
Reviewed by:	cem@
MFC after:	3 days
Sponsored by:	iX Systems
Differential Revision:	https://reviews.freebsd.org/D18522
2018-12-13 04:40:53 +00:00
..
aesencdec.h unroll the loop slightly... This improves performance enough to 2015-07-07 20:31:09 +00:00
aeskeys_amd64.S
aeskeys_i386.S
aesni_ghash.c aesni: quiet -Wcast-qual 2017-08-16 22:54:35 +00:00
aesni_os.h In the version of gcc in the FreeBSD tree, this modification was made to 2015-04-16 17:42:52 +00:00
aesni_wrap.c aesni: quiet -Wcast-qual 2017-08-16 22:54:35 +00:00
aesni.c Generalize AES iov optimization 2018-12-13 04:40:53 +00:00
aesni.h OpenCrypto: Convert sessions to opaque handles instead of integers 2018-07-18 00:56:25 +00:00
intel_sha1.c aesni(4): Fix GCC build 2017-09-29 19:56:09 +00:00
intel_sha256.c aesni(4): Fix GCC build 2017-09-29 19:56:09 +00:00
sha_sse.h aesni(4): Add support for x86 SHA intrinsics 2017-09-26 23:12:32 +00:00