From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id C6AF72E8B for ; Tue, 11 Jul 2017 20:21:12 +0200 (CEST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Jul 2017 11:20:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,347,1496127600"; d="scan'208";a="107065447" Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by orsmga004.jf.intel.com with ESMTP; 11 Jul 2017 11:20:48 -0700 Received: from irsmsx111.ger.corp.intel.com (10.108.20.4) by IRSMSX104.ger.corp.intel.com (163.33.3.159) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 11 Jul 2017 19:20:47 +0100 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.133]) by irsmsx111.ger.corp.intel.com ([169.254.2.25]) with mapi id 14.03.0319.002; Tue, 11 Jul 2017 19:20:47 +0100 From: "Dumitrescu, Cristian" To: Thomas Monjalon CC: "dev@dpdk.org" , "jerin.jacob@caviumnetworks.com" , "hemant.agrawal@nxp.com" , "Singh, Jasvinder" , "Lu, Wenzhuo" , "O'Driscoll, Tim" , "Glynn, Michael J" , Adrien Mazarguil Thread-Topic: [dpdk-dev] [pull-request] next-tm 17.08 pre-rc1 Thread-Index: AQHS9NvD1n6mRK62C0yv42q5/ePxaaJL4dWAgAD3fpCAACRYAIAAFwzA///3i4CAADDJEP//8hCAgAAdnkD///QzgAA3DDIQ Date: Tue, 11 Jul 2017 18:20:46 +0000 Message-ID: <3EB4FA525960D640B5BDFFD6A3D891267BA7E5DD@IRSMSX108.ger.corp.intel.com> References: <1499182731-86830-1-git-send-email-cristian.dumitrescu@intel.com> <1847745.dtTWFNCcJQ@xps> <3EB4FA525960D640B5BDFFD6A3D891267BA7DB28@IRSMSX108.ger.corp.intel.com> <2015863.yNCMTj4QjI@xps> In-Reply-To: <2015863.yNCMTj4QjI@xps> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMTRkNGVhYzAtNDI1ZC00NGY4LTgyN2UtZGQ5ZmJjNjNjMzE1IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IjJsRUlhVGtVYzVRdXBhZFNNTHpxaTdNdWx5SmNjczd2dnZkWUdINlwvK2c4PSJ9 x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [pull-request] next-tm 17.08 pre-rc1 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jul 2017 18:21:13 -0000 > -----Original Message----- > From: Thomas Monjalon [mailto:thomas@monjalon.net] > Sent: Monday, July 10, 2017 5:58 PM > To: Dumitrescu, Cristian > Cc: dev@dpdk.org; jerin.jacob@caviumnetworks.com; > hemant.agrawal@nxp.com; Singh, Jasvinder ; > Lu, Wenzhuo ; O'Driscoll, Tim > ; Glynn, Michael J ; > Adrien Mazarguil > Subject: Re: [dpdk-dev] [pull-request] next-tm 17.08 pre-rc1 >=20 > 10/07/2017 18:47, Dumitrescu, Cristian: > > From: Thomas Monjalon [mailto:thomas@monjalon.net] > > > 10/07/2017 17:46, Dumitrescu, Cristian: > > > > From: Thomas Monjalon [mailto:thomas@monjalon.net] > > > > > 10/07/2017 15:21, Dumitrescu, Cristian: > > > > > > From: Thomas Monjalon [mailto:thomas@monjalon.net] > > > > > > > 10/07/2017 12:55, Dumitrescu, Cristian: > > > > > > > > From: Thomas Monjalon [mailto:thomas@monjalon.net] > > > > > > > > > 2/ Some functions are exposed in the API to query the ops= . > > > > > > > > > It seems dangerous and useless: > > > > > > > > > - rte_eth_dev_tm_ops_get > > > > > > > > > - rte_tm_ops_get > > > > > > > > > > > > > > > > Thomas, hopefully this is a misunderstanding on your side := (((. > > > > > > > > > > > > > > Don't worry :) > > > > > > > > > > > > > > > This is a critical point that we debated ad nauseam on this= email > list > > > > > (RFC, V1 > > > > > > > -V6) and privately as well. You were included in the conversa= tion, > you > > > > > also > > > > > > > provided feed-back that we incorporated in the code, as > documented > > > in > > > > > the > > > > > > > patchset history log. > > > > > > > > > > > > > > > > This is simply the mechanism that we (including you) agreed= to > use > > > for > > > > > > > modularizing the DPDK ethdev by adding new functionality in a > > > modular > > > > > plug- > > > > > > > in way using separate namespace. This is the exact clone of t= he > same > > > > > > > mechanism that rte_flow is using and was merged in DPDK relea= se > > > 17.02. > > > > > > > Why this change on the fundamentals now? > > > > > > > > > > > > > > > > Hopefully, it is just misunderstanding. > > > > > > > > > > > > > > I mean that only the drivers need to get the ops. > > > > > > > The applications are using some dedicated functions rte_tm_* = , > right? > > > > > > > So the applications does not need direct ops access with > > > > > > > rte_eth_dev_tm_ops_get()? > > > > > > > Sorry if it is my misunderstanding. > > > > > > > > > > > > > > About rte_tm_ops_get, I don't remember why I talked about it. > > > > > > > It seems exposed only to drivers. My mistake. No issue there. > > > > > > > > > > > > OK, so we're good then? > > > > > > > > > > Not exactly. In my understanding, rte_eth_dev_tm_ops_get() is > useless. > > > > > Should it be removed then? > > > > > > > > Why do you think it is useless? How would the driver get the functi= on > > > specific (i.e. rte_flow, rte_tm, ...) operations structure? > > > > > > The drivers get the structure via rte_tm_ops_get() function which is > > > in the well named file rte_tm_driver.h > > > My question is about rte_eth_dev_tm_ops_get() function which is > > > in the file rte_ethdev.h. > > > Please explain the difference between both functions and why > > > rte_eth_dev_tm_ops_get() is needed. > > > > > > Sorry for opening the discussion, I don't see the explanation in doxy= gen. > > > > Hi Thomas, > > > > Yes, you're right: drivers get the TM ops structure through the > rte_tm_ops_get(), which directly accesses the dev_ops. You are fine with > this, right? >=20 > Yes >=20 > > Your concern is on the rte_eth_dev_tm_ops_get(), right? >=20 > Yes, I feel you start understanding what I'm talking about ;) >=20 > > This function can be used by the app to see if TM feature is supported = (the > ops output argument is non-NULL) or not (the ops output argument is NULL)= . > Here we followed the rte_flow pattern. Are you suggesting that we should > remove it? >=20 > Yes > As far as I know, the rte_flow API does not expose the ops to the applica= tion. > Can we have the drivers capabilities in a different way? > In general, capabilities are richer than just checking there > is a function. I think it is better to have flags. > Anyway, capabilities API can be discussed after 17.08 merge. Hi Thomas, Fixed everything you asked on the next-tm repository, please resume the pul= l. I am working to send documentation as separate patch most likely next week.= =20 Changes: 1. rte_ethdev.[hc]: removed unused function rte_eth_dev_tm_ops_get() 2. doc/api/doxy-api-index.md: removed reference to rte_tm_driver.h 3. rte_tm.h: added EXPERIMENTAL warning at the top of the file 4. MANTAINERS: added EXPERIMENTAL tag for the Traffic Management API 5. Fixed clang warnings due to unused static function Thanks! Regards, Cristian