From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0057.outbound.protection.outlook.com [104.47.32.57]) by dpdk.org (Postfix) with ESMTP id BFA2C2952 for ; Sun, 10 Dec 2017 12:56:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=jt/0aen/NN9FULUoLv3//wHqapCs+BQFzkiBLQy4J88=; b=j/GffzL/jPYCSLUebOaGcDBiaG6eKxry5iIieKxidj9Q1hqvN56h0yU6sumw+KinKqAgc9wgXFui2gwYs/FMcEmDtHauoZRMhzN6IGifMw9i3FQlAP/Yju0/I2Rb0t4NExogYI8dK2C6J1X0mOF90dqVvRqq4ApWYveDu8nsdz0= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (171.76.104.209) by CO2PR07MB2519.namprd07.prod.outlook.com (10.166.201.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.282.5; Sun, 10 Dec 2017 11:56:40 +0000 Date: Sun, 10 Dec 2017 17:26:23 +0530 From: Jerin Jacob To: Pavan Nikhilesh Cc: bruce.richardson@intel.com, harry.van.haaren@intel.com, gage.eads@intel.com, hemant.agrawal@nxp.com, nipun.gupta@nxp.com, nikhil.rao@intel.com, santosh.shukla@caviumnetworks.com, dev@dpdk.org Message-ID: <20171210115621.GC11770@jerin> References: <1508330348-30060-1-git-send-email-pbhagavatula@caviumnetworks.com> <1508330348-30060-3-git-send-email-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1508330348-30060-3-git-send-email-pbhagavatula@caviumnetworks.com> User-Agent: Mutt/1.9.1 (2017-09-22) X-Originating-IP: [171.76.104.209] X-ClientProxiedBy: MA1PR0101CA0067.INDPRD01.PROD.OUTLOOK.COM (52.134.136.29) To CO2PR07MB2519.namprd07.prod.outlook.com (10.166.201.6) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c43c5830-ddae-48f2-8982-08d53fc51559 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307); SRVR:CO2PR07MB2519; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2519; 3:ejR/SDdBXy2FjdpmdrHWxxvDC8dC3Br3U7z1JZSLdGMwS1989rSePlehmj7/JPLzxBkhNxYwAeLz0KeYJevN0qBr1vaPXZm3Yxwx4F8a+d1LcoMIl7WmLqlr5p30U0+5BZyNy5zQSR7/++QKDlVn4ybIyjK6vbVeycYj1oQk1sGwzMC4f2QUhpkC0lim/gH5w1P1dT+6IG4x01uJxj5q6ELPolOr99bbzuJJS/vpIj/rU6N4Y0sR6fT8QISanG9M; 25:M1XETsiwx+QjXiCSc/GAZKmzJBxvI50DL7pS5MLkr+EcB5Q9nmstNVo78G/7THw4PuJq+xi08UC+Le4AcRpXLKfAlzt3bTKyobBMZfxG0zA27J/4dJQ4UqbVKtXlOhCT4qL/BmfAq30rmBX/32OSZfnEttp7brpHPTJe1B3c8mv68iIp4mQ0/aVxg6GLxkc53UEIn13Rfu4vvm1m9zbdzOjsJBKuy1GDa9sfHsPAjFEjChOL5dHDy8b9wWy8jq5urK+R0saHhXf3W2AYDMpDlKM73+1NMYDOVYh9Bqvwg9HKc8bsep07azCQJpBFgQPH/JI/ibe5xESCthZC3ve5zMDAnBgITdjfVLMfESfimk0=; 31:CIEEWa9D/FOevO982kR5u51QHWU57j0zJhwGM6cFeX8Z6Rv0/T/6ZlsYAJ1DLcki3c8cjhk3R00Oil9hn45Xu1dcpfV/JkFK6bhKARWr9001eGaeG+n3EYl7rwl5J2dZxj69/SMOb5gHdbJSI9NUP94Rhr6cCYaEPOH8yNeMEM5wQO1UV8sOW2eRqnd2b0sx9fch4qccvXOoHTmnyLBpvp46GZw037UYGAIBwuOCrJ8= X-MS-TrafficTypeDiagnostic: CO2PR07MB2519: X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2519; 20:l+ZKds9vGN/kLqk3i9PL/miUyj/JWYnescDi32uxDIbxu+kyW3xPseEjDGR/aWzdp52NjocEeudc0hl1etF4vRR8UH7njRAefTMu8ranAN1kEBqF141XhXo/4Nvyv/kpbQ/iitlWN+oXHye4FQKtkFYI1aUBkHgd7Hu11W7Uk7BjLHlToGy0sqpA+4JuL+L2OWygQRn33VoPZNhhJ3uhp59M3g0eDBQBnzHuRTYLay6+DQEo2F6+39QKMZ/exUcQg6jnPa/zDeeZNKDr5lwotNdaOfNNC2ixwZhnvt4TvoOh00IPclrbnb2aiFYtc/BL9I0V/IRPIdtr7PcfwDwkuLpOnSvddqMsR7TYhdjyr6dd5Hi1xMNx4+jfFgGq8o9Szaeaui5eFAu/81qL3SvoLyOaqsMl+00LNbgkvDUMUudcSDKjUuhNTjLeGHiFAk9CX77UwY9Sgx0P+mr8rQfM9RCAcQUmBpf3T9jKKDrX/EJHDKP0vwNE7YnGV2mFPx1VBVNb3vOI1o84/9aIr5FFfFigiGXwrZ/OSLrUI+qghQ/F0smWyf5WYElTk5jtYUvcykqV/N+TQ90fLkFg9mks4Gb+l47F4FEaAasGu2xnxGk= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(8121501046)(5005006)(93006095)(3002001)(3231022)(10201501046)(6041248)(20161123564025)(20161123555025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123558100)(6072148)(201708071742011); SRVR:CO2PR07MB2519; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:CO2PR07MB2519; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2519; 4:StUxPW3OMppZtKzo7jar1hxkLlj+q3qaRJgLtb0kLyVtrnKKVYiWKwiKmugQUU5VZBgS1lg73jZOek7hhWsNz7SMH5/7Y0EV3HNxb8Mk6Jm8sHJjGgBf7nbsRO2AxkTtULjsq7/fzEqtJdnzErNDFjkSa7FttCZym1LdDbqcTinG5+RhhyHMyip0nrdGJk/MA9s7bNOI81zPUPY8uzAj3IqHKThNa19gNg53ThKISF0FyIB6gFEtg5tU5blFTjcZEhO5ZTKEaM5vNW/QLRj/JGduyp2voZxF6RN0CMu7tt0MYmBHZIO0N9mEKLWIdj0tFmNufs2GLgop/9LoiqL7kFCpRl2KzuJBvVHcSLDSIqs= X-Forefront-PRVS: 05177D47DC X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(346002)(366004)(199004)(189003)(13464003)(316002)(81156014)(66066001)(6636002)(478600001)(1076002)(23726003)(229853002)(6246003)(42882006)(6666003)(16526018)(81166006)(25786009)(53936002)(9686003)(2906002)(72206003)(83506002)(8676002)(6862004)(58126008)(55016002)(16586007)(8936002)(4326008)(97736004)(2950100002)(68736007)(7736002)(105586002)(6116002)(5660300001)(50466002)(106356001)(6496006)(305945005)(33716001)(33656002)(8656006)(47776003)(3846002)(76176011)(52116002)(33896004)(59450400001)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR07MB2519; H:jerin; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CO2PR07MB2519; 23:Mf7vFHeAugHZUYHpAnbJzpiszGd6qKuQ70jPwxwTW?= =?us-ascii?Q?DyiCS6sQKpR9tUuEaQlaGb5IiJ4nIe5tGk7Gvk+o93EnbpLV1d5YBN6kHegJ?= =?us-ascii?Q?W56YdU8EA+CS5rMdjGgjCgWtUj3Dl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xSY6TmzkRjmlY92Dlc7HF9jfQpOBZg2trwg+Xwd7WyMu0Fnlrs3Zh2mB9uNXqYAt6KBqSuoFlSu4kPzY7Y2qsK8h7AK2/tMDPtYeIVpMn5yLvxScDjZU5zkNE2p3clfnXjibzubXZKhJrcJqTCLaB+XF+40b5rSVP7XE8kSsR2T2hiF5FX8nwfoZLr0le49X1rs3 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Dec 2017 11:56:40.8340 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c43c5830-ddae-48f2-8982-08d53fc51559 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR07MB2519 Subject: Re: [dpdk-dev] [PATCH 2/8] app/eventdev: modify app setup to support ethdev 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: Sun, 10 Dec 2017 11:56:47 -0000 -----Original Message----- > Date: Wed, 18 Oct 2017 18:09:02 +0530 > From: Pavan Nikhilesh > To: bruce.richardson@intel.com, harry.van.haaren@intel.com, > gage.eads@intel.com, hemant.agrawal@nxp.com, nipun.gupta@nxp.com, > nikhil.rao@intel.com, santosh.shukla@caviumnetworks.com, > jerin.jacob@caviumnetworks.com > Cc: dev@dpdk.org, Pavan Nikhilesh > Subject: [PATCH 2/8] app/eventdev: modify app setup to support ethdev > X-Mailer: git-send-email 2.7.4 > > Modify app setup to accommodate event port and queue setup based on the > number of ethernet ports. > > Signed-off-by: Pavan Nikhilesh > --- > app/test-eventdev/test_perf_atq.c | 18 ++++++++++++++---- > app/test-eventdev/test_perf_common.c | 27 +++++++++++++++++++++------ > app/test-eventdev/test_perf_common.h | 1 + > app/test-eventdev/test_perf_queue.c | 21 ++++++++++++++++----- > 4 files changed, 52 insertions(+), 15 deletions(-) > > diff --git a/app/test-eventdev/test_perf_atq.c b/app/test-eventdev/test_perf_atq.c > index 0e9f2db..f6fd5d9 100644 > --- a/app/test-eventdev/test_perf_atq.c > +++ b/app/test-eventdev/test_perf_atq.c > @@ -185,10 +185,20 @@ perf_atq_eventdev_setup(struct evt_test *test, struct evt_options *opt) > { > int ret; > uint8_t queue; > + uint8_t nb_queues; unnecessary space between uint8_t and nb_queues. > + uint8_t nb_ports; > + RTE_SET_USED(test); test being used down. So RTE_SET_USED may not need here. > + > + nb_ports = evt_nr_active_lcores(opt->wlcores); > + nb_ports += opt->prod_type == EVT_PROD_TYPE_ETH_RX_ADPTR ? 0 : > + evt_nr_active_lcores(opt->plcores); > + > + nb_queues = opt->prod_type == EVT_PROD_TYPE_ETH_RX_ADPTR ? > + rte_eth_dev_count() : atq_nb_event_queues(opt); > > const struct rte_event_dev_config config = { > - .nb_event_queues = atq_nb_event_queues(opt), > - .nb_event_ports = perf_nb_event_ports(opt), > + .nb_event_queues = nb_queues, > + .nb_event_ports = nb_ports, > .nb_events_limit = 4096, > .nb_event_queue_flows = opt->nb_flows, > .nb_event_port_dequeue_depth = 128, > @@ -208,7 +218,7 @@ perf_atq_eventdev_setup(struct evt_test *test, struct evt_options *opt) > .nb_atomic_order_sequences = opt->nb_flows, > }; > /* queue configurations */ > - for (queue = 0; queue < atq_nb_event_queues(opt); queue++) { > + for (queue = 0; queue < nb_queues; queue++) { > ret = rte_event_queue_setup(opt->dev_id, queue, &q_conf); > if (ret) { > evt_err("failed to setup queue=%d", queue); > @@ -217,7 +227,7 @@ perf_atq_eventdev_setup(struct evt_test *test, struct evt_options *opt) > } > > ret = perf_event_dev_port_setup(test, opt, 1 /* stride */, > - atq_nb_event_queues(opt)); > + nb_queues); > if (ret) > return ret; > > diff --git a/app/test-eventdev/test_perf_common.c b/app/test-eventdev/test_perf_common.c > index 9d2865e..f7961be 100644 > --- a/app/test-eventdev/test_perf_common.c > +++ b/app/test-eventdev/test_perf_common.c > @@ -88,6 +88,18 @@ perf_producer(void *arg) > return 0; > } > > +static int > +perf_producer_wrapper(void *arg) > +{ > + RTE_SET_USED(arg); arg has been used in next line. > + struct prod_data *p = arg; > + struct test_perf *t = p->t; > + /* Launch the producer function only in case of synthetic producer. */ > + if (t->opt->prod_type == EVT_PROD_TYPE_SYNT) > + return perf_producer(arg); > + return 0; > +} > + Other than that, it looks good to me Acked-by: Jerin Jacob