From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavan Nikhilesh Subject: Re: [PATCH 06/13] examples/eventdev: add non burst mode generic worker Date: Wed, 20 Dec 2017 00:31:27 +0530 Message-ID: <20171219190126.d3rwzcwli3jbsvrn@Pavan-LT> References: <20171207203705.25020-1-pbhagavatula@caviumnetworks.com> <20171207203705.25020-7-pbhagavatula@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org To: "Van Haaren, Harry" , "Eads, Gage" , "jerin.jacobkollanukkaran@cavium.com" Return-path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0046.outbound.protection.outlook.com [104.47.33.46]) by dpdk.org (Postfix) with ESMTP id 9EC131B1A4 for ; Tue, 19 Dec 2017 20:01:55 +0100 (CET) Content-Disposition: inline In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, Dec 19, 2017 at 01:26:30PM +0000, Van Haaren, Harry wrote: > > 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 worker > > > > Currently, worker uses burst dequeue and burst enqueue to forward events. > > Add a non burst mode based on the event dev capabilities. > > > > 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 copyright > > + * 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 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, OR 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. > > + */ > > + > > Adding a license to an existing file? Also can now be updated to SPDX style > We still need to get approval from legal once we are good to go we will update it to SPDK 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 = consumer_burst; > > - caps->worker_loop = worker_generic_burst; > > + if (burst) { > > + caps->consumer_loop = consumer_burst; > > + caps->worker_loop = worker_generic_burst; > > + } else { > > + caps->consumer_loop = consumer; > > + caps->worker_loop = worker_generic; > > + } > > This won't scale well. See notes on future patch (9/13 and 10/13)