From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 44E481C52 for ; Mon, 17 Oct 2016 22:26:43 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP; 17 Oct 2016 13:26:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,358,1473145200"; d="scan'208";a="1071723240" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga002.fm.intel.com with ESMTP; 17 Oct 2016 13:26:35 -0700 Received: from fmsmsx155.amr.corp.intel.com (10.18.116.71) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 17 Oct 2016 13:26:34 -0700 Received: from fmsmsx108.amr.corp.intel.com ([169.254.9.94]) by FMSMSX155.amr.corp.intel.com ([169.254.5.8]) with mapi id 14.03.0248.002; Mon, 17 Oct 2016 13:26:34 -0700 From: "Eads, Gage" To: Jerin Jacob CC: "dev@dpdk.org" , "thomas.monjalon@6wind.com" , "Richardson, Bruce" , "Vangati, Narender" , "hemant.agrawal@nxp.com" Thread-Topic: [dpdk-dev] [RFC] [PATCH v2] libeventdev: event driven programming model framework for DPDK Thread-Index: AQHSKC2cH6v3wV0OpkCV4A0R6JpsFaCtGILA Date: Mon, 17 Oct 2016 20:26:33 +0000 Message-ID: <9184057F7FC11744A2107296B6B8EB1E01E18A80@FMSMSX108.amr.corp.intel.com> References: <20161005072451.GA2358@localhost.localdomain> <1476214216-31982-1-git-send-email-jerin.jacob@caviumnetworks.com> <9184057F7FC11744A2107296B6B8EB1E01E179E0@FMSMSX108.amr.corp.intel.com> <20161017041812.GA3543@localhost.localdomain> In-Reply-To: <20161017041812.GA3543@localhost.localdomain> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYmZlMTI2MTAtMTBlYy00YTE1LWIzNjctZjMyOTcyODBhYzhiIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6Inh0SVI3ZXI4Z0lpVnkwT1hPUzY2QlBKVVVoNEhcL0UxOWY0aW9lZlZsZFNVPSJ9 x-ctpclassification: CTP_IC x-originating-ip: [10.1.200.108] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [RFC] [PATCH v2] libeventdev: event driven programming model framework for DPDK 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: Mon, 17 Oct 2016 20:26:45 -0000 > -----Original Message----- > From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com] > Sent: Sunday, October 16, 2016 11:18 PM > To: Eads, Gage > Cc: dev@dpdk.org; thomas.monjalon@6wind.com; Richardson, Bruce > ; Vangati, Narender > ; hemant.agrawal@nxp.com > Subject: Re: [dpdk-dev] [RFC] [PATCH v2] libeventdev: event driven > programming model framework for DPDK > =20 > On Fri, Oct 14, 2016 at 03:00:57PM +0000, Eads, Gage wrote: > > Thanks Jerin, this looks good. I've put a few notes/questions inline. > =20 > Thanks Gage. > =20 > > > > > + > > > +/** > > > + * Get the device identifier for the named event device. > > > + * > > > + * @param name > > > + * Event device name to select the event device identifier. > > > + * > > > + * @return > > > + * Returns event device identifier on success. > > > + * - <0: Failure to find named event device. > > > + */ > > > +extern uint8_t > > > +rte_event_dev_get_dev_id(const char *name); > > > > This return type should be int8_t, or some signed type, to support the= failure > case. > =20 > Makes sense. I will change to int to make consistent with > rte_cryptodev_get_dev_id() > =20 > > > > > +}; > > > + > > > +/** > > > + * Schedule one or more events in the event dev. > > > + * > > > + * An event dev implementation may define this is a NOOP, for > > > instance if + * the event dev performs its scheduling in hardware. > > > + * > > > + * @param dev_id > > > + * The identifier of the device. > > > + */ > > > +extern void > > > +rte_event_schedule(uint8_t dev_id); > > > > One idea: Have the function return the number of scheduled packets (or= 0 for > implementations that do scheduling in hardware). This could be a helpful > diagnostic for the software scheduler. > =20 > How about returning an implementation specific value ? > Rather than defining certain function associated with returned value. > Just to make sure it works with all HW/SW implementations. Something li= ke > below, > =20 > /** > * Schedule one or more events in the event dev. > * > * An event dev implementation may define this is a NOOP, for instance i= f > * the event dev performs its scheduling in hardware. > * > * @param dev_id > * The identifier of the device. > * @return > * Implementation specific value from the event driver for diagnostic = purpose > */ > extern int > rte_event_schedule(uint8_t dev_id); > =20 > =20 That's fine by me. I also had a comment on the return value of rte_event_dev_info_get() in my = previous email: "I'm wondering if this return type should be int, so we can= return an error if the dev_id is invalid." What do you think? Thanks, Gage > =20 > =20