From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavan Nikhilesh Subject: Re: [PATCH 09/13] examples/eventdev: add all type queue option Date: Wed, 20 Dec 2017 00:35:22 +0530 Message-ID: <20171219190521.rterdmrm2nhy5mpk@Pavan-LT> References: <20171207203705.25020-1-pbhagavatula@caviumnetworks.com> <20171207203705.25020-10-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-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0079.outbound.protection.outlook.com [104.47.32.79]) by dpdk.org (Postfix) with ESMTP id 142081B1C2 for ; Tue, 19 Dec 2017 20:05:48 +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:18:45PM +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 09/13] examples/eventdev: add all type queue option > > > > Added configurable option to make queue type as all type queues i.e. > > RTE_EVENT_QUEUE_CFG_ALL_TYPES based on event dev capability > > RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES. > > > > This can be enabled by supplying '-a' as a cmdline argument. > > > > Signed-off-by: Pavan Nikhilesh > > > > > @@ -494,9 +608,15 @@ opt_check(void) > > void > > set_worker_tx_setup_data(struct setup_data *caps, bool burst) > > { > > - if (burst) > > + uint8_t atq = cdata.all_type_queues ? 1 : 0; > > + > > + if (burst && atq) > > + caps->worker_loop = worker_do_tx_burst_atq; > > + if (burst && !atq) > > caps->worker_loop = worker_do_tx_burst; > > - if (!burst) > > + if (!burst && atq) > > + caps->worker_loop = worker_do_tx_atq; > > + if (!burst && !atq) > > caps->worker_loop = worker_do_tx; > > This doesn't scale - we can't keep &&-ing in new options. Refactoring and calling a function per burst / non-burst suggested, perhaps something like: > > if(burst) > caps->worker_loop = get_worker_loop_burst(atq); > else > caps->worker_loop = get_worker_loop_single(atq); > Agreed, will refactor worker selection logic. Cheers, Pavan.