From patchwork Wed Jul 17 15:52:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Monjalon X-Patchwork-Id: 56647 X-Patchwork-Delegate: thomas@monjalon.net 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 109C51BE48; Wed, 17 Jul 2019 17:53:03 +0200 (CEST) Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) by dpdk.org (Postfix) with ESMTP id D3DD61BE21 for ; Wed, 17 Jul 2019 17:53:01 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 6FA433B0; Wed, 17 Jul 2019 11:52:59 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 17 Jul 2019 11:52:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=mesmtp; bh=+9MJg1Kl/z L9aSfCzIY3bfyfm5axbvxmSEJ2aG+98nY=; b=AyqX4ulbVcnCEljdHOXxbvk4W8 bivPTIn29bZCxn/Em0AccJW2v2N1gfLNSLjYqC6rRq/JjALAIwhMKZSEakZLCtDJ Zc8qGn4zpC7P3UzgeYux+ocYksDqKgRW2xXSg5XuRW+VCUSRJ7DVF9ddG9HBaUEa TGXHa18e16TvYb2gU= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=+9MJg1Kl/zL9aSfCzIY3bfyfm5axbvxmSEJ2aG+98nY=; b=Ll05YLYI YUY81ouo1ddlkeHgOwKES4VHQCKLEp3SVubV41g/WC9kL9ARLpcs+y4RS/mhbqQQ 4Uct7AgWGR80sl7NuqWGfGVLEDgRplXcHFlRma/lxovM4XMxsxqYc0ZiRn2jHGIp JH5LoeOAcPuig+WarmsMDCteNXT5bIvAU16I/ghVBM3Rt3oKsPn7NnTFUGfsJCRz XoVJvHhg9CI14tznOnQ1N8ns5kKGylEvqsLrvcbpNnT19fWIhvmjzK3iH8kTm1TX 2A25lk/xlTXO7GG/S5FXNfijmdDGE6X1ZfZj4FAI1IHXbI/SKW7J8Exk26cI8bTO 82ht5EAHVXYGGg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrieefgdejvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpefvhhhomhgrshcuofhonhhjrghlohhnuceothhhohhmrghssehm ohhnjhgrlhhonhdrnhgvtheqnecukfhppeejjedrudefgedrvddtfedrudekgeenucfrrg hrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvthenucev lhhushhtvghrufhiiigvpedt 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 5A9DA80059 for ; Wed, 17 Jul 2019 11:52:58 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Date: Wed, 17 Jul 2019 17:52:01 +0200 Message-Id: <20190717155202.1674-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 v2 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 --- 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..6928a6c15 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 From patchwork Wed Jul 17 15:52:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Monjalon X-Patchwork-Id: 56648 X-Patchwork-Delegate: thomas@monjalon.net 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 71EAE1BE65; Wed, 17 Jul 2019 17:53:06 +0200 (CEST) Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) by dpdk.org (Postfix) with ESMTP id CD6501BE53 for ; Wed, 17 Jul 2019 17:53:04 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id DED7D20A; Wed, 17 Jul 2019 11:53:03 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 17 Jul 2019 11:53:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=mesmtp; bh=Z5TmUYjF5+ SMWiQuLTq5lwkXkXyY8MRuAun7NSpleDE=; b=jXhA6BaasVrbrkBCQVjo3sfGeZ m6NsJm5nQucOkpko1yEkgCYn4LfnRcsJ06VJjq/B5YfRD2CbkNtfvRPHy8SjppEX 9BieP0VViFp1fNyN6c3lLjcBsiZWBbN9vKnpUfkTc1YiogRtahqrC3cF4TYT36mV McsNWkmaBIwembeJ4= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=Z5TmUYjF5+SMWiQuLTq5lwkXkXyY8MRuAun7NSpleDE=; b=yAbqM43V Mp8iYtCfb9q1FXNjbQEuTKQLIAlTVhLxwNK4e1fAX5qG6P51G3k4M2ptDxOs0zpw FV+VSaNdV7uaxoxrhE6Nt53Q+uPTk+3huK+HIXylAaSJxkk6nOYfPUzkx7/gJvKf RpVqxN62W4pRk8Xjs2qkwN1kuYdp+5IoxNnm6XMcPfUQ/5r2k5WFkkQ53ZsUjgTN A+j2SjLj+Ulxnffcxkpg2yvoJd21+K1iJtJZ++aGDcRUDovYLkXDb9anfsLu0Gub 3/CxWchcs5v7Hb7Kgv/qLHAx0x9EOxBZfGkSs1ahScs1YhTI6rf7MI3iQ8JVLPgc mJLA5J/Fcrh9DQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrieefgdejvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpefvhhhomhgrshcuofhonhhjrghlohhnuceothhhohhmrghssehm ohhnjhgrlhhonhdrnhgvtheqnecukfhppeejjedrudefgedrvddtfedrudekgeenucfrrg hrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvthenucev lhhushhtvghrufhiiigvpedt 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 0E3D080069 for ; Wed, 17 Jul 2019 11:53:02 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Date: Wed, 17 Jul 2019 17:52:02 +0200 Message-Id: <20190717155202.1674-2-thomas@monjalon.net> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190717155202.1674-1-thomas@monjalon.net> References: <20190717112031.10968-1-thomas@monjalon.net> <20190717155202.1674-1-thomas@monjalon.net> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v2 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 6928a6c15..69eddc359 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 @@ -22,5 +25,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