Appendix C QAT_speed.sh
27
APPENDIX C QAT_SPEED.SH
#yum install -y git
#########################################
###
### download and build openssl 1.1.0e
###
#########################################
Test_Dir=/root/ssl_speed
cd $Test_Dir
git clone https://github.com/openssl/openssl.git
cd openssl
#git tag
git checkout OpenSSL_1_1_0e
git describe --tag
./config --prefix=/usr/local/ssl
make depend
make
make install
#########################################
###
### download and build QAT Engine patch
###
#########################################
cd $Test_Dir/openssl
git clone https://github.com/01org/QAT_Engine.git
export OPENSSL_ENGINES=/usr/local/ssl/lib/engines-1.1
#make sure usdm_drv is installed
insmod /opt/APP/driver/QAT/quickassist/utilities/libusdm_drv/usdm_drv.ko
cd $Test_Dir/openssl/QAT_Engine
./autogen.sh
./configure \
--with-qat_dir=/opt/APP/driver/QAT \
--with-openssl_dir=$Test_Dir/openssl \
--with-openssl_install_dir=/usr/local/ssl \
--enable-upstream_driver \
--enable-usdm \
--disable-qat_lenstra_protection
make
make install
######################################################
###
### Copy conf file and change the LimitDevAccess to 0
###
######################################################
cp $Test_Dir/openssl/QAT_Engine/qat/config/c6xx/multi_process_optimized/* $Test_Dir/
cd $Test_Dir
sed -e 's/LimitDevAccess = 1/LimitDevAccess = 0/g' ./c6xx_dev0.conf > /etc/c6xx_dev0.conf
echo "modify c6xx_dev0.conf"
sed -e 's/LimitDevAccess = 1/LimitDevAccess = 0/g' ./c6xx_dev1.conf > /etc/c6xx_dev1.conf
echo "modify c6xx_dev1.conf"
sed -e 's/LimitDevAccess = 1/LimitDevAccess = 0/g' ./c6xx_dev2.conf > /etc/c6xx_dev2.conf
echo "modify c6xx_dev1.conf"
##Restart qat service
echo "Restart qat service"
service qat_service restart
export LD_LIBRARY_PATH=$PATH:/usr/local/ssl/lib