> From: Pavan Nikhilesh [mailto:pbhagavat...@caviumnetworks.com] > Sent: Thursday, December 7, 2017 8:37 PM > To: Eads, Gage <gage.e...@intel.com>; jerin.jacobkollanukka...@cavium.com; > Van Haaren, Harry <harry.van.haa...@intel.com>; Rao, Nikhil > <nikhil....@intel.com>; hemant.agra...@nxp.com; Ma, Liang J > <liang.j...@intel.com> > Cc: dev@dpdk.org; Pavan Nikhilesh <pbhagavat...@caviumnetworks.com> > 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 <pbhagavat...@caviumnetworks.com>
<snip> > 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 > 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)