From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Van Haaren, Harry" Subject: Re: [PATCH 09/13] examples/eventdev: add all type queue option Date: Tue, 19 Dec 2017 13:18:45 +0000 Message-ID: References: <20171207203705.25020-1-pbhagavatula@caviumnetworks.com> <20171207203705.25020-10-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 mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 1BAF223D for ; Tue, 19 Dec 2017 14:18:48 +0100 (CET) In-Reply-To: <20171207203705.25020-10-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 09/13] examples/eventdev: add all type queue option >=20 > 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. >=20 > This can be enabled by supplying '-a' as a cmdline argument. >=20 > 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 =3D cdata.all_type_queues ? 1 : 0; > + > + if (burst && atq) > + caps->worker_loop =3D worker_do_tx_burst_atq; > + if (burst && !atq) > caps->worker_loop =3D worker_do_tx_burst; > - if (!burst) > + if (!burst && atq) > + caps->worker_loop =3D worker_do_tx_atq; > + if (!burst && !atq) > caps->worker_loop =3D worker_do_tx; This doesn't scale - we can't keep &&-ing in new options. Refactoring and c= alling a function per burst / non-burst suggested, perhaps something like: if(burst) caps->worker_loop =3D get_worker_loop_burst(atq); else caps->worker_loop =3D get_worker_loop_single(atq);