From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Van Haaren, Harry" Subject: Re: [PATCH 06/13] examples/eventdev: add non burst mode generic worker Date: Tue, 19 Dec 2017 13:26:30 +0000 Message-ID: References: <20171207203705.25020-1-pbhagavatula@caviumnetworks.com> <20171207203705.25020-7-pbhagavatula@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: "dev@dpdk.org" To: Pavan Nikhilesh , "Eads, Gage" , "jerin.jacobkollanukkaran@cavium.com" , "Rao, Nikhil" , "hemant.agrawal@nxp.com" , "Ma, Liang J" Return-path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id DF3A9324B for ; Tue, 19 Dec 2017 14:26:34 +0100 (CET) In-Reply-To: <20171207203705.25020-7-pbhagavatula@caviumnetworks.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > From: Pavan Nikhilesh [mailto:pbhagavatula@caviumnetworks.com] > Sent: Thursday, December 7, 2017 8:37 PM > To: Eads, Gage ; jerin.jacobkollanukkaran@cavium.com= ; > Van Haaren, Harry ; Rao, Nikhil > ; hemant.agrawal@nxp.com; Ma, Liang J > > Cc: dev@dpdk.org; Pavan Nikhilesh > Subject: [PATCH 06/13] examples/eventdev: add non burst mode generic work= er >=20 > Currently, worker uses burst dequeue and burst enqueue to forward events. > Add a non burst mode based on the event dev capabilities. >=20 > Signed-off-by: Pavan Nikhilesh > diff --git a/examples/eventdev_pipeline_sw_pmd/pipeline_worker_generic.c > b/examples/eventdev_pipeline_sw_pmd/pipeline_worker_generic.c > index a72b7b2f9..5998aae95 100644 > --- a/examples/eventdev_pipeline_sw_pmd/pipeline_worker_generic.c > +++ b/examples/eventdev_pipeline_sw_pmd/pipeline_worker_generic.c > @@ -1,5 +1,91 @@ > +/* > + * BSD LICENSE > + * > + * Copyright 2016 Intel Corporation. > + * Copyright 2016 Cavium, Inc. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * > + * * Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * * Redistributions in binary form must reproduce the above copyrig= ht > + * notice, this list of conditions and the following disclaimer in > + * the documentation and/or other materials provided with the > + * distribution. > + * * Neither the name of Cavium, Inc nor the names of its > + * contributors may be used to endorse or promote products derived > + * from this software without specific prior written permission. > + * > + * 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 F= OR > + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGH= T > + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTA= L, > + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT > + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF US= E, > + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON A= NY > + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT > + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE U= SE > + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE= . > + */ > + Adding a license to an existing file? Also can now be updated to SPDX style > static __rte_always_inline int > consumer_burst(void) > { > @@ -412,9 +555,13 @@ generic_opt_check(void) > void > set_worker_generic_setup_data(struct setup_data *caps, bool burst) > { > - RTE_SET_USED(burst); > - caps->consumer_loop =3D consumer_burst; > - caps->worker_loop =3D worker_generic_burst; > + if (burst) { > + caps->consumer_loop =3D consumer_burst; > + caps->worker_loop =3D worker_generic_burst; > + } else { > + caps->consumer_loop =3D consumer; > + caps->worker_loop =3D worker_generic; > + } This won't scale well. See notes on future patch (9/13 and 10/13)