xref: /dpdk/devtools/test-null.sh (revision 85fc9b25)
1#! /bin/sh -e
2# SPDX-License-Identifier: BSD-3-Clause
3# Copyright 2015 6WIND S.A.
4# Copyright 2019 Mellanox Technologies, Ltd
5
6# Run a quick testpmd forwarding with null PMD without hugepage
7
8build=${1:-build}
9coremask=${2:-3} # default using cores 0 and 1
10
11testpmd=$build/app/dpdk-testpmd
12[ -f "$testpmd" ] || testpmd=$build/app/testpmd
13if [ ! -f "$testpmd" ] ; then
14	echo 'ERROR: testpmd cannot be found' >&2
15	exit 1
16fi
17
18if ldd $testpmd | grep -q librte_ ; then
19	libs='-d librte_mempool_ring.so -d librte_pmd_null.so'
20else
21	libs=
22fi
23
24(sleep 1 && echo stop) |
25$testpmd -c $coremask --no-huge -m 150 \
26	$libs --vdev net_null1 --vdev net_null2 -- \
27	--no-mlockall --total-num-mbufs=2048 -ia
28