From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=c/e0EVpcWMW79mt6ZYgPD2sP8lZa5e2/QMxWB6kOXyY=; b=a2TvMjm7S74aeHv15/p8k5qzIrAe4yDtqkXAFOLnx69OFMcVZnS2QPEY8M5PhgGTKs FmJ/coFYGtB5phrM3cD3jxlceDLL/XPi8BS8YB5LNiQzUOUU1AdUMBo68C0WYpf8krlk RePr5DaKP0G/TV9JFEdzaSwMTcMm+VBsjd9ZcGCdvsJTEgZk4pckHWuj4qGtqwTCeDHK jnS6BFSc3FhPzJPRwn3Qn5zWv6NgDL1j0Vw3VzPAsk/O7K19jw7NIkjZTfeyGDPdgnvz pHSHMnzR2oI6Q4wL3dieMIgvcqnQd7mZk793j3Zy7Ume86CSN2tRt77sKBDFqfLtpqPb uRfA== 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:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=c/e0EVpcWMW79mt6ZYgPD2sP8lZa5e2/QMxWB6kOXyY=; b=DZauqpw9Yd+UnxDS4TDSfXEE2wfHdgjmENqJyAS8wttWw1wajHTI2jFSBYXIiM7K9h cTPjTpd6nYDRhMIpxoIV7efinO7zFTxnWJcIZMXbdW6VCzgz9GsDyz7XkQwX12cDYZ1/ u0RYTCXLdsbhJ0DJIPjEjEh88zRmUyIrmh7it6GjStkvGhKDfwcX+UHm2YEYoq83qNHn 2iSGvT/qvc7IRqatDCicGI9rIht5gNCaL0Gh/zyRACQnV0QJcHY1Lze0zf13LFkRwI6Z xFIGkjjlzOTP6Wua46hzLbWd8Yp+3Ftdaepog9p6kkY6THszc7SvePdgyUiEzvmt0QXb h/Vw== X-Gm-Message-State: ALyK8tImOq0o+GssYbHtL78B1/if6gGV+tf6HswERrL9i74g2P6H4CMxEN8ienTRdv5FHDrN X-Received: by 10.194.68.4 with SMTP id r4mr30196435wjt.77.1466697216520; Thu, 23 Jun 2016 08:53:36 -0700 (PDT) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id d192sm4490842wmd.14.2016.06.23.08.53.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Jun 2016 08:53:35 -0700 (PDT) From: Thomas Monjalon To: Simon Kagstrom Cc: dev@dpdk.org, reshma.pattan@intel.com Date: Thu, 23 Jun 2016 17:53:34 +0200 Message-ID: <1881092.YNl14ETpPN@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <20160516113349.7d2a992f@miho> References: <20160516113349.7d2a992f@miho> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH / RFC ] ethdev: Allow rte_eth_dev_configure with zero RX/TX queues 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: Thu, 23 Jun 2016 15:53:37 -0000 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?