From 7af23f1f70675c8f70b884f4e033b3910968fc8a Mon Sep 17 00:00:00 2001 From: Hyeongju Johannes Lee Date: Thu, 17 Oct 2024 12:53:46 -0700 Subject: [PATCH] QAT: add testapp of qatengine Signed-off-by: Hyeongju Johannes Lee --- demo/openssl-qat-engine/Dockerfile | 34 ++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/demo/openssl-qat-engine/Dockerfile b/demo/openssl-qat-engine/Dockerfile index 6cda0a4c..985cb931 100644 --- a/demo/openssl-qat-engine/Dockerfile +++ b/demo/openssl-qat-engine/Dockerfile @@ -1,4 +1,34 @@ -FROM ubuntu:24.04 +FROM ubuntu:24.04 AS builder + +ARG QAT_ENGINE_VERSION="v1.6.2" RUN apt update && \ - apt install --no-install-recommends -y qatengine qatlib-examples qatzip openssl + env DEBIAN_FRONTEND=noninteractive apt install --no-install-recommends -y \ + git \ + ca-certificates \ + autoconf \ + automake \ + g++ \ + pkg-config \ + libssl-dev \ + libtool \ + libqat-dev \ + make \ + libusdm-dev + +RUN git clone --depth 1 -b $QAT_ENGINE_VERSION https://github.com/intel/QAT_Engine + +RUN cd /QAT_Engine && \ + sed -i '/fprintf(stderr, "QAT_HW device not available & QAT_SW not enabled. Using OpenSSL_SW!\\n");/ s/$/ return ret;/' e_qat.c && \ + ./autogen.sh && \ + ./configure \ + --disable-qat_sw \ + --with-qat_engine_id=qathwtest && \ + make && make test && make install + +FROM ubuntu:24.04 + +COPY --from=builder /QAT_Engine/testapp /usr/bin/ +COPY --from=builder /usr/lib/x86_64-linux-gnu/engines-3/qatengine.so /usr/lib/x86_64-linux-gnu/engines-3/qathwtest.so +COPY --from=builder /QAT_Engine/LICENSE /usr/share/package-licenses/QAT_Engine/LICENSE +RUN apt update && env DEBIAN_FRONTEND=noninteractive apt install --no-install-recommends -y qatengine qatlib-examples