From 1cfb849eefbc0984508b70ef1141092ad15d0431 Mon Sep 17 00:00:00 2001 From: Mikko Ylinen Date: Thu, 6 Aug 2020 09:37:28 +0300 Subject: [PATCH] qat: update QAT software stack Signed-off-by: Mikko Ylinen --- build/docker/intel-qat-plugin.Dockerfile | 2 +- cmd/qat_plugin/README.md | 2 +- demo/openssl-qat-engine/Dockerfile | 31 ++++++++++++++++++------ 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/build/docker/intel-qat-plugin.Dockerfile b/build/docker/intel-qat-plugin.Dockerfile index 3aa998fa..6daa1ae7 100644 --- a/build/docker/intel-qat-plugin.Dockerfile +++ b/build/docker/intel-qat-plugin.Dockerfile @@ -30,7 +30,7 @@ RUN mkdir /install_root \ --no-boot-update \ && rm -rf /install_root/var/lib/swupd/* -ARG QAT_DRIVER_RELEASE="qat1.7.l.4.8.0-00005" +ARG QAT_DRIVER_RELEASE="qat1.7.l.4.10.0-00014" RUN test -z "${TAGS_KERNELDRV}" \ || ( swupd bundle-add wget c-basic \ diff --git a/cmd/qat_plugin/README.md b/cmd/qat_plugin/README.md index f1cdb4e0..2a418ecf 100644 --- a/cmd/qat_plugin/README.md +++ b/cmd/qat_plugin/README.md @@ -162,7 +162,7 @@ $ make intel-qat-plugin Successfully tagged intel/intel-qat-plugin:devel ``` -> **Note**: `kerneldrv` mode is excluded from the build by default. Add `BUILDTAGS=kerneldrv` to `make` +> **Note**: `kerneldrv` mode is excluded from the build by default. Add `EXTRA_BUILD_ARGS="--build-arg TAGS_KERNELDRV=kerneldrv"` to `make` > to get `kerneldrv` functionality added to the build. ### Deploy the DaemonSet diff --git a/demo/openssl-qat-engine/Dockerfile b/demo/openssl-qat-engine/Dockerfile index be0618aa..bf3daa07 100644 --- a/demo/openssl-qat-engine/Dockerfile +++ b/demo/openssl-qat-engine/Dockerfile @@ -2,13 +2,14 @@ ARG FINAL_BASE_IMAGE=clearlinux:base FROM clearlinux:base as builder -ARG QAT_DRIVER_RELEASE="qat1.7.l.4.9.0-00008" -ARG QAT_ENGINE_VERSION="v0.5.44" -ARG QAT_ENGINE_FLAGS="--disable-multibuff-offload" +ARG QAT_DRIVER_RELEASE="qat1.7.l.4.10.0-00014" +ARG QAT_ENGINE_VERSION="v0.5.46" +ARG IPSEC_MB_VERSION="v0.54" RUN swupd bundle-add --skip-diskspace-check devpkg-systemd devpkg-openssl c-basic wget git && \ git clone -b $QAT_ENGINE_VERSION https://github.com/intel/QAT_Engine && \ git clone https://github.com/intel/ipp-crypto && \ + git clone -b $IPSEC_MB_VERSION https://github.com/intel/intel-ipsec-mb && \ wget https://01.org/sites/default/files/downloads/$QAT_DRIVER_RELEASE.tar.gz && \ tar xf *.tar.gz @@ -19,7 +20,6 @@ RUN sed -i -e 's/cmn_ko$//' -e 's/lac_kernel$//' quickassist/Makefile && \ install -m 755 build/libusdm_drv_s.so /usr/lib/ && \ install -m 755 build/adf_ctl /usr/bin/ && \ cd /ipp-crypto/sources/ippcp/crypto_mb && \ - sed -i -e '/OPENSSL_USE_STATIC_LIBS/d' CMakeLists.txt && \ cmake . -B"../build" \ -DOPENSSL_INCLUDE_DIR=/usr/include/openssl \ -DOPENSSL_LIBRARIES=/usr/lib64 \ @@ -28,15 +28,27 @@ RUN sed -i -e 's/cmn_ko$//' -e 's/lac_kernel$//' quickassist/Makefile && \ make crypto_mb && make install && \ install -m 755 bin/vfy_ifma_cp_rsa_mb /usr/bin/ && \ install -m 755 bin/vfy_ifma_rsa_mb /usr/bin/ && \ - cd /QAT_Engine && \ + cd /intel-ipsec-mb && \ + make && make install LIB_INSTALL_DIR=/usr/lib64 + +RUN cd /QAT_Engine && \ ./autogen.sh && \ ./configure \ - $QAT_ENGINE_FLAGS \ + --enable-ipsec_offload \ + --enable-multibuff_offload \ + --with-openssl_install_dir=/usr/lib64 \ + --with-multibuff_install_dir=/usr/local \ + --enable-openssl_install_build_arch_path && \ + sed -i -e 's:^\(const char \*engine_qat_id = \).*:\1"avx512";:' e_qat.c && \ + make && make install && \ + mv /usr/lib64/engines-1.1/qat.so /usr/lib64/engines-1.1/avx512.so && \ + make clean && git restore e_qat.c && \ + ./configure \ --with-qat_dir=/ \ + --disable-ipsec_offload \ + --disable-multibuff_offload \ --with-openssl_install_dir=/usr/lib64 \ --with-qat_install_dir=/usr/lib \ - --with-multibuff_dir=/ipp-crypto/sources/ippcp/crypto_mb \ - --with-multibuff_install_dir=/usr/local/lib \ --enable-openssl_install_build_arch_path && \ make && make install @@ -44,10 +56,13 @@ FROM $FINAL_BASE_IMAGE COPY --from=builder /usr/lib/libqat_s.so /usr/lib/ COPY --from=builder /usr/lib/libusdm_drv_s.so /usr/lib/ +COPY --from=builder /usr/lib64/libIPSec_MB.so.0 /usr/lib64/ COPY --from=builder /usr/bin/adf_ctl /usr/bin COPY --from=builder /usr/bin/vfy_ifma_cp_rsa_mb /usr/bin COPY --from=builder /usr/bin/vfy_ifma_rsa_mb /usr/bin +COPY --from=builder /usr/lib64/engines-1.1/avx512.so /usr/lib64/engines-1.1/avx512.so COPY --from=builder /usr/lib64/engines-1.1/qat.so /usr/lib64/engines-1.1/qat.so COPY --from=builder /LICENSE.GPL /usr/share/package-licenses/libqat/LICENSE.GPL COPY --from=builder /QAT_Engine/LICENSE /usr/share/package-licenses/QAT_Engine/LICENSE COPY --from=builder /ipp-crypto/LICENSE /usr/share/package-licenses/ipp-crypto/LICENSE +COPY --from=builder /intel-ipsec-mb/LICENSE /usr/share/package-licenses/intel-ipsec-mb/LICENSE