From patchwork Tue Jul 30 17:34:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Monjalon X-Patchwork-Id: 57285 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C644F1BFE0; Tue, 30 Jul 2019 19:34:20 +0200 (CEST) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by dpdk.org (Postfix) with ESMTP id C94411BFCF for ; Tue, 30 Jul 2019 19:34:19 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id EAA8F22182; Tue, 30 Jul 2019 13:34:17 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 30 Jul 2019 13:34:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=mesmtp; bh=MAUqnT26mo ETrTvZkVioeCM0FTperv3a45BYon13ttY=; b=YzvDysL8ugjx0QsoKq90VSpP4a XxPo1O2SYJ3KQnhZ8QM+fdfDtfKcSZoZygerEOXrYDWAJWbEqGjdoolet+BYk1CD 1Evn1byQ0e7DEwu6fOCyaXNM7KiZv3c0ZQHdxp+uF5gUg1udct17tvDEmw1XSiHC h/HJhVvGu6hbFfMbA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=MAUqnT26moETrTvZkVioeCM0FTperv3a45BYon13ttY=; b=0PJ85DOC D1xQ0sim3ecrClH9h5zIieJ6qrkjVvpVka2f/dtjAoczFqDhdYqQTNQY3JpZbo+T K4viHZNrbThkYnzQg2ejmXSKy+OSOo1fqKNJ1ugVF4gJq8VAGcG5HZjwwx9APb74 scJTHqdaf6OV9YgMK6vjZEWnrwTcNQ1Wva82lqSwEJbzEPeVxN75UZ7gStOo8wDE 17Jqs3TFiCncYsUsfeb2HneB3C8fztBdB591A0GErIs6TMP3E4XtyLcVBh+iGfrN EEObjV3+fUybx/8Ghqp82mCZweEED4/VYK1VpGe1YtEy6RnSe9t3s2W1KznAJQCe KRp1anK4ioUdTw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrleefgdduuddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomhepvfhhohhmrghsucfoohhnjhgrlhhonhcuoehthhhomhgrshes mhhonhhjrghlohhnrdhnvghtqeenucfkphepjeejrddufeegrddvtdefrddukeegnecurf grrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtnecu vehluhhsthgvrhfuihiivgeptd 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 D2E0480060; Tue, 30 Jul 2019 13:34:16 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: anatoly.burakov@intel.com, david.marchand@redhat.com Date: Tue, 30 Jul 2019 19:34:13 +0200 Message-Id: <20190730173414.31017-1-thomas@monjalon.net> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190717112031.10968-1-thomas@monjalon.net> References: <20190717112031.10968-1-thomas@monjalon.net> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v3 1/2] devtools: restore 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 --- v3: do not use "unset" to init a variable (David) --- devtools/test-null.sh | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/devtools/test-null.sh b/devtools/test-null.sh index 61879e3e6..73bbded89 100755 --- a/devtools/test-null.sh +++ b/devtools/test-null.sh @@ -1,17 +1,27 @@ #! /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 + +if ldd $testpmd | grep -q librte_ ; then + libs='-d librte_mempool_ring.so -d librte_pmd_null.so' +else + libs= 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 From patchwork Tue Jul 30 17:34:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Monjalon X-Patchwork-Id: 57286 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 952021BFF8; Tue, 30 Jul 2019 19:34:25 +0200 (CEST) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by dpdk.org (Postfix) with ESMTP id 9CC401BFCE for ; Tue, 30 Jul 2019 19:34:20 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 4C53821EAF; Tue, 30 Jul 2019 13:34:20 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 30 Jul 2019 13:34:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=mesmtp; bh=QJ9mI4e+T8 Bn+A6IWmKZjs405luk9Dky1r49AcuCl5U=; b=pYMVzZGdV1UXlLQ10/8Inocmdu SHo4o8MlqGD/5gZ5ks8wix4dhJj9AYWVIVqZ68lgssKtvafuHJubo3MdCfX19f/M 2ZbheeaUy1y0yERDfrpfXPvbTOOLG3SoDy79vunT+JBnKw/ZgvXCtl/T1fwiYQ5T 3ypvlzHZEYmRz4kEA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=QJ9mI4e+T8Bn+A6IWmKZjs405luk9Dky1r49AcuCl5U=; b=k3/kxwm7 exxlI47RP8FA8OlvyKRL4jVnFhOM/q5GpAtKgcExZMAa8PjNmalGXGAQcnG7ytV2 Agki77LmPXjTmc9/8eqZoNLCKb00CD0Fo4f40J39pARAqZOwd9fnf/vfrRUis+wb of2BMehtdtuH7d2vgnIVEtqZQs1iBQYhLJ6Sw0+Q7ZL6IWAkTcqDf45bdH8bFcDy gPKTkqM5uAGNMTX8u+1lh3trhyjvbRldm6FEZBwiXkN0yOlxoKzno90IivLh7CrI BkMOSJLrfyi1iPooEXuUFo/kciUdYMFPTp9qY7IJmT24IMD6/QqtN1ANQPeJNO45 Qh5MRILUPIETfg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrleefgdduuddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomhepvfhhohhmrghsucfoohhnjhgrlhhonhcuoehthhhomhgrshes mhhonhhjrghlohhnrdhnvghtqeenucfkphepjeejrddufeegrddvtdefrddukeegnecurf grrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtnecu vehluhhsthgvrhfuihiivgeptd 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 80C8680063; Tue, 30 Jul 2019 13:34:19 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: anatoly.burakov@intel.com, david.marchand@redhat.com Date: Tue, 30 Jul 2019 19:34:14 +0200 Message-Id: <20190730173414.31017-2-thomas@monjalon.net> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190730173414.31017-1-thomas@monjalon.net> References: <20190717112031.10968-1-thomas@monjalon.net> <20190730173414.31017-1-thomas@monjalon.net> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v3 2/2] devtools: allow misc options in 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" In order to ease basic testing with customized options, EAL and testpmd options can be added as third and fourth arguments of the "null PMD" script. Also, the first argument becomes more flexible by accepting the testpmd path as an alternative to the build directory. Signed-off-by: Thomas Monjalon --- devtools/test-null.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/devtools/test-null.sh b/devtools/test-null.sh index 73bbded89..9f9a459f7 100755 --- a/devtools/test-null.sh +++ b/devtools/test-null.sh @@ -5,10 +5,13 @@ # Run a quick testpmd forwarding with null PMD without hugepage -build=${1:-build} +build=${1:-build} # first argument can be the build directory +testpmd=$1 # or first argument can be the testpmd path coremask=${2:-3} # default using cores 0 and 1 +eal_options=$3 +testpmd_options=$4 -testpmd=$build/app/dpdk-testpmd +[ -f "$testpmd" ] || testpmd=$build/app/dpdk-testpmd [ -f "$testpmd" ] || testpmd=$build/app/testpmd if [ ! -f "$testpmd" ] ; then echo 'ERROR: testpmd cannot be found' >&2 @@ -23,5 +26,5 @@ fi (sleep 1 && echo stop) | $testpmd -c $coremask --no-huge -m 150 \ - $libs --vdev net_null1 --vdev net_null2 -- \ - --no-mlockall --total-num-mbufs=2048 -ia + $libs --vdev net_null1 --vdev net_null2 $eal_options -- \ + --no-mlockall --total-num-mbufs=2048 $testpmd_options -ia