2016-11-25 11:00, Bruce Richardson: > On Fri, Nov 25, 2016 at 05:53:34AM +0530, Jerin Jacob wrote: > > On Thu, Nov 24, 2016 at 04:35:56PM +0100, Thomas Monjalon wrote: > > > 2016-11-24 07:29, Jerin Jacob: > > > > On Wed, Nov 23, 2016 at 07:39:09PM +0100, Thomas Monjalon wrote: > > > > > 2016-11-18 11:14, Jerin Jacob: > > > > > > +#define EVENTDEV_NAME_SKELETON_PMD event_skeleton > > > > > > +/**< Skeleton event device PMD name */ > > > > > > > > > > I do not understand this #define. > > > > > > > > Applications can explicitly request the a specific driver though driver > > > > name. This will go as argument to rte_event_dev_get_dev_id(const char > > > > *name). > > > > The reason for keeping this #define in rte_eventdev.h is that, > > > > application needs to include only rte_eventdev.h not rte_eventdev_pmd.h. > > > > > > So each driver must register its name in the API? > > > Is it really needed? > > > > Otherwise how application knows the name of the driver. > > The similar scheme used in cryptodev. > > http://dpdk.org/browse/dpdk/tree/lib/librte_cryptodev/rte_cryptodev.h#n53 > > No strong opinion here. Open for suggestions. > > > > I like having a name registered. I think we need a scheme where an app > can find and use an implementation using a specific driver.
I do not like having the driver names in the API. An API should not know its drivers. If an application do some driver-specific processing, it knows the driver name as well. The driver name is written in the driver.