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 E534758CB for ; Mon, 10 Jul 2017 18:47:55 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Jul 2017 09:47:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,341,1496127600"; d="scan'208";a="1150051602" Received: from irsmsx107.ger.corp.intel.com ([163.33.3.99]) by orsmga001.jf.intel.com with ESMTP; 10 Jul 2017 09:47:52 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.133]) by IRSMSX107.ger.corp.intel.com ([169.254.10.129]) with mapi id 14.03.0319.002; Mon, 10 Jul 2017 17:47:51 +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//8hCAgAAdnkA= Date: Mon, 10 Jul 2017 16:47:50 +0000 Message-ID: <3EB4FA525960D640B5BDFFD6A3D891267BA7DB28@IRSMSX108.ger.corp.intel.com> References: <1499182731-86830-1-git-send-email-cristian.dumitrescu@intel.com> <1897417.adnAssk0iV@xps> <3EB4FA525960D640B5BDFFD6A3D891267BA7DA96@IRSMSX108.ger.corp.intel.com> <1847745.dtTWFNCcJQ@xps> In-Reply-To: <1847745.dtTWFNCcJQ@xps> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNDM1MDYwZGEtNjU2OS00MWVmLTkzODItMDFlMmVkYTQ0OGFkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IklqRDB6TTBnQ1lxeFVOUDhQQk9xZWdWRGF1blwvMTdsRWxCOGZCYXVcL0tiND0ifQ== 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: Mon, 10 Jul 2017 16:47:56 -0000 > -----Original Message----- > From: Thomas Monjalon [mailto:thomas@monjalon.net] > Sent: Monday, July 10, 2017 4:54 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 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 ema= il list > > > (RFC, V1 > > > > > -V6) and privately as well. You were included in the conversation= , you > > > also > > > > > provided feed-back that we incorporated in the code, as documente= d > 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 the s= ame > > > > > mechanism that rte_flow is using and was merged in DPDK release > 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_* , ri= ght? > > > > > 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 function > specific (i.e. rte_flow, rte_tm, ...) operations structure? >=20 > 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. >=20 > Sorry for opening the discussion, I don't see the explanation in doxygen. 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? Your concern is on the rte_eth_dev_tm_ops_get(), right? This function can b= e used by the app to see if TM feature is supported (the ops output argumen= t is non-NULL) or not (the ops output argument is NULL). Here we followed t= he rte_flow pattern. Are you suggesting that we should remove it? Regards, Cristian