From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id E4DC3A0487
	for <public@inbox.dpdk.org>; Mon, 29 Jul 2019 12:35:59 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 58CB91BEFF;
	Mon, 29 Jul 2019 12:35:59 +0200 (CEST)
Received: from mail-vs1-f66.google.com (mail-vs1-f66.google.com
 [209.85.217.66]) by dpdk.org (Postfix) with ESMTP id 5C5911BEE1
 for <dev@dpdk.org>; Mon, 29 Jul 2019 12:35:58 +0200 (CEST)
Received: by mail-vs1-f66.google.com with SMTP id 2so40376910vso.8
 for <dev@dpdk.org>; Mon, 29 Jul 2019 03:35:58 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=m6925uX9upddZVpe4MrDFteVZb5QmAo9UF6kJYEZefc=;
 b=NgEYPkMu/vdptyblDe8vBlt3bFjVIj4OD06qZ9t5balH9rtm9VzWi9sYot9q1KN7qY
 BL17cwtN7fXCBmcaOvnymoDYeRKsqLjt1AQraMMyztW+ACr7oR/MdlR/HFvqqTXR6BBt
 S1zgRNoYKV+Q33OxjzXb3Z0uBLy1+w6hkC1zj8GPEMJSLSbwNzGSmmriMotAjY+fb+JB
 we5ULfBigPaD2CLt+xdOa6J3Vl7FD/ulA2gS0h8X8tLUsT4KvEGfojFbGdOrEwWaLkS9
 4ewE7pY3pre2p5DBr3jeUC++LAQmIfi0fIgtQW/1yyBEiKxhQUqWLaJG8JVY7C0HR2+n
 A+YQ==
X-Gm-Message-State: APjAAAVK0sSf1dfzsrSdXP8n5HJ0tiVWWuIDMEyQNcyArPJWkyktF8kb
 mkndaZehjreeqBs+0ISJkSt/vOaNH2JSf6k9FiFtQpO7
X-Google-Smtp-Source: APXvYqwmJlXl2GwumaS29KjytRt0axG9wVeJX0jzWpA9PdeK0W1K6m9jq23WOzov1C2x6u8RRhCfH95WeK5VJ8Qjbcc=
X-Received: by 2002:a67:d81b:: with SMTP id e27mr63707388vsj.198.1564396557625; 
 Mon, 29 Jul 2019 03:35:57 -0700 (PDT)
MIME-Version: 1.0
References: <20190717112031.10968-1-thomas@monjalon.net>
 <20190717155202.1674-1-thomas@monjalon.net>
In-Reply-To: <20190717155202.1674-1-thomas@monjalon.net>
From: David Marchand <david.marchand@redhat.com>
Date: Mon, 29 Jul 2019 12:35:46 +0200
Message-ID: <CAJFAV8ya4jcCqjRepWmoxQHaDpkXWLLa07Om39S-qRaZys=oAg@mail.gmail.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: dev <dev@dpdk.org>
Content-Type: text/plain; charset="UTF-8"
Subject: Re: [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 <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

On Wed, Jul 17, 2019 at 5:53 PM Thomas Monjalon <thomas@monjalon.net> wrote:
>
> 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 <thomas@monjalon.net>
> ---
>  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

You don't really care that testpmd is a file, prefer -e.


> +       echo 'ERROR: testpmd cannot be found' >&2
> +       exit 1
> +fi
> +
> +unset libs

You reference it later, I suppose you meant 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
>


--
David Marchand