From: "Dumitrescu, Cristian" <cristian.dumitrescu@intel.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
"jerin.jacob@caviumnetworks.com" <jerin.jacob@caviumnetworks.com>,
"hemant.agrawal@nxp.com" <hemant.agrawal@nxp.com>,
"Singh, Jasvinder" <jasvinder.singh@intel.com>,
"Lu, Wenzhuo" <wenzhuo.lu@intel.com>,
"O'Driscoll, Tim" <tim.odriscoll@intel.com>,
"Glynn, Michael J" <michael.j.glynn@intel.com>,
Adrien Mazarguil <adrien.mazarguil@6wind.com>
Subject: Re: [dpdk-dev] [pull-request] next-tm 17.08 pre-rc1
Date: Tue, 11 Jul 2017 18:20:46 +0000 [thread overview]
Message-ID: <3EB4FA525960D640B5BDFFD6A3D891267BA7E5DD@IRSMSX108.ger.corp.intel.com> (raw)
In-Reply-To: <2015863.yNCMTj4QjI@xps>
> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas@monjalon.net]
> Sent: Monday, July 10, 2017 5:58 PM
> To: Dumitrescu, Cristian <cristian.dumitrescu@intel.com>
> Cc: dev@dpdk.org; jerin.jacob@caviumnetworks.com;
> hemant.agrawal@nxp.com; Singh, Jasvinder <jasvinder.singh@intel.com>;
> Lu, Wenzhuo <wenzhuo.lu@intel.com>; O'Driscoll, Tim
> <tim.odriscoll@intel.com>; Glynn, Michael J <michael.j.glynn@intel.com>;
> Adrien Mazarguil <adrien.mazarguil@6wind.com>
> Subject: Re: [dpdk-dev] [pull-request] next-tm 17.08 pre-rc1
>
> 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.
Hi Thomas,
Fixed everything you asked on the next-tm repository, please resume the pull.
I am working to send documentation as separate patch most likely next week.
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
next prev parent reply other threads:[~2017-07-11 18:21 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-04 15:38 Cristian Dumitrescu
2017-07-04 15:47 ` Thomas Monjalon
2017-07-04 16:52 ` Dumitrescu, Cristian
2017-07-04 20:21 ` Thomas Monjalon
2017-07-05 10:36 ` Dumitrescu, Cristian
2017-07-09 20:01 ` Thomas Monjalon
2017-07-10 7:43 ` Adrien Mazarguil
2017-07-10 7:51 ` Thomas Monjalon
2017-07-10 10:55 ` Dumitrescu, Cristian
2017-07-10 12:57 ` Thomas Monjalon
2017-07-10 13:21 ` Dumitrescu, Cristian
2017-07-10 13:49 ` Thomas Monjalon
2017-07-10 15:46 ` Dumitrescu, Cristian
2017-07-10 15:54 ` Thomas Monjalon
2017-07-10 16:47 ` Dumitrescu, Cristian
2017-07-10 16:58 ` Thomas Monjalon
2017-07-11 18:20 ` Dumitrescu, Cristian [this message]
2017-07-12 17:33 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3EB4FA525960D640B5BDFFD6A3D891267BA7E5DD@IRSMSX108.ger.corp.intel.com \
--to=cristian.dumitrescu@intel.com \
--cc=adrien.mazarguil@6wind.com \
--cc=dev@dpdk.org \
--cc=hemant.agrawal@nxp.com \
--cc=jasvinder.singh@intel.com \
--cc=jerin.jacob@caviumnetworks.com \
--cc=michael.j.glynn@intel.com \
--cc=thomas@monjalon.net \
--cc=tim.odriscoll@intel.com \
--cc=wenzhuo.lu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).