From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5A9C7A0471 for ; Wed, 17 Jul 2019 13:20:46 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B958A1B950; Wed, 17 Jul 2019 13:20:45 +0200 (CEST) Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by dpdk.org (Postfix) with ESMTP id ECC821041 for ; Wed, 17 Jul 2019 13:20:43 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 0117741B; Wed, 17 Jul 2019 07:20:42 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Wed, 17 Jul 2019 07:20:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=mesmtp; bh=j6WfWQxvtMlnt61axeExeZP liN6CxXtqP+yKIEER1bk=; b=ieNDDmpNZtxx1OdGBJxgs7aXNgGxeB6LlZmDuqD uE3LzgmvWtmyX86aEq0CIp6tOZ+kxkSVTZC3+sSCDMeEWBx64NVoSLWx4ch6d2lI 5FkFPogbxBeeZ5xFu1zT+b9GZdMmWBFxC2xFQl45ElWW9dJEyIHpBeHUet4rDwTn CKAs= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=j6WfWQxvtMlnt61ax eExeZPliN6CxXtqP+yKIEER1bk=; b=p2iDAOjfR7TCTgucuqSPNGfqh+8NXJkwd 9E+HHoeK4mbcj7T0eanrCSgO+XnG/iVu4OSj8I+FA84KTOf/CaoM81w7v1KNVapM ZmD37oAHLsADkqJocGNMDBThvcbV44oBYs/zGuh/mptqFNwmSLLgh6ZkBA5jw6iS d5XoLpzsUO0uRrqML0K6NN9PUbAt70FRJJzVYV5JWvKBGLeGowc3MClLRtCUxMbe FCYUn1YL6D6C81MWTo+F2yG2y8LrOyZfgIXnBO7kJ+J2qCKrefznwEI1EJ/HjBhS qREsMXOrGGu6CwC7YE7WCkB7AKljbwDjI8AHTzx9uwiw0Tv+IOmAA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrieefgdduhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffoggfgsedtkeertdertd dtnecuhfhrohhmpefvhhhomhgrshcuofhonhhjrghlohhnuceothhhohhmrghssehmohhn jhgrlhhonhdrnhgvtheqnecukfhppeejjedrudefgedrvddtfedrudekgeenucfrrghrrg hmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvthenucevlhhu shhtvghrufhiiigvpedt X-ME-Proxy: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id BE5C9380079; Wed, 17 Jul 2019 07:20:41 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: anatoly.burakov@intel.com Date: Wed, 17 Jul 2019 13:20:31 +0200 Message-Id: <20190717112031.10968-1-thomas@monjalon.net> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] devtools: fix null test X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This small testpmd test was not working for a long time because of several changes in EAL and mempool. The 3 main issues solved are: - Make --no-huge working by specifying an amount of memory to allocate in legacy mode, and disabling mlockall. - Load a mempool handler in shared library case. - Support meson Signed-off-by: Thomas Monjalon --- devtools/test-null.sh | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/devtools/test-null.sh b/devtools/test-null.sh index 61879e3e6..59cb0606a 100755 --- a/devtools/test-null.sh +++ b/devtools/test-null.sh @@ -1,17 +1,26 @@ #! /bin/sh -e # SPDX-License-Identifier: BSD-3-Clause # Copyright 2015 6WIND S.A. +# Copyright 2019 Mellanox Technologies, Ltd # Run a quick testpmd forwarding with null PMD without hugepage build=${1:-build} coremask=${2:-3} # default using cores 0 and 1 -if grep -q SHARED_LIB=y $build/.config; then - pmd='-d librte_pmd_null.so' +testpmd=$build/app/dpdk-testpmd +[ -f $testpmd ] || testpmd=$build/app/testpmd +if [ ! -f $testpmd ] ; then + echo 'ERROR: testpmd cannot be found' >&2 + exit 1 +fi + +unset libs +if ldd $testpmd | grep -q librte_ ; then + libs='-d librte_mempool_ring.so -d librte_pmd_null.so' fi (sleep 1 && echo stop) | -$build/app/testpmd -c $coremask -n 1 --no-huge \ - $pmd --vdev net_null1 --vdev net_null2 -- \ - --total-num-mbufs=2048 -ia +$testpmd -c $coremask --no-huge -m 150 \ + $libs --vdev net_null1 --vdev net_null2 -- \ + --no-mlockall --total-num-mbufs=2048 -ia -- 2.21.0