2 # SPDX-License-Identifier: BSD-3-Clause
3 # Copyright 2015 6WIND S.A.
4 # Copyright 2019 Mellanox Technologies, Ltd
6 # Run a quick testpmd forwarding with null PMD without hugepage
8 build=${1:-build} # first argument can be the build directory
9 testpmd=$1 # or first argument can be the testpmd path
10 coremask=${2:-3} # default using cores 0 and 1
14 [ -f "$testpmd" ] || testpmd=$build/app/dpdk-testpmd
15 [ -f "$testpmd" ] || testpmd=$build/app/testpmd
16 if [ ! -f "$testpmd" ] ; then
17 echo 'ERROR: testpmd cannot be found' >&2
21 if ldd $testpmd | grep -q librte_ ; then
22 libs='-d librte_mempool_ring.so -d librte_pmd_null.so'
27 (sleep 1 && echo stop) |
28 $testpmd -c $coremask --no-huge -m 150 \
29 $libs --vdev net_null1 --vdev net_null2 $eal_options -- \
30 --no-mlockall --total-num-mbufs=2048 $testpmd_options -ia