Skip to content

Commit 05381fd

Browse files
authored
Merge pull request #1221 from mythi/PR-2022-077
update crypto-perf
2 parents db26fd6 + 24f1d55 commit 05381fd

File tree

4 files changed

+45
-85
lines changed

4 files changed

+45
-85
lines changed

Makefile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,6 @@ $(image_tags):
227227

228228
push: test-image-base-layer $(image_tags)
229229

230-
lock-images:
231-
@scripts/update-clear-linux-base.sh clearlinux:latest $(shell find demo -name Dockerfile)
232-
233230
set-version:
234231
@scripts/set-version.sh $(TAG)
235232

demo/crypto-perf/Dockerfile

Lines changed: 44 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,46 @@
1-
# CLEAR_LINUX_BASE and CLEAR_LINUX_VERSION can be used to make the build
2-
# reproducible by choosing an image by its hash and installing an OS version
3-
# with --version=:
4-
# CLEAR_LINUX_BASE=clearlinux@sha256:b8e5d3b2576eb6d868f8d52e401f678c873264d349e469637f98ee2adf7b33d4
5-
# CLEAR_LINUX_VERSION="--version=29970"
6-
#
7-
# This is used on release branches before tagging a stable version.
8-
# The main branch defaults to using the latest Clear Linux.
9-
ARG CLEAR_LINUX_BASE=clearlinux:latest
10-
11-
FROM ${CLEAR_LINUX_BASE} as builder
12-
13-
ARG CLEAR_LINUX_VERSION=
14-
15-
RUN mkdir /install_root && \
16-
swupd os-install \
17-
${CLEAR_LINUX_VERSION} \
18-
--path /install_root \
19-
--statedir /swupd-state \
20-
--bundles=dpdk \
21-
--no-boot-update && \
22-
rm -rf /install_root/var/lib/swupd/*
23-
24-
COPY run-dpdk-test /install_root/usr/bin/run-dpdk-test
25-
26-
FROM scratch as final
1+
FROM debian:sid-slim as builder
2+
3+
ARG DIR=/dpdk-build
4+
WORKDIR $DIR
5+
6+
RUN echo "deb-src http://deb.debian.org/debian unstable main" >> \
7+
/etc/apt/sources.list.d/deb-src.list
8+
RUN apt-get update && apt-get install -y wget build-essential meson python3-pyelftools libnuma-dev python3-pip libssl-dev pkg-config dpkg-dev
9+
RUN pip install ninja
10+
11+
# Download & unpack DPDK tarball
12+
ARG DPDK_TARBALL=dpdk-22.11.tar.xz
13+
ARG DPDK_TARBALL_SHA256="8eefcc69afa87dccaf8d730d805ded70fb8b64905295d6396977c1322e59eadb"
14+
15+
ARG SOVERSION=23
16+
RUN wget -q https://git.dpdk.org/dpdk/snapshot/$DPDK_TARBALL \
17+
&& echo "$DPDK_TARBALL_SHA256 $DPDK_TARBALL" | sha256sum -c - \
18+
&& tar -xf $DPDK_TARBALL && rm $DPDK_TARBALL
19+
20+
RUN cd dpdk-* && meson setup \
21+
-Dplatform=generic \
22+
-Dcpu_instruction_set=westmere \
23+
"-Denable_drivers=common/qat,compress/qat,crypto/qat" \
24+
"-Denable_apps=test-crypto-perf,test-compress-perf" \
25+
--prefix $(pwd)/installdir \
26+
builddir
27+
RUN cd dpdk-* && ninja -C builddir install
28+
RUN cd dpdk-* && \
29+
install -D builddir/app/dpdk-test-crypto-perf /install_root/usr/bin/dpdk-test-crypto-perf && \
30+
install -D builddir/app/dpdk-test-compress-perf /install_root/usr/bin/dpdk-test-compress-perf && \
31+
install -d /install_root/usr/lib/x86_64-linux-gnu/ && \
32+
for r in bus_pci eal kvargs hash security telemetry pci mbuf mempool ring net rcu ipsec cryptodev compressdev common_qat; do \
33+
install installdir/lib/x86_64-linux-gnu/librte_${r}.so.${SOVERSION} /install_root/usr/lib/x86_64-linux-gnu/; \
34+
done
35+
36+
RUN mkdir -p /install_root/licenses/dpdk && \
37+
cp dpdk-*/license/bsd-3-clause.txt /install_root/licenses/dpdk && \
38+
cd /install_root/licenses/dpdk && \
39+
apt-get source --download-only -y libatomic1 libnuma1
40+
41+
FROM debian:sid-slim
42+
RUN apt-get update && apt-get install -y libssl3 libnuma1 libatomic1 && ldconfig -v
2743
COPY --from=builder /install_root /
44+
COPY run-dpdk-test /usr/bin/
2845

29-
CMD ["/bin/bash"]
46+
ENTRYPOINT /usr/bin/run-dpdk-test

demo/crypto-perf/run-dpdk-test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ for i in `echo ${!QAT*}`; do PCI_ALLOWLIST="$PCI_ALLOWLIST -a ${!i}"; done
1414

1515
LCORE=$(cat /sys/fs/cgroup/cpuset/cpuset.cpus)
1616

17-
EAL="-l ${LCORE} ${PCI_ALLOWLIST}"
17+
EAL="--no-telemetry -l ${LCORE} ${PCI_ALLOWLIST}"
1818

1919
dpdk-test-${TESTCMD}-perf ${EAL} -- ${PTEST} \

scripts/update-clear-linux-base.sh

Lines changed: 0 additions & 54 deletions
This file was deleted.

0 commit comments

Comments
 (0)