From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id A79B012A8 for ; Thu, 24 Nov 2016 17:24:15 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP; 24 Nov 2016 08:24:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,543,1473145200"; d="scan'208";a="195314025" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.221.64]) by fmsmga004.fm.intel.com with SMTP; 24 Nov 2016 08:24:12 -0800 Received: by (sSMTP sendmail emulation); Thu, 24 Nov 2016 16:24:11 +0000 Date: Thu, 24 Nov 2016 16:24:11 +0000 From: Bruce Richardson To: Jerin Jacob Cc: dev@dpdk.org, harry.van.haaren@intel.com, hemant.agrawal@nxp.com, gage.eads@intel.com Message-ID: <20161124162410.GA136296@bricha3-MOBL3.ger.corp.intel.com> References: <1479447902-3700-1-git-send-email-jerin.jacob@caviumnetworks.com> <1479447902-3700-2-git-send-email-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1479447902-3700-2-git-send-email-jerin.jacob@caviumnetworks.com> Organization: Intel Research and =?iso-8859-1?Q?De=ACvel?= =?iso-8859-1?Q?opment?= Ireland Ltd. User-Agent: Mutt/1.7.1 (2016-10-04) Subject: Re: [dpdk-dev] [PATCH 1/4] eventdev: introduce event driven programming model X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 16:24:16 -0000 On Fri, Nov 18, 2016 at 11:14:59AM +0530, Jerin Jacob wrote: > In a polling model, lcores poll ethdev ports and associated > rx queues directly to look for packet. In an event driven model, > by contrast, lcores call the scheduler that selects packets for > them based on programmer-specified criteria. Eventdev library > adds support for event driven programming model, which offer > applications automatic multicore scaling, dynamic load balancing, > pipelining, packet ingress order maintenance and > synchronization services to simplify application packet processing. > > By introducing event driven programming model, DPDK can support > both polling and event driven programming models for packet processing, > and applications are free to choose whatever model > (or combination of the two) that best suits their needs. > > Signed-off-by: Jerin Jacob > --- Hi Jerin, Thanks for the patchset. A few minor comments in general on the API that we found from working with it (thus far - more may follow :-) ). 1. Priorities: priorities are used in a number of places in the API, but all are uint8_t types and have their own MAX/NORMAL/MIN values. I think it would be simpler for the user just to have one priority type in the library, and use that everywhere. I suggest using RTE_EVENT_PRIORITY_* and drop the separate defines for SERVICE_PRIORITY, and QUEUE_PRIORITY etc. Ideally, I'd see things like this converted to enums too, rather than defines, but I'm not sure it's possible in this case. 2. Functions for config and setup can have their structure parameter types as const as they don't/shouldn't change the values internally. So add "const" to parameters to: rte_event_dev_configure() rte_event_queue_setup() rte_event_port_setup() rte_event_port_link() 3. in event schedule() function, the dev->schedule() function needs the dev instance pointer passed in as parameter. 4. The event op values and the event type values would be better as enums rather than as a set of #defines. Regards, /Bruce