Whamcloud - gitweb
LU-17138 enc: prefer specific crypto engines
authorSebastien Buisson <sbuisson@ddn.com>
Fri, 22 Sep 2023 16:19:34 +0000 (18:19 +0200)
committerAndreas Dilger <adilger@whamcloud.com>
Fri, 27 Oct 2023 21:49:49 +0000 (21:49 +0000)
commitcd8b08b85eae8c25011aa535a9b0b08e6b6b1682
tree947f0cb1f951df9e2e6e2cb70f3cead34f48e7fd
parentc398e8e51e0576dabbc8d735390a6f021ae8512b
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.

Lustre-change: https://review.whamcloud.com/52477
Lustre-commit: 056eb9dcc0d5f80451c400342d54037f6de24bd9

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I8b00f1c3c8dcf11c58e9f40a410b57b2f255e642
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/52828
Tested-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
libcfs/libcfs/crypto/crypto.c
libcfs/libcfs/crypto/keysetup.c
libcfs/libcfs/crypto/llcrypt_private.h
libcfs/libcfs/module.c