From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0084.outbound.protection.outlook.com [104.47.41.84]) by dpdk.org (Postfix) with ESMTP id D57877CAE for ; Sun, 28 May 2017 22:01:52 +0200 (CEST) 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=pok9930Dmld21D5RCY1acbgxnSL/QlFNyFC3CPZtUiQ=; b=A7yrDLK1VJ0prNdUS7EW8tSpDnGnK0C9KPSoy85CX1mqb5HiPYjFNj4ilueX5TXvwMKsNUwb55HQlBW3ZWxqYx6hzPFLl2NN8qtMJxYb8cFxuEv6ZQIs00NEL5hPYe9LmqwyHyA4vO4x3zsXEuDsXKqZ8ShZHX/J8JwFYt2uwS4= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=caviumnetworks.com; Received: from jerin.domain.name (111.93.218.67) by CY1PR0701MB1725.namprd07.prod.outlook.com (10.163.21.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1124.9; Sun, 28 May 2017 20:01:48 +0000 From: Jerin Jacob To: dev@dpdk.org Cc: bruce.richardson@intel.com, harry.van.haaren@intel.com, hemant.agrawal@nxp.com, gage.eads@intel.com, nipun.gupta@nxp.com, narender.vangati@intel.com, nikhil.rao@intel.com, gprathyusha@caviumnetworks.com, Jerin Jacob Date: Mon, 29 May 2017 01:28:43 +0530 Message-Id: <20170528195854.6064-23-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170528195854.6064-1-jerin.jacob@caviumnetworks.com> References: <20170528195854.6064-1-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BMXPR01CA0003.INDPRD01.PROD.OUTLOOK.COM (10.174.214.141) To CY1PR0701MB1725.namprd07.prod.outlook.com (10.163.21.14) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY1PR0701MB1725: X-MS-Office365-Filtering-Correlation-Id: 31afda03-9e59-42f6-f913-08d4a60461dd X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:CY1PR0701MB1725; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1725; 3:P5L/TT5GQpyBrBISLVA2CbLqrpfQy2RhqJ/YYhsN+oDT8gtDo7hxdKLWMEx4TGdu1wvnzJXLLo4AAI202345VWWaVQEK6z9jFhc+CCF5Tpp5+ULiaASmR7XTILU0WULIeE8pgqpQ+bQLGVqbWcjVVfa/gRpoln+lkhN8rY7e+CgzPcCfMRlsvjff8X0r4IgQak1SM2b2bWMCjPrX4jIwU9O2YP4qRwVCOQNlOB5gZCugWe9SIIc8uuvwzCtDTJ3duFoQk+avRK3pgOEwK+8vFFketMuXekYESEukXcqViNJQNSXS4YfxBXdlaPkyjcvMjxCtN+9BcpJc7Z/V32Duww==; 25:IqNRR2MXg9IY1OHlCCuYlTaxnNF3RT7Zslm3njsUB0+cZdIpWaWiEXdFmLvGL5rRtgg9+PfSGz2nGz8sW+gHtm4SxjEIcUwAzmDuVt3kVZOX0/tbh2WbmEbJJotY1jktoY5vDC9Ki8gdCHD7AcmWiuwfb+Sui6QRTTxA254Axkt9NPs6xzHDBNKof7OS6iyCJ5XH570s9dmOBbGQfuHxPvHXRoHw3SwF1aJJB/B5xlkTmmH1+diAEUnW+uNn9Pd4H7DSNxISw/oO1tCYt1Wp7GUgjs5HDnPCSI1JnKldpS7Sw1s/XM22dDUsOokQG3ilKQKCpvdlC2MRQ+mKLfbiK+lgNsTi8gcYzti3qVDIBVmaRoAARl0IiAqSdiOHwIw4n+CfprtF/wmf6Ps2QZ5qeafwTjam30CIYEuWsS2vsTIZAxj7yXU5129jRaJszwaVFPD5ZaB0QTtx53ShTtW1rm+2Vt2vOqdhcVO0Od7pTjY= X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1725; 31:MHzP9RbhoSovmnTDVrU+76QT91nFqsmMgX/ZKqCVmU4LT0gKQT89izE3sITDrMfQhw6mQDcwXypZFBDn29HAofc11zem/1+9wEukOVEiypTum8JFeFkAs60tsG4H2b6IXXiTKkDREAm5duNdau/PpDWXCVIJM6c/ObLajNO4NSffMn/R8BEMNxnP2TUmK8VqGGpa4D1c6zNz1rJ9G7NTcbTfD6fZP6EqwwMEjQbhBHM=; 20:zBIs2T/ehpS74u/34tc1a+8ys8j1BzXV4A++zY6io1DipYcgVjVZ7P4q0PjswRIMf01rHcJNBLpNrjFBnhRAYT4DAmbyi7iXRo/BJPAYdn1fgkHJtexjPsP5RFu3qWrd3rRIxyZSHnLM97ecr4vDYows5gZLylJFjphWjgLHb6v31Yc1Kt26WgnHfcNlWf8bx7xQ18oeupXfx8pvRl7YNQ1neM8XMznWCfwVrZO5jpMaL0tfwi8h9e1pKieZkwn1Omg7SYB1l0U1UylvpPBcBANtKMdTZg2texC5DR+dCJFcyjV0Xv+JdjGm49228Ar85MTWiI6otB+QZjwqiDFeTpVJaNSyRnWKa89YDyIvn1669p1dY3m7T3tpL4EKkK8PlYU3CHjME4iF9or3i0CTItXges4ecZgYHTsiESBWdCmBoYQqNo7xKdzotCJSgMyi52nMrejeTEy9Fhzng0iANcdOTRnF9S/v4MXF2gQRCLNzx+ESTxTcbB1DGAXdBoff9W0+tdz6d+CIyjyX+s0SgO1S2ux8jlO0/K7YTTc9X72ORLPqhacKTuFgFx0zwamzAg04lD8HTxQnYYqLMTArDDX9sNBdGqdLq8dtd6jF0dg= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700073)(100105000095)(100000701073)(100105300095)(100000702073)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(100000703073)(100105400095)(6041248)(20161123562025)(20161123555025)(20161123560025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(6072148)(100000704073)(100105200095)(100000705073)(100105500095); SRVR:CY1PR0701MB1725; BCL:0; PCL:0; RULEID:(100000800073)(100110000095)(100000801073)(100110300095)(100000802073)(100110100095)(100000803073)(100110400095)(100000804073)(100110200095)(100000805073)(100110500095); SRVR:CY1PR0701MB1725; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR0701MB1725; 4:4fhQfJlLchUupZxtmrQWWQ4Lab7/QZ5Ce26ytX/i?= =?us-ascii?Q?hwlp/LvUhCJ1WQCxkdxe+GPlz1TJESdSvhEbQzl7X0I95i1tnypa1nTVXxvS?= =?us-ascii?Q?WDktcm7czYxKMFIgyEsNvOhv2B1cQ1Svv0kxmFNGM7NV6TOjahLo6TguNGGs?= =?us-ascii?Q?XnBFnvbIGYTgHFqXDbtmrrjDKp6xguaxFgdDeIvFl5FfghmwXBJCRBsNGtZQ?= =?us-ascii?Q?rNG6VocInhj5PuUTcmNXYlzVXRtOD7LuX2vS9Ds21rlnph6hm/ZEFj765FBt?= =?us-ascii?Q?wN5lmreJFmkclme8qwHhe5Z+FmaAEkjHzofqfRiWiJp2anKZPc8bUcEhxJMO?= =?us-ascii?Q?Es/2hFZXar0t4Peae1t89wTMrXJKTMp/WTPiSdFCCQvSb/PnVPlOp+fQD75w?= =?us-ascii?Q?3+KmfDOjdXidV5By5t7IqfmKK15QeBU4lOUEfiObLjgDbRp27cpYpTfsq7tm?= =?us-ascii?Q?yEXjoFl+VKgkkWBQfS7Mc2M+qtHWNHfGnbkEgxevg8awZjmUeI81fGHo7xnn?= =?us-ascii?Q?0ohOmdmiBB0DnR6WOtrAYaKfh+nO+/TCXc/G5nVJhUEvBtNFlMY5U4MDffyH?= =?us-ascii?Q?OYeNQbkzBNzh/UyDbjOQkGXdZZT9XhhAAJDdm7coCiBXKkXBhBKn0l3Ot0hW?= =?us-ascii?Q?PsGcWlkQdFP5oGp4BhdsEUjp5t2V6COy+sU5P4SQH6Mm/amLpU6BrvBBSgAi?= =?us-ascii?Q?61bNEv32BIj42Tu/RjTn68S9K3b0MGP58ZJvbZ7sxPKJQcgiA/XGy7DsHgdL?= =?us-ascii?Q?Id0ffiGugL+x87HR3rCPO7qrrBurd9h/mQmTClFFjFx8limrlKpAJxcAx4oe?= =?us-ascii?Q?l+QeeBuE3I1iCSIeDfnEqJKA+hClNWHXgen/Nokju5/ssYA/BGT3Us34EeU2?= =?us-ascii?Q?+U7xPXe+GrY/w4kHwhvWWUmeMmhhLIsP0dNJVJnDeZCi0mYAFqTtpuspWA8N?= =?us-ascii?Q?3CJIBduG7ikxMxIWHPCV38vAMWqykg9dI6nQk9TF1FDl+w50ddJ+sLUB0YkG?= =?us-ascii?Q?YkajwABWO4/E5GxheWrBLLa3utpAfspMbwFPSyEHBcE4UmvdSJxdLLHJi9Bs?= =?us-ascii?Q?anbuyIH1a5aiZmDMHy5kaaqlRGLVj9RwJWfWOlF1FjvCy8KTTvSzzJrKulgx?= =?us-ascii?Q?RP1PrNVWL8k=3D?= X-Forefront-PRVS: 03218BFD9F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39450400003)(39850400002)(39410400002)(39840400002)(39400400002)(81166006)(6486002)(66066001)(4326008)(50986999)(76176999)(50226002)(189998001)(72206003)(36756003)(6506006)(38730400002)(5003940100001)(5009440100003)(110136004)(107886003)(42186005)(53416004)(7736002)(8676002)(48376002)(50466002)(1076002)(3846002)(6116002)(6512007)(2361001)(305945005)(2906002)(6666003)(478600001)(25786009)(5660300001)(2351001)(6916009)(42882006)(2950100002)(33646002)(8656002)(47776003)(53936002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0701MB1725; H:jerin.domain.name; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-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ZcP4E3O1LAzdvknQKnHH1j2ZSzXSjn4OLHMX?= =?us-ascii?Q?AZvAYleQFtRUbZOy5irpejbvkogVk0fCg1MltewoejMduWsol+thAyToAgm6?= =?us-ascii?Q?phWQpGyHHyzjVSAWpV5fNu8AX18tu/TqzinVBPHjyiioDpHUSWuW6yZ8icLC?= =?us-ascii?Q?h5JctXGLrPkxer+MP3ahCNsMKIe5R2MHOUtQ9ezkYlADmeTdkfwjTSOPMyfS?= =?us-ascii?Q?+oH7cv8LiCbLXldseqdidFHP0TQoZqWLt7mya4gxOQV20BR3beaXVIe7j5oH?= =?us-ascii?Q?oXOcmzHMdiCH1DrQIdMqD9DXefGt1LGsKzPlqdxgdV8AG5oacU31QX5ZRHdd?= =?us-ascii?Q?bKncmWe+wuPdSm2zGuUJK7UgASOd8iVUVoGPE?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1725; 6:WhETqvBKaZUgPFmlXjTfyXBj2nBoClRxYvzpYWoog6lrQSqqaPwzpuTQUx2dnYsXeOmQ3Qyxq3IxfVuAi9qbJPsp04qTaFOYCTxzlbKsifvJ7TlKzw/mr8HXJViwMUgCuLMePcW+68zLy9JuOpx7Jslq+JffZ8yzxeH45b93f5vTyBKP197Y0I5v8EcCud5xCt/9EZ0yMqNj+5SM0Ncel0PpFsmJdMoZwiz5cd4+dx0OKrikY57noB82MnnR+OTwaQDSNL3jP5zsEVl1wsHPZQD+N1X4Mgvgz8VXj+n6CQYduhiue4bjzcSN3Pi3XJD3JY2NjFALF6RXCDzFTQVWQzCr6tYpnboSa8tyP01TaXupHul0uS8SGz25ORf6XT/0eBMy9TD3dfbpWzCZe55zy5g1pRqJdZACYs8TRJcl4KSzCXyt0DXArktqKqbvTurOtrmZdhzmT4xoy42BvMr1xURX8gblj3Gnfeca0qQ2ImBi1M5w2DmhqQVtDtO6AM64uqU8Hv5hY7GQlOy0kJeuMA== X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1725; 5:tbsyOPNeju/CTzZmHRfUSS5z737EEXt00UGUcplqGA9kks0dgcHDND1uoOEo56mDJJRqmCg82ED7oN10K55RjScnqiMxUBCZN58aqp6tlXdlml4p8e/dDp9cT2Ne9Sf8k4YFI9wRjacUiNJW0EU19RebmoFjx3m5iQYkJWyPuCq9OfRs3T/LJJYqUtG1HnebYi6Cr/lpnl95NZkhtSc8pG00HzU2mo9wdn/NtMyMr7vM9S2gcmM2E13PkvsNrjjxIzN8CIiFfoJdd3WIAmCHFs42lQLFwnwbLLqEtIzYA1gQaCAlx0rEdPQWdrBu36K94rG4uk4cwEQdAYVQWu2osyedOQKWKVuCOjWW3lGUBsHGMrDac5eDrj6DaomsLPqwdAmsz0iT2kIKugQ3Y4rj3aHaNvp/G+IvEG6FyJX588Nvs0F00TUMlBy/hJY0NkYk+HByZ+cMYvPAYRQeC0Uxcw2EXXKV19897wCEM0ilI75BQtoV0KyM0lWrA/oWiXZ7; 24:HBAqNEO4TitXk4I1QjroXZxrlr/nz3RgIe2hCA1t8Vxycxc5jhxXNjub3HAvGKjS+duO0Fw/j8gSYyJMiT3JVToFqIYem8DspMKxWeddDjk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1725; 7:dZHDANCkI0+GY94j+06tp0g5FGPOWlpHRFwSqNWoJ2lC7rgW5A9bioyc3dGJxj5/Dd5/O91Olq8u+Qv6lEnmYhxlga08iAOOd8SD9Mh9PKmVFFHyXVXx0/q2gFD2wrgXvr9QfZWSQSI2pkj7Xtn3I5gZOif1e5QJWVvyPVdk5E5WxvjYm3J5n2/C2EIZrbOgMm62rHSKDLsqHOtECLlMyMPhVU4u3yvGc3J8U+ct7EFzyGYCDJzHbkIi86tr/joOwHCuKbDYrFoIVFchuyLi8QO69mpBCbBARRh6vTEgRBjYZKWRzohvNubFOWWWBbgi3LILn0Ggz30iPUl4DaGpwA== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 May 2017 20:01:48.0529 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0701MB1725 Subject: [dpdk-dev] [PATCH 22/33] app/testeventdev: perf: add eventdev port setup 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, 28 May 2017 20:01:53 -0000 Setup one port per worker and link to all queues and setup N producer ports to inject the events. Signed-off-by: Jerin Jacob --- app/test-eventdev/test_perf_common.c | 65 ++++++++++++++++++++++++++++++++++++ app/test-eventdev/test_perf_common.h | 2 ++ 2 files changed, 67 insertions(+) diff --git a/app/test-eventdev/test_perf_common.c b/app/test-eventdev/test_perf_common.c index f889b1a59..6ebb16a43 100644 --- a/app/test-eventdev/test_perf_common.c +++ b/app/test-eventdev/test_perf_common.c @@ -42,6 +42,71 @@ perf_test_result(struct evt_test *test, struct evt_options *opt) } int +perf_event_dev_port_setup(struct evt_test *test, struct evt_options *opt, + uint8_t stride, uint8_t nb_queues) +{ + struct test_perf *t = evt_test_priv(test); + uint8_t port, prod; + int ret = -1; + + /* port configuration */ + const struct rte_event_port_conf wkr_p_conf = { + .dequeue_depth = opt->wkr_deq_dep, + .enqueue_depth = 64, + .new_event_threshold = 4096, + }; + + /* setup one port per worker, linking to all queues */ + for (port = 0; port < evt_nr_active_lcores(opt->wlcores); + port++) { + struct worker_data *w = &t->worker[port]; + + w->dev_id = opt->dev_id; + w->port_id = port; + w->t = t; + w->processed_pkts = 0; + w->latency = 0; + + ret = rte_event_port_setup(opt->dev_id, port, &wkr_p_conf); + if (ret) { + evt_err("failed to setup port %d", port); + return ret; + } + + ret = rte_event_port_link(opt->dev_id, port, NULL, NULL, 0); + if (ret != nb_queues) { + evt_err("failed to link all queues to port %d", port); + return -EINVAL; + } + } + + /* port for producers, no links */ + const struct rte_event_port_conf prod_conf = { + .dequeue_depth = 8, + .enqueue_depth = 8, + .new_event_threshold = 1200, + }; + prod = 0; + for ( ; port < perf_nb_event_ports(opt); port++) { + struct prod_data *p = &t->prod[port]; + + p->dev_id = opt->dev_id; + p->port_id = port; + p->queue_id = prod * stride; + p->t = t; + + ret = rte_event_port_setup(opt->dev_id, port, &prod_conf); + if (ret) { + evt_err("failed to setup port %d", port); + return ret; + } + prod++; + } + + return ret; +} + +int perf_opt_check(struct evt_options *opt, uint64_t nb_queues) { unsigned int lcores; diff --git a/app/test-eventdev/test_perf_common.h b/app/test-eventdev/test_perf_common.h index 5c56766e5..06e887b98 100644 --- a/app/test-eventdev/test_perf_common.h +++ b/app/test-eventdev/test_perf_common.h @@ -97,6 +97,8 @@ int perf_test_result(struct evt_test *test, struct evt_options *opt); int perf_opt_check(struct evt_options *opt, uint64_t nb_queues); int perf_test_setup(struct evt_test *test, struct evt_options *opt); int perf_mempool_setup(struct evt_test *test, struct evt_options *opt); +int perf_event_dev_port_setup(struct evt_test *test, struct evt_options *opt, + uint8_t stride, uint8_t nb_queues); void perf_opt_dump(struct evt_options *opt, uint8_t nb_queues); void perf_test_destroy(struct evt_test *test, struct evt_options *opt); void perf_eventdev_destroy(struct evt_test *test, struct evt_options *opt); -- 2.13.0