]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
crypto: vmx - Increase priority of aes-cbc cipher
authorAnton Blanchard <anton@samba.org>
Fri, 10 Jun 2016 06:47:03 +0000 (16:47 +1000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 13 Jun 2016 09:43:05 +0000 (17:43 +0800)
commit12d3f49e1ffbbf8cbbb60acae5a21103c5c841ac
tree2cae86e6e2696aaf93088b69aca28bf870b9932a
parent975f57fdff1d0eb9816806cabd27162a8a1a4038
crypto: vmx - Increase priority of aes-cbc cipher

All of the VMX AES ciphers (AES, AES-CBC and AES-CTR) are set at
priority 1000. Unfortunately this means we never use AES-CBC and
AES-CTR, because the base AES-CBC cipher that is implemented on
top of AES inherits its priority.

To fix this, AES-CBC and AES-CTR have to be a higher priority. Set
them to 2000.

Testing on a POWER8 with:

cryptsetup benchmark --cipher aes --key-size 256

Shows decryption speed increase from 402.4 MB/s to 3069.2 MB/s,
over 7x faster. Thanks to Mike Strosaker for helping me debug
this issue.

Fixes: 8c755ace357c ("crypto: vmx - Adding CBC routines for VMX module")
Cc: stable@vger.kernel.org
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/vmx/aes_cbc.c
drivers/crypto/vmx/aes_ctr.c