Skip to content

Commit 667f859

Browse files
authored
Merge pull request #994 from mythi/PR-2022-030
openssl-qat-engine: move to use qatlib
2 parents 039276c + c22417e commit 667f859

File tree

1 file changed

+14
-18
lines changed

1 file changed

+14
-18
lines changed

demo/openssl-qat-engine/Dockerfile

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
FROM ubuntu:20.04 as builder
22

3-
ARG QAT_DRIVER_RELEASE="QAT.L.4.15.0-00011"
4-
ARG QAT_DRIVER_SHA256="036a87f8c337a3d7a8f6e44e39d9767bb88b3b7866ee00886237d454a628aa56"
3+
ARG QATLIB_VERSION="21.11.0"
54
ARG QAT_ENGINE_VERSION="v0.6.11"
65
ARG IPSEC_MB_VERSION="v1.1"
76
ARG IPP_CRYPTO_VERSION="ippcp_2021.5"
@@ -15,6 +14,7 @@ RUN apt update && \
1514
nasm \
1615
pkg-config \
1716
libssl-dev \
17+
zlib1g-dev \
1818
wget \
1919
git \
2020
yasm \
@@ -24,16 +24,14 @@ RUN apt update && \
2424
git clone -b $QAT_ENGINE_VERSION https://github.com/intel/QAT_Engine && \
2525
git clone -b $IPP_CRYPTO_VERSION https://github.com/intel/ipp-crypto && \
2626
git clone -b $IPSEC_MB_VERSION https://github.com/intel/intel-ipsec-mb && \
27-
wget https://downloadmirror.intel.com/649693/$QAT_DRIVER_RELEASE.tar.gz && \
28-
echo "$QAT_DRIVER_SHA256 $QAT_DRIVER_RELEASE.tar.gz" | sha256sum -c - && \
29-
tar xf *.tar.gz
27+
git clone -b $QATLIB_VERSION https://github.com/intel/qatlib
3028

31-
RUN sed -i -e 's/cmn_ko$//' -e 's/lac_kernel$//' quickassist/Makefile && \
32-
KERNEL_SOURCE_ROOT=/tmp ./configure && \
33-
make quickassist-all adf-ctl-all && \
34-
install -m 755 build/libqat_s.so /usr/lib/ && \
35-
install -m 755 build/libusdm_drv_s.so /usr/lib/ && \
36-
install -m 755 build/adf_ctl /usr/bin/ && \
29+
RUN cd /qatlib && \
30+
sed -i -e '79,87d' configure.ac && \
31+
./autogen.sh && \
32+
./configure --prefix=/usr && \
33+
make -j && \
34+
make install samples-install && \
3735
cd /ipp-crypto/sources/ippcp/crypto_mb && \
3836
cmake . -B"../build" \
3937
-DOPENSSL_INCLUDE_DIR=/usr/include/openssl \
@@ -62,23 +60,21 @@ RUN cd /QAT_Engine && \
6260
make clean && \
6361
mv /usr/lib/x86_64-linux-gnu/engines-1.1/qat-sw.so.tmp /usr/lib/x86_64-linux-gnu/engines-1.1/qat-sw.so && \
6462
./configure \
65-
--with-qat_hw_dir=/ \
66-
--with-qat_hw_install_dir=/usr/lib \
6763
--with-qat_engine_id=qat-hw && \
6864
make && make install && \
6965
mv /usr/lib/x86_64-linux-gnu/engines-1.1/qatengine.so /usr/lib/x86_64-linux-gnu/engines-1.1/qat-hw.so
7066

7167
FROM ubuntu:20.04
7268

73-
COPY --from=builder /usr/lib/libqat_s.so /usr/lib/
74-
COPY --from=builder /usr/lib/libusdm_drv_s.so /usr/lib/
69+
COPY --from=builder /usr/bin/*_sample* /usr/bin/
70+
COPY --from=builder /usr/lib/libqat.so.2.0.0 /usr/lib/
71+
COPY --from=builder /usr/lib/libusdm.so.0.0.1 /usr/lib/
7572
COPY --from=builder /usr/lib64/libIPSec_MB.so.1 /usr/lib/x86_64-linux-gnu/
7673
COPY --from=builder /usr/local/lib/libcrypto_mb.so.11.3 /usr/lib/x86_64-linux-gnu/
77-
COPY --from=builder /usr/bin/adf_ctl /usr/bin
7874
COPY --from=builder /usr/lib/x86_64-linux-gnu/engines-1.1/qat-sw.so /usr/lib/x86_64-linux-gnu/engines-1.1/qat-sw.so
7975
COPY --from=builder /usr/lib/x86_64-linux-gnu/engines-1.1/qat-hw.so /usr/lib/x86_64-linux-gnu/engines-1.1/qat-hw.so
80-
COPY --from=builder /LICENSE.GPL /usr/share/package-licenses/libqat/LICENSE.GPL
76+
COPY --from=builder /qatlib/LICENSE /usr/share/package-licenses/qatlib/LICENSE
8177
COPY --from=builder /QAT_Engine/LICENSE /usr/share/package-licenses/QAT_Engine/LICENSE
8278
COPY --from=builder /ipp-crypto/LICENSE /usr/share/package-licenses/ipp-crypto/LICENSE
8379
COPY --from=builder /intel-ipsec-mb/LICENSE /usr/share/package-licenses/intel-ipsec-mb/LICENSE
84-
RUN ldconfig && apt update && env DEBIAN_FRONTEND=noninteractive apt install -y openssl
80+
RUN ldconfig && apt update && env DEBIAN_FRONTEND=noninteractive apt install -y openssl haproxy

0 commit comments

Comments
 (0)