From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH / RFC ] ethdev: Allow rte_eth_dev_configure with zero RX/TX queues Date: Thu, 23 Jun 2016 17:53:34 +0200 Message-ID: <1881092.YNl14ETpPN@xps13> References: <20160516113349.7d2a992f@miho> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, reshma.pattan@intel.com To: Simon Kagstrom Return-path: Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) by dpdk.org (Postfix) with ESMTP id F188CC454 for ; Thu, 23 Jun 2016 17:53:36 +0200 (CEST) Received: by mail-wm0-f43.google.com with SMTP id r201so56255707wme.1 for ; Thu, 23 Jun 2016 08:53:36 -0700 (PDT) In-Reply-To: <20160516113349.7d2a992f@miho> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2016-05-16 11:33, Simon Kagstrom: > This allows releasing RX/TX queue memory. > --- > We're using DPDK 16.04 and have a test suite which performs a sequence > of separate tests of the type > > allocate mempool > rte_eth_dev_configure(port, n_rxq, n_txq, ...) > setup rx/tx queues > rte_eth_dev_start(port) > > > > stop rx/tx queues > rte_eth_dev_stop(port) > > -> rte_eth_dev_configure(port, 0, 0, ...) > > check that there are no leaks from the mempool > > The crucial point is the marked line above. This is done so that the > rx_queue_release/tx_queue_release callbacks in the PMD is called, so > that mbufs allocated by the driver is released. I think you are trying to use a side effect of rte_eth_dev_configure(). After calling rte_eth_dev_stop(), I would say the clean-up should be done by rte_eth_dev_close(). Why not using close?