From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ernst.netinsight.se (ernst.netinsight.se [194.16.221.21]) by dpdk.org (Postfix) with SMTP id D8F948D90 for ; Mon, 16 May 2016 12:33:01 +0200 (CEST) Received: from [10.100.1.152] (unverified [10.100.1.152]) by ernst.netinsight.se (EMWAC SMTPRS 0.83) with SMTP id ; Mon, 16 May 2016 12:33:16 +0200 To: "Pattan, Reshma" , "dev@dpdk.org" , "thomas.monjalon@6wind.com" References: <20160516113349.7d2a992f@miho> <3AEA2BF9852C6F48A459DA490692831F0102622D@IRSMSX109.ger.corp.intel.com> From: =?UTF-8?Q?Simon_K=c3=a5gstr=c3=b6m?= Message-ID: <5739A1D4.6010003@netinsight.net> Date: Mon, 16 May 2016 12:32:52 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <3AEA2BF9852C6F48A459DA490692831F0102622D@IRSMSX109.ger.corp.intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit 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: Mon, 16 May 2016 10:33:02 -0000 On 2016-05-16 12:24, Pattan, Reshma wrote: >> diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index >> a31018e..5481d45 100644 >> --- a/lib/librte_ether/rte_ethdev.c >> +++ b/lib/librte_ether/rte_ethdev.c >> @@ -944,11 +944,6 @@ rte_eth_dev_configure(uint8_t port_id, uint16_t >> nb_rx_q, uint16_t nb_tx_q, >> */ >> (*dev->dev_ops->dev_infos_get)(dev, &dev_info); >> >> - if (nb_rx_q == 0 && nb_tx_q == 0) { >> - RTE_PMD_DEBUG_TRACE("ethdev port_id=%d both rx and tx >> queue cannot be 0\n", port_id); >> - return -EINVAL; >> - } > > This was added to allow devices, at least with one direction (RX/TX) supported. As, devices with both directions disabled doesn't make sense right? Well, not for running them, no. But this is a part of the shutdown procedure between tests (I should have been more clear I guess). As far as I can see in the code, rte_eth_dev_configure() is the only point which actually calls {rx,tx}_queue_release(), so without this call, we can't get the memory pool full again. So basically, our test suite looks like rte_eth_dev_configure(port, 32, 32); // For example rte_eth_dev_configure(port, 0, 0); Check that the mempool is full again rte_eth_dev_configure(port, 32, 32); rte_eth_dev_configure(port, 0, 0); Check that the mempool is full again ... And without this fix, the mempool check fails since a few of the buffers are tied up in the RX descriptor ring of the PMD. // Simon