Whamcloud - gitweb
LU-17138 enc: prefer specific crypto engines 77/52477/4
authorSebastien Buisson <sbuisson@ddn.com>
Fri, 22 Sep 2023 16:19:34 +0000 (18:19 +0200)
committerOleg Drokin <green@whamcloud.com>
Wed, 25 Oct 2023 18:07:35 +0000 (18:07 +0000)
commit056eb9dcc0d5f80451c400342d54037f6de24bd9
tree2eefb35ddede0d81c3855149d92085f6cd23eb00
parent8d828762d18ffaa2945bde56039127d0e75aceb3
LU-17138 enc: prefer specific crypto engines

Some ciphers provided by external accelerators might register under
the generic cipher name. To avoid using them with Lustre, prefer the
AES-NI variant implemented directly in the CPU. And fallback to the
generic cipher if AES-NI is not available.

Introduce a new libcfs kernel module parameter named
'client_encryption_engine' to give the ability to choose the cipher.
By default its value is 'aes-ni', which makes Lustre look for the
AES-NI cipher first. This parameter can be set to 'system-default'
whic makes Lustre pick the generic cipher.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I8b00f1c3c8dcf11c58e9f40a410b57b2f255e642
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52477
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: Shuichi Ihara <sihara@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
libcfs/libcfs/crypto/crypto.c
libcfs/libcfs/crypto/keysetup.c
libcfs/libcfs/crypto/llcrypt_private.h
libcfs/libcfs/module.c