From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH 1/4] eventdev: introduce event driven programming model Date: Fri, 25 Nov 2016 14:09:22 +0100 Message-ID: <4424470.41x0ShzqNA@xps13> References: <1479447902-3700-1-git-send-email-jerin.jacob@caviumnetworks.com> <20161125002334.GA21048@svelivela-lt.caveonetworks.com> <20161125110053.GA149796@bricha3-MOBL3.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, harry.van.haaren@intel.com, hemant.agrawal@nxp.com, gage.eads@intel.com To: Bruce Richardson , Jerin Jacob Return-path: Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com [74.125.82.52]) by dpdk.org (Postfix) with ESMTP id 6773E591F for ; Fri, 25 Nov 2016 14:09:24 +0100 (CET) Received: by mail-wm0-f52.google.com with SMTP id f82so91502125wmf.1 for ; Fri, 25 Nov 2016 05:09:24 -0800 (PST) In-Reply-To: <20161125110053.GA149796@bricha3-MOBL3.ger.corp.intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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.