From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id F091A293B for ; Thu, 30 Jun 2016 10:23:04 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP; 30 Jun 2016 01:23:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,551,1459839600"; d="scan'208";a="131103724" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga004.fm.intel.com with ESMTP; 30 Jun 2016 01:23:04 -0700 Received: from fmsmsx117.amr.corp.intel.com (10.18.116.17) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 30 Jun 2016 01:23:03 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx117.amr.corp.intel.com (10.18.116.17) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 30 Jun 2016 01:23:03 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.147]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.116]) with mapi id 14.03.0248.002; Thu, 30 Jun 2016 16:23:01 +0800 From: "Lu, Wenzhuo" To: Thomas Monjalon CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v3] ethdev: fix DCB config issue on ixgbe Thread-Index: AQHRpxXhFJOQv8PwVUaxzSEU0YQK9J/1ey4AgAEJLrCAADr8AIABVXLggAl7p2D//+EIgIAAiSKg Date: Thu, 30 Jun 2016 08:23:01 +0000 Message-ID: <6A0DE07E22DDAD4C9103DF62FEBC09090348C367@shsmsx102.ccr.corp.intel.com> References: <1460363050-27962-1-git-send-email-wenzhuo.lu@intel.com> <6A0DE07E22DDAD4C9103DF62FEBC09090348A2BD@shsmsx102.ccr.corp.intel.com> <6A0DE07E22DDAD4C9103DF62FEBC09090348C059@shsmsx102.ccr.corp.intel.com> <1501713.7uhgKcRiBR@xps13> In-Reply-To: <1501713.7uhgKcRiBR@xps13> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3] ethdev: fix DCB config issue on ixgbe 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, 30 Jun 2016 08:23:05 -0000 Hi Thomas, > -----Original Message----- > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > Sent: Thursday, June 30, 2016 3:42 PM > To: Lu, Wenzhuo > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v3] ethdev: fix DCB config issue on ixgbe >=20 > 2016-06-30 01:40, Lu, Wenzhuo: > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Lu, Wenzhuo > > > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > > > > 2016-06-23 01:04, Lu, Wenzhuo: > > > > > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > > > > > > 2016-05-06 05:33, Wenzhuo Lu: > > > > > > > +int > > > > > > > +rte_eth_dev_mq_mode_set(uint8_t port_id, > > > > > > > + enum rte_eth_rx_mq_mode rx_mq_mode, > > > > > > > + enum rte_eth_tx_mq_mode tx_mq_mode); > > > > > > > > > > > > I've really tried to think about it and I think it is more or l= ess a hack. > > > > > > First, it is not explained in the doc when we should use > > > > > > rte_eth_dev_mq_mode_set() instead of a simple call to > > > > rte_eth_dev_configure(). > > > > > > Second, I don't understand why having a function which > > > > > > configures the "multiqueue modes" without configuring properly > RSS/VMDq/DCB. > > > > > > Last, it is said that rte_eth_dev_configure() "must be invoked > > > > > > first before any other function in the Ethernet API". > > After checking the code, Honestly I'm confused. I don't find this descr= iption. >=20 > It's in the description of rte_eth_dev_configure(): > http://dpdk.org/browse/dpdk/tree/lib/librte_ether/rte_ethdev.h#n1904 The bad news is this rule is not followed. I think the reason is something = has to be done before configure. >=20 > > And on the contrary, I find rte_eth_dev_info_get is always called > > before rte_eth_dev_configure. I believe it's the problem. > > As rte_eth_dev_configure is not run, rte_eth_dev_info_get cannot get th= e > right info. > > That why I have to add a API to set the mq_mode before > rte_eth_dev_info_get. > > Does that mean all the related examples are wrong? Any opinion? Thanks. >=20 > My opinion is that this area needs a good cleanup and easy API :) OK. My solution is 1, Remove the description " rte_eth_dev_configure() must be invoked first b= efore any other function in the Ethernet API ". I think it's reasonable to = execute the rte_eth_dev_info_get before rte_eth_dev_configure, because we n= eed to get some NIC specific limitation to check if the configuration is ri= ght. 2, Add one more argument, " const struct rte_eth_conf *eth_conf ", for rte_= eth_dev_info_get, like this, void rte_eth_dev_info_get(uint8_t port_id, struct rte_eth_dev_info *dev_inf= o, const struct rte_eth_conf *eth_conf); because getting the right info depends on the configuration.