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 5EF2B201 for ; Mon, 24 Jul 2017 15:36:34 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jul 2017 06:36:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,407,1496127600"; d="scan'208";a="114820732" Received: from irsmsx105.ger.corp.intel.com ([163.33.3.28]) by orsmga002.jf.intel.com with ESMTP; 24 Jul 2017 06:36:31 -0700 Received: from irsmsx112.ger.corp.intel.com (10.108.20.5) by irsmsx105.ger.corp.intel.com (163.33.3.28) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 24 Jul 2017 14:33:46 +0100 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.211]) by irsmsx112.ger.corp.intel.com ([169.254.1.42]) with mapi id 14.03.0319.002; Mon, 24 Jul 2017 14:33:46 +0100 From: "Van Haaren, Harry" To: Nipun Gupta , "Rao, Nikhil" , "jerin.jacob@caviumnetworks.com" CC: "Eads, Gage" , "dev@dpdk.org" , "thomas@monjalon.net" , "Richardson, Bruce" , Hemant Agrawal , "Vangati, Narender" , "Gujjar, Abhinandan S" Thread-Topic: [PATCH 1/2] eventdev: add event adapter for ethernet Rx queues Thread-Index: AQHS9loYW0A+jeziw0SDbe1hI3ujH6JizMgAgAAULXCAAB0EAIAAF+gA Date: Mon, 24 Jul 2017 13:33:45 +0000 Message-ID: References: <29140c16-909a-1b9a-7391-481f900bd13c@intel.com> <1499377952-5306-1-git-send-email-nikhil.rao@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiODE1YWNjZjYtMzRhMy00OGQyLWFkMzMtYmE1YWFhYWY2MzM5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6Ijc3XC95ZjJUUlYzcFJSdlJcL04wazJTazJ6a1NRYW5ob2NWaXlrUHVVNWZOTT0ifQ== x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 1/2] eventdev: add event adapter for ethernet Rx queues X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Jul 2017 13:36:35 -0000 > From: Nipun Gupta [mailto:nipun.gupta@nxp.com] > Sent: Monday, July 24, 2017 2:07 PM > To: Van Haaren, Harry ; Rao, Nikhil ; > jerin.jacob@caviumnetworks.com > Cc: Eads, Gage ; dev@dpdk.org; thomas@monjalon.net; = Richardson, Bruce > ; Hemant Agrawal ; Va= ngati, Narender > ; Gujjar, Abhinandan S > Subject: RE: [PATCH 1/2] eventdev: add event adapter for ethernet Rx queu= es >=20 >=20 >=20 > > -----Original Message----- > > From: Van Haaren, Harry [mailto:harry.van.haaren@intel.com] > > Sent: Monday, July 24, 2017 16:03 > > To: Nipun Gupta ; Rao, Nikhil ; > > jerin.jacob@caviumnetworks.com > > Cc: Eads, Gage ; dev@dpdk.org; > > thomas@monjalon.net; Richardson, Bruce ; > > Hemant Agrawal ; Vangati, Narender > > ; Gujjar, Abhinandan S > > > > Subject: RE: [PATCH 1/2] eventdev: add event adapter for ethernet Rx qu= eues > > > > > From: Nipun Gupta [mailto:nipun.gupta@nxp.com] > > > Sent: Monday, July 24, 2017 11:11 AM > > > To: Rao, Nikhil ; jerin.jacob@caviumnetworks.co= m > > > Cc: Eads, Gage ; dev@dpdk.org; > > thomas@monjalon.net; Richardson, Bruce > > > ; Van Haaren, Harry > > ; Hemant > > > Agrawal ; Vangati, Narender > > ; Gujjar, > > > Abhinandan S > > > Subject: RE: [PATCH 1/2] eventdev: add event adapter for ethernet Rx = queues > > > > > > Hi Nikhil/Edas, > > > > Hi All, > > > > I'll reply on the service-cores topic, and leave the config to those mo= re involved > > and familiar with them than I :) > > > > > > -----Original Message----- > > > > From: Nikhil Rao [mailto:nikhil.rao@intel.com] > > > > Sent: Friday, July 07, 2017 3:23 > > > > To: jerin.jacob@caviumnetworks.com > > > > Cc: gage.eads@intel.com; dev@dpdk.org; thomas@monjalon.net; > > > > bruce.richardson@intel.com; harry.van.haaren@intel.com; Hemant Agra= wal > > > > ; Nipun Gupta ; > > > > narender.vangati@intel.com; Nikhil Rao ; > > Abhinandan > > > > Gujjar > > > > Subject: [PATCH 1/2] eventdev: add event adapter for ethernet Rx qu= eues > > > > > > > > Eventdev-based networking applications require a component to deque= ue > > > > packets from NIC Rx queues and inject them into eventdev queues[1].= While > > > > some platforms (e.g. Cavium Octeontx) do this operation in hardware= , other > > > > platforms use software. > > > > > > > > This patchset introduces an ethernet Rx event adapter that dequeues= packets > > > > from ethernet devices and enqueues them to event devices. It is bas= ed on > > > > a previous RFC[2]. > > > > > > > > The adapter is designed to work with the EAL service core[3]. If > > > > an application determines that the adapter is required, it can regi= ster and > > > > launch it on a service core. Alternatively, this adapter can serve = as a > > > > template for applications to design customer ethernet Rx event adap= ters > > > > better suited to their needs. > > > > > > > > The adapter can service multiple ethernet devices and queues. Each = queue is > > > > configured with a servicing weight to control the relative frequenc= y with > > > > which the adapter polls the queue, and the event fields to use when > > > > constructing packet events. The adapter has two modes for programmi= ng an > > > > event's flow ID: use a static per-queue user-specified value or use= the RSS > > > > hash. > > > > > > > > A detailed description of the adapter is contained in the header's > > > > comments. > > > > > > > > [1] http://dpdk.org/ml/archives/dev/2017-May/065341.html > > > > [2] http://dpdk.org/ml/archives/dev/2017-May/065539.html > > > > [3] http://dpdk.org/ml/archives/dev/2017-July/069782.html > > > > > > > > Signed-off-by: Nikhil Rao > > > > Signed-off-by: Gage Eads > > > > Signed-off-by: Abhinandan Gujjar > > > > --- > > > > > > > > v2: > > > > Thanks Jerin for review - below is a list of changes you > > > > suggested. > > > > > > > > - all public symbols are started with rte_event_. > > > > - Add Doxygen reference with @see. > > > > - Mention setting of ev.event_type. > > > > - Mention adapter to service function mapping. > > > > - Remove rte_eth_rx_event_adapter_dev_add/del(). > > > > - Change rx_queuee_id to int32_t and use -1 to denote all Rx queues= . > > > > - Add rte_eth_event_rx_queue_del(). > > > > > > > > Other changes > > > > - Remove adapter's run function (rte_event_eth_rx_adapter_run()) fr= om > > > > the public interface. The adapter internally uses it to create a > > > > service. > > > > - Add a blocked cycle count to stats. Further description is contai= ned > > > > in the header. > > > > - Minor struct renames rte_event_eth_rx_adapter_config -> .._conf > > > > --- > > > > lib/librte_eventdev/rte_event_eth_rx_adapter.h | 301 +++++++++ > > > > lib/librte_eventdev/rte_event_eth_rx_adapter.c | 825 > > > > +++++++++++++++++++++++++ > > > > lib/librte_eventdev/rte_eventdev_version.map | 13 + > > > > lib/Makefile | 2 +- > > > > lib/librte_eventdev/Makefile | 2 + > > > > 5 files changed, 1142 insertions(+), 1 deletion(-) > > > > create mode 100644 lib/librte_eventdev/rte_event_eth_rx_adapter.h > > > > create mode 100644 lib/librte_eventdev/rte_event_eth_rx_adapter.c > > > > > > > > diff --git a/lib/librte_eventdev/rte_event_eth_rx_adapter.h > > > > b/lib/librte_eventdev/rte_event_eth_rx_adapter.h > > > > new file mode 100644 > > > > index 000000000..5ccd0bd24 > > > > --- /dev/null > > > > +++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.h > > > > @@ -0,0 +1,301 @@ > > > > +/* > > > > + * Copyright(c) 2017 Intel Corporation. All rights reserved. > > > > + * All rights reserved. > > > > + * > > > > + * Redistribution and use in source and binary forms, with or wi= thout > > > > + * modification, are permitted provided that the following condi= tions > > > > + * are met: > > > > + * > > > > + * * Redistributions of source code must retain the above copy= right > > > > + * notice, this list of conditions and the following disclai= mer. > > > > + * * Redistributions in binary form must reproduce the above c= opyright > > > > + * notice, this list of conditions and the following disclai= mer in > > > > + * the documentation and/or other materials provided with th= e > > > > + * distribution. > > > > + * * Neither the name of Intel Corporation nor the names of it= s > > > > + * contributors may be used to endorse or promote products d= erived > > > > + * from this software without specific prior written permiss= ion. > > > > + * > > > > + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND > > > > CONTRIBUTORS > > > > + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT > > NOT > > > > + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND > > > > FITNESS FOR > > > > + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE > > > > COPYRIGHT > > > > + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, > > > > INCIDENTAL, > > > > + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, > > BUT > > > > NOT > > > > + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; > > LOSS > > > > OF USE, > > > > + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED > > AND > > > > ON ANY > > > > + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, O= R > > > > TORT > > > > + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT > > OF > > > > THE USE > > > > + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH > > > > DAMAGE. > > > > + */ > > > > + > > > > +#ifndef _RTE_EVENT_ETH_RX_ADAPTER_ > > > > +#define _RTE_EVENT_ETH_RX_ADAPTER_ > > > > + > > > > +/** > > > > + * @file > > > > + * > > > > + * RTE Event Ethernet Rx Adapter > > > > + * > > > > + * An eventdev-based packet processing application enqueues/dequeu= es > > mbufs > > > > + * to/from the event device. The ethernet Rx event adapter's role = is to > > transfer > > > > + * mbufs from the ethernet receive queues managed by DPDK to an ev= ent > > > > device. > > > > + * The application uses the adapter APIs to configure the packet f= low > > between > > > > + * the ethernet devices and event devices. The adapter is designed= to work > > with > > > > + * the EAL service cores. The adapter's work can be parallelized b= y dividing > > the > > > > + * NIC Rx queues among multiple adapter services that run in paral= lel. > > > > > > First of all, apologies for commenting late on this. I am going throu= gh this > > patchset and > > > have some concerns over this. > > > It is mentioned that "The adapter is designed to work with * the EAL = service > > cores" > > > Does this mean that the adapter cannot function without service core? > > > In the case where Ethdev HW is capable of injecting the packet to com= patible > > HW eventdev > > > driver, there is no service > > > required. It seems this patchset does not take care of this use-case = or maybe I > > am missing > > > something here? > > > > > > The "service cores" is a method of abstracting lcore requirements. In s= hort, with > > a SW PMD, a service core is required to perform the event scheduling. W= ith the > > HW use case as you describe, no core is required. So in the HW case, no= service > > cores are allocated in DPDK, and as a result, all your cores are availa= ble to the > > application. > > > > If I understand correctly, the generic "Event Ethernet RX Adapter" will= register a > > service which needs to be run (by a service core) in order to perform S= W polling > > of the NIC, and enqueue to the eventdev. > > > > In order to support the hardware use-case, no service is registered and= no > > service lcores required. The HW is allowed to perform the Ethdev -> Eve= ntdev > > enqueue. > > > > Hope that makes sense! -Harry >=20 > With function pointer based approach the adapter calls will be propagated= to eventdev PMD > so > here won't this way the event driver will be responsible for registering = the service? I > don't think the > generic 'Event ethernet Rx adapter' would register a service with this mo= del. Good point - I should dig into code before replying. Yes, with the function= -pointer / PMD model allows the PMD to decide if it requires a service. Thanks for the correction! > Thanks, > Nipun