From mboxrd@z Thu Jan 1 00:00:00 1970 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) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Dec 2017 05:18:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,426,1508828400"; d="scan'208";a="3731710" Received: from irsmsx154.ger.corp.intel.com ([163.33.192.96]) by fmsmga008.fm.intel.com with ESMTP; 19 Dec 2017 05:18:46 -0800 Received: from irsmsx155.ger.corp.intel.com (163.33.192.3) by IRSMSX154.ger.corp.intel.com (163.33.192.96) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 19 Dec 2017 13:18:45 +0000 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.180]) by irsmsx155.ger.corp.intel.com ([169.254.14.169]) with mapi id 14.03.0319.002; Tue, 19 Dec 2017 13:18:45 +0000 From: "Van Haaren, Harry" To: Pavan Nikhilesh , "Eads, Gage" , "jerin.jacobkollanukkaran@cavium.com" , "Rao, Nikhil" , "hemant.agrawal@nxp.com" , "Ma, Liang J" CC: "dev@dpdk.org" Thread-Topic: [PATCH 09/13] examples/eventdev: add all type queue option Thread-Index: AQHTb5t9vhT6aCqbjEypzbPMlq0cbqNKtztQ Date: Tue, 19 Dec 2017 13:18:45 +0000 Message-ID: References: <20171207203705.25020-1-pbhagavatula@caviumnetworks.com> <20171207203705.25020-10-pbhagavatula@caviumnetworks.com> In-Reply-To: <20171207203705.25020-10-pbhagavatula@caviumnetworks.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMzc2ZjRjYjQtNjcxMS00ODU3LWFkMTAtY2NlNjRkOGJhMTYwIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6InhXRFZDa0N3VTJzcmorUFM3dmM4WHM0eDFEcjVTSHpsRVRvb0dkVXo3U0E9In0= x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 09/13] examples/eventdev: add all type queue option X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Dec 2017 13:18:49 -0000 > 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);