From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 9530C93FA for ; Thu, 23 Jun 2016 03:04:05 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP; 22 Jun 2016 18:04:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,509,1459839600"; d="scan'208";a="723671282" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by FMSMGA003.fm.intel.com with ESMTP; 22 Jun 2016 18:04:04 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 22 Jun 2016 18:04:04 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.147]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.230]) with mapi id 14.03.0248.002; Thu, 23 Jun 2016 09:04:02 +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/1ey4AgAEJLrA= Date: Thu, 23 Jun 2016 01:04:01 +0000 Message-ID: <6A0DE07E22DDAD4C9103DF62FEBC090903489DBD@shsmsx102.ccr.corp.intel.com> References: <1460363050-27962-1-git-send-email-wenzhuo.lu@intel.com> <1462484040-1702-1-git-send-email-wenzhuo.lu@intel.com> <1871393.ccgjmFpxqt@xps13> In-Reply-To: <1871393.ccgjmFpxqt@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, 23 Jun 2016 01:04:06 -0000 Hi Thomas, > -----Original Message----- > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > Sent: Thursday, June 23, 2016 1:02 AM > To: Lu, Wenzhuo > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v3] ethdev: fix DCB config issue on ixgbe >=20 > 2016-05-06 05:33, Wenzhuo Lu: > > An issue is found that DCB cannot be configured on ixgbe NICs. It's > > said the TX queue number is not right. > > On ixgbe the max TX queue number is not fixed, it depends on the > > multi-queue mode. The API rte_eth_dev_configure should be used to > > configure this mode. But the input of this API includes TX queue > > number. The problem is before the mode is configured, we cannot decide > > the TX queue number. > > > > This patch adds an API to configure RX & TX multi-queue mode > > separately. After the mode is configured, the max RX & TX queue number > > is decided. Then we can set the appropriate RX & TX queue number. > [...] > > +/** > > + * Set RX & TX multi_queue mode. > > + * > > + * @param port_id > > + * The port identifier of the Ethernet device. > > + * @param rx_mq_mode > > + * RX multi_queue mode. > > + * @param tx_mq_mode > > + * TX multi_queue mode. > > + * > > + * @return > > + * - (0) if successful. > > + * - (-ENODEV) if port identifier is invalid. > > + */ > > +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); >=20 > I've really tried to think about it and I think it is more or less 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_configu= re(). > 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 befo= re any > other function in the Ethernet API". Sorry, didn't notice this announcement. >=20 > My opinion is that the primary goal of rte_eth_dev_configure() was "Embed= ding > all configuration information in a single data structure" > but it is currently configuring only speed and some flow steering (only R= SS, > VMDq, DCB and flow director). > This bug and the state of the ethdev API clearly shows that we must have = one > function per feature (or group of features) and drop rte_eth_dev_configur= e(). >=20 > You can argue it is a just a personal feeling and this comment comes late= , but I > promise it is not easy to give a negative opinion because of design persp= ective. > I strongly feel we must stop workarounding the ethdev API issues and star= t really > fixing it. >=20 > Hope you understand and agree to work on a new API. I have the same feeling with you. There's some problem with rte_eth_dev_con= figure. So this patch is a workaround more than a real fix. But the problem is this API has already been used. What I think is could we= take this workaround as a first step. It need not ask the APP to change to= o much. Then we can discuss how could we rework on a new API or APIs. We all know t= he change in rte layer is not easy and need to be very careful :)