-
Notifications
You must be signed in to change notification settings - Fork 134
/
testpmd.dockerfile
32 lines (26 loc) · 1.04 KB
/
testpmd.dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM centos:latest
ENV DPDK_VER 19.08
ENV DPDK_DIR /usr/src/dpdk-${DPDK_VER}
ENV RTE_TARGET=x86_64-native-linuxapp-gcc
ENV RTE_SDK=${DPDK_DIR}
# Install prerequisite packages
RUN yum groupinstall -y "Development Tools" && \
yum install --skip-broken -y wget numactl numactl-devel make libibverbs-devel logrotate rdma-core && \
yum clean all
# Download the DPDK libraries
RUN wget http://fast.dpdk.org/rel/dpdk-${DPDK_VER}.tar.xz -P /usr/src && \
tar -xpvf /usr/src/dpdk-${DPDK_VER}.tar.xz -C /usr/src && \
rm -f /usr/src/dpdk-${DPDK_VER}.tar.xz
# Configuration
RUN sed -i -e 's/EAL_IGB_UIO=y/EAL_IGB_UIO=n/' \
-e 's/KNI_KMOD=y/KNI_KMOD=n/' \
-e 's/LIBRTE_KNI=y/LIBRTE_KNI=n/' \
-e 's/LIBRTE_PMD_KNI=y/LIBRTE_PMD_KNI=n/' $DPDK_DIR/config/common_linux && \
sed -i 's/\(CONFIG_RTE_LIBRTE_MLX5_PMD=\)n/\1y/g' $DPDK_DIR/config/common_base
# Build it
RUN cd ${DPDK_DIR} && \
make install T=${RTE_TARGET} DESTDIR=${RTE_SDK}
# Build TestPmd
RUN cd ${DPDK_DIR}/app/test-pmd && \
make && \
cp testpmd /usr/local/bin/