From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <thomas.monjalon@6wind.com>
Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com
 [209.85.212.169]) by dpdk.org (Postfix) with ESMTP id 7FFC2212
 for <dev@dpdk.org>; Wed,  1 Oct 2014 15:30:14 +0200 (CEST)
Received: by mail-wi0-f169.google.com with SMTP id cc10so535254wib.2
 for <dev@dpdk.org>; Wed, 01 Oct 2014 06:36:59 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:organization
 :user-agent:in-reply-to:references:mime-version
 :content-transfer-encoding:content-type;
 bh=/jM2d9pAzRzFQhfyBKTFz1+gRyQhA4uca5UO6py2DAE=;
 b=Qg0XD6/nz6uzpHzMTar3iEq+XLz5ift2q0OZAJwBZwheRFMmI5Mk2pDIG5CTXOfe+M
 fygITuw89MgbYnB1CX97AAtRspD011kLfkHS6z/ikwjiLlSeFEefQA9SOC05ci5vkGi7
 INlTrpe0negX/o5Nszc6cJjLpCS31Q2O6PUzcJqVxEgpR2GwlUU7ZrFXsxTdRPjcU6f3
 g5WOqcbveqDPhYkca2GmokZepnuaAZQGP6VRM1tfPQrDakYlh7e5RLCGadyu2lRhCwbC
 C+Eck434sOCpMO8fMaFv7Usfv8f6A/3qepDoXUxCCmvW8pvZ3tr4YiJfJVy12UCNIYmq
 eaPg==
X-Gm-Message-State: ALoCoQn3XEl1ioARu0W0BMpQI6rYo9dv0KL1QJDrLtTZ0IsA6HFBXxqRaLkSrcuJewFCRcOa3968
X-Received: by 10.194.143.69 with SMTP id sc5mr60940792wjb.26.1412170617908;
 Wed, 01 Oct 2014 06:36:57 -0700 (PDT)
Received: from xps13.localnet (guy78-3-82-239-227-177.fbx.proxad.net.
 [82.239.227.177])
 by mx.google.com with ESMTPSA id xm4sm1911690wib.9.2014.10.01.06.36.56
 for <multiple recipients>
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Wed, 01 Oct 2014 06:36:57 -0700 (PDT)
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: "Wiles, Roger Keith" <keith.wiles@windriver.com>
Date: Wed, 01 Oct 2014 15:36:45 +0200
Message-ID: <8437457.lrG762lvxy@xps13>
Organization: 6WIND
User-Agent: KMail/4.13.3 (Linux/3.15.8-1-ARCH; KDE/4.13.3; x86_64; ; )
In-Reply-To: <20140928122706.GB30445@localhost.localdomain>
References: <DAE811FA-C1F1-444D-980C-311BCCE7FF3C@windriver.com>
 <05E7C1C5-2730-4BE3-B808-6F69821F7898@windriver.com>
 <20140928122706.GB30445@localhost.localdomain>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2] rte_mempool_dump() crashes with NULL
	rte_mempool	pointer.
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Wed, 01 Oct 2014 13:30:14 -0000

2014-09-28 08:27, Neil Horman:
> On Sun, Sep 28, 2014 at 05:28:44AM +0000, Wiles, Roger Keith wrote:
> > Check the FILE *f and rte_mempool *mp pointers for NULL and
> > return plus print out a message if RTE_LIBRTE_MEMPOOL_DEBUG is enabled.
> > 
> > Signed-off-by: Keith Wiles <keith.wiles@windriver.com>
> 
> I'm fine with this, as I think passing in a NULL mempool is clearly a bug here,
> thats worth panicing over, though I wouldnt mind if we did a RTE_VERIFY_WARN
> macro here instead using what I suggested in my other note

Passing a NULL mempool to rte_mempool_dump() is a bug in the application.
If you look elsewhere in the DPDK code, you'll see that it's not common to do
such check on input parameters.
A similar discussion already happened few months ago:
	http://dpdk.org/ml/archives/dev/2014-June/003900.html

-- 
Thomas