Skip to contentSkip to conversation

crypto: AVX and AVX2 version of AESNI-GCM encode and decode

PATCH In review Tim Chen 2 participants 2 messages Dec 11, 2013 – Dec 20, 2013

Subsystems (2)
lore
Share & tools
lore

Tim Chen

author
#0 lore raw

PATCH 1/2 crypto: AVX and AVX2 version of AESNI-GCM encode and decode

We have added AVX and AVX2 routines that optimize AESNI-GCM encode/decode. These routines are optimized for encrypt and decrypt of large buffers. In tests we have seen up to 6% speedup for 1K, 11% speedup for 2K and 18% speedup for 8K buffer over the existing SSE version. These routines should provide even better speedup for future Intel x86_64 cpus.

---
 arch/x86/crypto/Makefile           |    2 +-
 arch/x86/crypto/aesni-intel_avx.S  | 2811 ++++++++++++++++++++++++++++++++++++
 arch/x86/crypto/aesni-intel_glue.c |  143 +-
 3 files changed, 2953 insertions(+), 3 deletions(-)
 create mode 100644 arch/x86/crypto/aesni-intel_avx.S
arch/x86/crypto/Makefile +1 -1
index e0fc24d..84ee1e1 100644
@@ -75,7 +75,7 @@ ifeq ($(avx2_supported),yes)
 	serpent-avx2-y := serpent-avx2-asm_64.o serpent_avx2_glue.o
 endif
 
-aesni-intel-y := aesni-intel_asm.o aesni-intel_glue.o fpu.o
+aesni-intel-y := aesni-intel_asm.o aesni-intel_avx.o aesni-intel_glue.o fpu.o
 ghash-clmulni-intel-y := ghash-clmulni-intel_asm.o ghash-clmulni-intel_glue.o
 sha1-ssse3-y := sha1_ssse3_asm.o sha1_ssse3_glue.o
 crc32c-intel-y := crc32c-intel_glue.o
arch/x86/crypto/aesni-intel_avx.S new file +2811 -0

2,811 lines not on this page · raw message

arch/x86/crypto/aesni-intel_glue.c +141 -2

173 lines not on this page · raw message

Signature · 1 line
1.7.11.7
maintainer
#1 lore raw
Quoted 7 lines · Tim Chen

We have added AVX and AVX2 routines that optimize AESNI-GCM encode/decode. These routines are optimized for encrypt and decrypt of large buffers. In tests we have seen up to 6% speedup for 1K, 11% speedup for 2K and 18% speedup for 8K buffer over the existing SSE version. These routines should provide even better speedup for future Intel x86_64 cpus.

Both patches applied. Thanks!

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt