aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/docker/test-containers/dpdk-forwarding-pods/l2l3fwd/Dockerfile1
-rw-r--r--tools/docker/test-containers/trafficgen-pods/pktgen/Dockerfile12
-rwxr-xr-xtools/docker/test-containers/trafficgen-pods/pktgen/vhost_substitute.sh19
3 files changed, 26 insertions, 6 deletions
diff --git a/tools/docker/test-containers/dpdk-forwarding-pods/l2l3fwd/Dockerfile b/tools/docker/test-containers/dpdk-forwarding-pods/l2l3fwd/Dockerfile
index c56e45cf..4bf4a0a9 100644
--- a/tools/docker/test-containers/dpdk-forwarding-pods/l2l3fwd/Dockerfile
+++ b/tools/docker/test-containers/dpdk-forwarding-pods/l2l3fwd/Dockerfile
@@ -77,7 +77,6 @@ FROM centos
COPY --from=0 /usr/bin/dpdk-app /usr/bin/dpdk-app
COPY --from=0 /usr/bin/l2fwd /usr/bin/l2fwd
COPY --from=0 /usr/bin/l3fwd /usr/bin/l3fwd
-COPY --from=0 /usr/bin/testpmd /usr/bin/testpmd
COPY --from=0 /lib64/libnetutil_api.so /lib64/libnetutil_api.so
COPY --from=0 /usr/lib64/libnuma.so.1 /usr/lib64/libnuma.so.1
COPY --from=0 /root/go/src/github.com/openshift/app-netutil/bin/c_sample /usr/bin/c_sample
diff --git a/tools/docker/test-containers/trafficgen-pods/pktgen/Dockerfile b/tools/docker/test-containers/trafficgen-pods/pktgen/Dockerfile
index 8288cf63..33078609 100644
--- a/tools/docker/test-containers/trafficgen-pods/pktgen/Dockerfile
+++ b/tools/docker/test-containers/trafficgen-pods/pktgen/Dockerfile
@@ -13,13 +13,15 @@ RUN yum install -y pciutils iproute; yum clean all
## Download and Build APP-NetUtil
##
WORKDIR /root/go/src/
-RUN go get github.com/openshift/app-netutil 2>&1 > /tmp/UserspaceDockerBuild.log || echo "Can ignore no GO files."
+RUN mkdir github.com && cd github.com && mkdir openshift && cd openshift && git clone https://github.com/openshift/app-netutil
WORKDIR /root/go/src/github.com/openshift/app-netutil
RUN make c_sample
RUN cp bin/libnetutil_api.so /lib64/libnetutil_api.so; cp bin/libnetutil_api.h /usr/include/libnetutil_api.h
## Download and Build DPDK
##
+
+
ENV DPDK_VER 21.02
ENV DPDK_DIR /usr/src/dpdk-${DPDK_VER}
WORKDIR /usr/src/
@@ -32,17 +34,17 @@ WORKDIR ${DPDK_DIR}
COPY ./vhost_substitute.sh ./vhost_substitute.sh
RUN ./vhost_substitute.sh
+EXPOSE 22 8474
+
RUN yum install -y epel-release && yum install -y dnf
RUN dnf install -y meson ninja-build
RUN pip3 install pyelftools
RUN meson build && ninja -C build && ninja -C build install && ldconfig
-EXPOSE 22 8474
-
WORKDIR /usr/src/
ENV PKG_CONFIG_PATH /usr/local/lib64/pkgconfig
RUN git clone http://dpdk.org/git/apps/pktgen-dpdk
RUN yum install -y libpcap libpcap-devel
-RUN cd pktgen-dpdk && make -j
-
+RUN yum install -y kernel-devel kernel-headers
+RUN cd pktgen-dpdk && git checkout tags/pktgen-21.02.0 && make -j
diff --git a/tools/docker/test-containers/trafficgen-pods/pktgen/vhost_substitute.sh b/tools/docker/test-containers/trafficgen-pods/pktgen/vhost_substitute.sh
new file mode 100755
index 00000000..b33f3521
--- /dev/null
+++ b/tools/docker/test-containers/trafficgen-pods/pktgen/vhost_substitute.sh
@@ -0,0 +1,19 @@
+!/bin/bash
+
+# The first two commands update one of the 'if' checks to remove
+# the check for 'master == VHOST_USER_SET_VRING_CALL'.
+#
+# Search for: " !(dev->flags & VIRTIO_DEV_VDPA_CONFIGURED) &&".
+# Replace with: " !(dev->flags & VIRTIO_DEV_VDPA_CONFIGURED)) {".
+sed -i -e 's/ !(dev->flags & VIRTIO_DEV_VDPA_CONFIGURED) &&/ !(dev->flags \& VIRTIO_DEV_VDPA_CONFIGURED)) {/g' lib/librte_vhost/vhost_user.c
+#
+# Search for line with: " msg.request.master == VHOST_USER_SET_VRING_CALL) {".
+# Delete the line.
+sed -i -e '/ msg\.request\.master == VHOST_USER_SET_VRING_CALL) {/d' lib/librte_vhost/vhost_user.c
+
+
+# Force an RARP message to be sent out.
+#
+# Search for line with: " hw->started = true;".
+# Append line: " virtio_notify_peers(dev);".
+sed -i -e '/ hw->started = true;/a virtio_notify_peers(dev);' drivers/net/virtio/virtio_ethdev.c