From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 06D9C5699 for ; Mon, 10 Jul 2017 18:58:08 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 7255D20AAC; Mon, 10 Jul 2017 12:58:08 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Mon, 10 Jul 2017 12:58:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=TL+7tLSGDwN4D/z EPniqcoqOjxgEUYkv3X/fp9Yk62M=; b=fTMSFgfuppSFe08aDtNlJCjq3UKypSO piWRkCLVSDvF6+5Jzrsy6FHursH5/otaeYI1Lh4eYFOrDzt5W0iUDnh6vIecAYs8 15cfDAlZNmrUfv29ja0vjwGu4IucuAnzTgOX2VMsgf0+dY89Ao5oEBrULfXKmnlB Oh5PEg/B1F/8= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=TL+7tLSGDwN4D/zEPniqcoqOjxgEUYkv3X/fp9Yk62M=; b=e0zR8WdN HnGt7F4mtnR/3DNyLANAyWDSiFdtW7/I+snLGM6KwlaBvS1O8jS7uvrHGTry3nNd YWuoUhGwNryArtVRFY7NhU4jFYi+3keA0MxRb/ljCHew8heOgWqTP/o+OrJwYgWw NEUQ8mvlXDNKyYMrDrEH+MnIAfLUcE0Rx67PEEmAYFBc54mT7StIbcAjROrU24Hb 9hkmwCxJLhh+9kP3/SdXfLMM1qWV19n7DsKs1Xtn9kc5k9Fb+LdDMfRYhq9rh4kJ PWaYpxjTlhDmIXbnzKjsYMKcKrwifkP+To1FnRFMAg0d83pMlkbDDPS82nD5KVlM lm6TUJFk5l4MCg== X-ME-Sender: X-Sasl-enc: ixNSYfpPZ4QffZVGAU9RssJx1+VItxiVnltoiepT+koV 1499705888 Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 2667D2428E; Mon, 10 Jul 2017 12:58:08 -0400 (EDT) From: Thomas Monjalon 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 Date: Mon, 10 Jul 2017 18:58:07 +0200 Message-ID: <2015863.yNCMTj4QjI@xps> In-Reply-To: <3EB4FA525960D640B5BDFFD6A3D891267BA7DB28@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> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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:58:09 -0000 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 conversation, 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 the same > > > > > > 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_* , 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 function > > 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 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? Yes > Your concern is on the rte_eth_dev_tm_ops_get(), right? Yes, I feel you start understanding what I'm talking about ;) > 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? Yes As far as I know, the rte_flow API does not expose the ops to the application. 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.