3 # Copyright (c) 2020 Cisco and/or its affiliates.
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at:
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
20 ROOTDIR="/tmp/openvpp-testing"
21 TESTPMDLOG="screenlog.0"
24 # Setting command line arguments.
33 # DPDK prefers "arm64" to "aarch64" and does not allow arm64 native target.
34 if [ "${arch}" == "aarch64" ]; then
41 # Try to kill the testpmd.
43 if [ ${?} -eq "0" ]; then
47 for attempt in {1..60}; do
48 echo "Checking if testpmd is still alive, attempt nr ${attempt}"
50 if [ ${?} -eq "1" ]; then
51 echo "testpmd is dead"
55 echo "testpmd is still alive, waiting 1 second"
58 if [ "${success}" = false ]; then
59 echo "The command sudo pkill testpmd failed"
65 echo "testpmd is not running"
68 # Try to kill the l3fwd.
70 if [ ${?} -eq "0" ]; then
74 for attempt in {1..60}; do
75 echo "Checking if l3fwd is still alive, attempt nr ${attempt}"
77 if [ ${?} -eq "1" ]; then
82 echo "l3fwd is still alive, waiting 1 second"
85 if [ "${success}" = false ]; then
86 echo "The command sudo pkill l3fwd failed"
92 echo "l3fwd is not running"
96 sudo rm -f /dev/hugepages/*
100 cd "${ROOTDIR}/${DPDK_DIR}/"
101 rm -f "${TESTPMDLOG}"
102 TESTPMD_BIN="./${arch}-${machine}-linuxapp-gcc/app/testpmd"
104 if [ "${jumbo_frames}" = "yes" ]; then
105 sudo sh -c "screen -dmSL DPDK-test ${TESTPMD_BIN} \
106 -l ${cpu_corelist} -n 4 --log-level 8 -v -- \
110 --nb-cores=${nb_cores} \
112 --tx-offloads=0x7FFFFFFF \
114 --rxq=${queue_nums} \
115 --txq=$((${nb_cores} + 1)) \
119 --disable-link-check \
122 sudo sh -c "screen -dmSL DPDK-test ${TESTPMD_BIN} \
123 -l ${cpu_corelist} -n 4 --log-level 8 -v -- \
127 --nb-cores=${nb_cores} \
129 --rxq=${queue_nums} \
130 --txq=$((${nb_cores} + 1)) \
134 --disable-link-check \
138 for attempt in {1..60}; do
139 echo "Checking if testpmd is alive, attempt nr ${attempt}"
140 fgrep "Press enter to exit" "${TESTPMDLOG}"
141 if [ "${?}" -eq "0" ]; then