From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 87D52C668 for ; Fri, 24 Jun 2016 02:46:06 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 23 Jun 2016 17:45:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,518,1459839600"; d="scan'208";a="982244531" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga001.jf.intel.com with ESMTP; 23 Jun 2016 17:45:57 -0700 Received: from fmsmsx111.amr.corp.intel.com (10.18.116.5) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 23 Jun 2016 17:45:57 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx111.amr.corp.intel.com (10.18.116.5) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 23 Jun 2016 17:45:56 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.147]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.181]) with mapi id 14.03.0248.002; Fri, 24 Jun 2016 08:45:55 +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/1ey4AgAEJLrCAADr8AIABVXLg Date: Fri, 24 Jun 2016 00:45:54 +0000 Message-ID: <6A0DE07E22DDAD4C9103DF62FEBC09090348A2BD@shsmsx102.ccr.corp.intel.com> References: <1460363050-27962-1-git-send-email-wenzhuo.lu@intel.com> <1871393.ccgjmFpxqt@xps13> <6A0DE07E22DDAD4C9103DF62FEBC090903489DBD@shsmsx102.ccr.corp.intel.com> <3037324.FL8zRspYFl@xps13> In-Reply-To: <3037324.FL8zRspYFl@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: Fri, 24 Jun 2016 00:46:07 -0000 Hi Thomas, > -----Original Message----- > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > Sent: Thursday, June 23, 2016 8:22 PM > To: Lu, Wenzhuo > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v3] ethdev: fix DCB config issue on ixgbe >=20 > 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 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_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". > > Sorry, didn't notice this announcement. > > > > > My opinion is that the primary goal of rte_eth_dev_configure() was > > > "Embedding all configuration information in a single data structure" > > > but it is currently configuring only speed and some flow steering > > > (only RSS, 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_configure(). > > > > > > 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 > perspective. > > > I strongly feel we must stop workarounding the ethdev API issues and > > > start really fixing it. > > > > > > 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_configure. 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 coul= d we take > this workaround as a first step. It need not ask the APP to change too mu= ch. > > Then we can discuss how could we rework on a new API or APIs. We all > > know the change in rte layer is not easy and need to be very careful > > :) >=20 > We probably need more opinions. > I think it is not a good idea to introduce a new API only to workaround a= nother > one and keep confusion in place. > A similar approach which looks better is to introduce a new API which wil= l partly > replace the old one and will remain a good one when the old API will be > completely removed. > In other words, we should introduce a good API for flow steering as soon = as > possible and deprecate rte_eth_dev_configure(). I think you're right. The workaround can make things confusing. Better to i= ntroduce a new API to replace rte_eth_dev_configure.