From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.droids-corp.org (zoll.droids-corp.org [94.23.50.67]) by dpdk.org (Postfix) with ESMTP id C7631B0AC for ; Fri, 16 May 2014 14:36:44 +0200 (CEST) Received: from was59-1-82-226-113-214.fbx.proxad.net ([82.226.113.214] helo=[192.168.0.10]) by mail.droids-corp.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1WlHPD-00041X-83; Fri, 16 May 2014 14:38:38 +0200 Message-ID: <5376065C.8080005@6wind.com> Date: Fri, 16 May 2014 14:36:44 +0200 From: Olivier MATZ User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.4.0 MIME-Version: 1.0 To: Stephen Hemminger , dev@dpdk.org References: <20140502234251.707598579@vyatta.com> <20140502234404.328560724@vyatta.com> In-Reply-To: <20140502234404.328560724@vyatta.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 3/5] mempool: add walk iterator X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2014 12:36:44 -0000 Hi Stephen, > +void rte_mempool_walk(void (*func)(const struct rte_mempool *, void *), > + void *arg) > +{ > + struct rte_mempool *mp = NULL; > + struct rte_mempool_list *mempool_list; > + > + if ((mempool_list = > + RTE_TAILQ_LOOKUP_BY_IDX(RTE_TAILQ_MEMPOOL, rte_mempool_list)) == NULL) { > + rte_errno = E_RTE_NO_TAILQ; > + return; > + } At the first read, I thought it was better to return -E_RTE_NO_TAILQ instead of returning void and setting rte_errno. But it seems it's the usage, for instance in rte_ring_list_dump(). Acked-by: Olivier Matz