> -----Original Message-----
> From: Thomas Monjalon [mailto:[email protected]]
> Sent: Monday, July 10, 2017 4:54 PM
> To: Dumitrescu, Cristian <[email protected]>
> Cc: [email protected]; [email protected];
> [email protected]; Singh, Jasvinder <[email protected]>;
> Lu, Wenzhuo <[email protected]>; O'Driscoll, Tim
> <[email protected]>; Glynn, Michael J <[email protected]>;
> Adrien Mazarguil <[email protected]>
> Subject: Re: [dpdk-dev] [pull-request] next-tm 17.08 pre-rc1
> 
> 10/07/2017 17:46, Dumitrescu, Cristian:
> > From: Thomas Monjalon [mailto:[email protected]]
> > > 10/07/2017 15:21, Dumitrescu, Cristian:
> > > > From: Thomas Monjalon [mailto:[email protected]]
> > > > > 10/07/2017 12:55, Dumitrescu, Cristian:
> > > > > > From: Thomas Monjalon [mailto:[email protected]]
> > > > > > > 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?

Your concern is on the rte_eth_dev_tm_ops_get(), right? 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?

Regards,
Cristian

Reply via email to