2018-10-15 21:38:49 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2019-04-23 15:18:54 +00:00
|
|
|
rootdir=$(readlink -f $(dirname $0))/../..
|
2018-10-15 21:38:49 +00:00
|
|
|
source "$rootdir/scripts/common.sh"
|
|
|
|
|
2019-04-23 15:11:55 +00:00
|
|
|
# base_bdev will use QAT if available, otherwise AESNI
|
|
|
|
# base_bdev2 will always use AESNI
|
|
|
|
# This makes sure that AESNI always gets tested, even if QAT is available.
|
2018-10-15 21:38:49 +00:00
|
|
|
base_bdev=$1
|
2019-04-23 15:11:55 +00:00
|
|
|
base_bdev2=$2
|
|
|
|
|
|
|
|
echo
|
|
|
|
echo "[crypto]"
|
2018-10-15 21:38:49 +00:00
|
|
|
|
|
|
|
if [ -n $base_bdev ]; then
|
|
|
|
if [ $(lspci -d:37c8 | wc -l) -eq 0 ]; then
|
|
|
|
echo " CRY $base_bdev crypto_ram 0123456789123456 crypto_aesni_mb"
|
|
|
|
else
|
|
|
|
echo " CRY $base_bdev crypto_ram 0123456789123456 crypto_qat"
|
|
|
|
fi
|
|
|
|
fi
|
2019-04-23 15:11:55 +00:00
|
|
|
|
|
|
|
if [ -n $base_bdev2 ]; then
|
|
|
|
echo " CRY $base_bdev2 crypto_ram2 9012345678912345 crypto_aesni_mb"
|
|
|
|
fi
|