chcr_ktls: use AES library for single use cipher
authorArd Biesheuvel <ardb@kernel.org>
Fri, 11 Dec 2020 12:27:14 +0000 (13:27 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 2 Jan 2021 21:41:35 +0000 (08:41 +1100)
commita3b01ffddc210a836eda8aa751cfa911a2817a85
treed066d0c5ef2f6725c0b83d863e0f940807d80193
parentbbfd06c7c85ec6dfae4a77b27495db8b8bcdfc8c
chcr_ktls: use AES library for single use cipher

Allocating a cipher via the crypto API only to free it again after using
it to encrypt a single block is unnecessary in cases where the algorithm
is known at compile time. So replace this pattern with a call to the AES
library.

Cc: Ayush Sawal <ayush.sawal@chelsio.com>
Cc: Vinay Kumar Yadav <vinay.yadav@chelsio.com>
Cc: Rohit Maheshwari <rohitm@chelsio.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/net/ethernet/chelsio/inline_crypto/Kconfig
drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c