From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id D40656CAF for ; Mon, 16 May 2016 14:43:50 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP; 16 May 2016 05:43:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,627,1455004800"; d="scan'208";a="967873501" Received: from irsmsx109.ger.corp.intel.com ([163.33.3.23]) by fmsmga001.fm.intel.com with ESMTP; 16 May 2016 05:43:48 -0700 Received: from irsmsx111.ger.corp.intel.com (10.108.20.4) by IRSMSX109.ger.corp.intel.com (163.33.3.23) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 16 May 2016 13:43:47 +0100 Received: from irsmsx109.ger.corp.intel.com ([169.254.13.120]) by irsmsx111.ger.corp.intel.com ([169.254.2.233]) with mapi id 14.03.0248.002; Mon, 16 May 2016 13:43:47 +0100 From: "Pattan, Reshma" To: =?iso-8859-1?Q?Simon_K=E5gstr=F6m?= , "dev@dpdk.org" , "thomas.monjalon@6wind.com" Thread-Topic: [PATCH / RFC ] ethdev: Allow rte_eth_dev_configure with zero RX/TX queues Thread-Index: AQHRr1YcbhooDAHe40O3UEUsiK4NyZ+7U93g///5TACAADIuoA== Date: Mon, 16 May 2016 12:43:46 +0000 Message-ID: <3AEA2BF9852C6F48A459DA490692831F010262FA@IRSMSX109.ger.corp.intel.com> References: <20160516113349.7d2a992f@miho> <3AEA2BF9852C6F48A459DA490692831F0102622D@IRSMSX109.ger.corp.intel.com> <5739A1D4.6010003@netinsight.net> In-Reply-To: <5739A1D4.6010003@netinsight.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMjM3YTRhOTItMWQyMi00ZTcwLWEzYWEtZWY3OWQ4ZWEyODZkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IlhPZWVTWDdsdTBIRHF2UjFCUmQ0TTFKVEZuYm1ZWWU3czZKWWk5akQ3ZW89In0= x-ctpclassification: CTP_IC x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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 12:43:51 -0000 > -----Original Message----- > From: Simon K=E5gstr=F6m [mailto:simon.kagstrom@netinsight.net] > Sent: Monday, May 16, 2016 11:33 AM > To: Pattan, Reshma ; dev@dpdk.org; > thomas.monjalon@6wind.com > Subject: Re: [PATCH / RFC ] ethdev: Allow rte_eth_dev_configure with zero > RX/TX queues >=20 > 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 =3D=3D 0 && nb_tx_q =3D=3D 0) { > >> - RTE_PMD_DEBUG_TRACE("ethdev port_id=3D%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? >=20 > Well, not for running them, no. But this is a part of the shutdown proced= ure > between tests (I should have been more clear I guess). >=20 Yes I understood this. But I am not sure if you can use rte_eth_dev_configu= re(port, 0, 0) to free the resources. Can you check if you can use rte_eth_dev_rx_queue_stop/ rte_eth_dev_tx_queu= e_stop to achieve the same, because they do take care of releasing mbufs, but doesn't free the queue's sw-ring and queue. Thanks, Reshma