From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0064.outbound.protection.outlook.com [104.47.41.64]) by dpdk.org (Postfix) with ESMTP id B15467CFC for ; Sun, 28 May 2017 22:01:02 +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=ZWBp/MyLpoyFiX/r07mx1rUqk3SZzEY2BNoMgVFCSCU=; b=YuXg4mesXdNGqjkzzqJ8EvYwIXnisSYvOKAVZIIVMfMmZyCFxtVszGUQuSUYcZ2rP+osrGeQm0iGiJf+9IMjc0sJ5vlAb4RBR+2q8RLnIKdIZmOvM8ai7AOdmz5wjlE3NnaSLTOtsmjbdag2G2kf3fseiMmdzBOfeEMNYmcY/fM= 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:00:57 +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:35 +0530 Message-Id: <20170528195854.6064-15-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: 19a0b16b-42b8-40a2-fc08-08d4a6044407 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:CY1PR0701MB1725; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1725; 3:PBzcf6JDT9OqiNglFTRWc2aAeChJhzksLx1bmEeOJY13V3IAm5/H1U22B7NAUotL++N9jrYGXY3uNx6UG3bCcEgRLOdP0xVXyopiLG3SuRP5IF6d8Zg7+7HfKwazyymvGgjFLuv5S2B1CeBja9K2Pg2jyTiArjENroEtohkRFwd5W9VVQ1RIm8zNPkpi2xl/VVWli9sDslDEsMmivXhYk8puE5yOk4d4eaMda5bYiXSAs9f8wnRuK0UceA5lwEK1wYzKWeJKZQ8Ca2BxXeQtdh3BPp+gebo2ZLnT0UaZQBvgQNWkFf8j+06wH520n9luC7TFgo6gJAIIuDSssSeJyA==; 25:6gK2cL1bPnK42n3wVT9FWmSvd6YSwtupOkSdnMG1vwm37/wOZoRSkaXmWXWGxqKMVS0IqDdsyae9ErPIOMiw5iKUivYueBw1pNgRs8GxvtYkg/Ji+2gKelGs13r2Ka+RDtBFmTsUiMU57t9jZVJq6lJKW5q/ID8or/jCInksBOZ798+zybOuFItpKraDV5DIujUoDlyKUawMrcCrDzeclu7GUIwYzGp/W1izqUVljs0lMMzMgdHJhdhjr5cxdwYPQ2Chl0BteS9FfoylBay2xM+T18jzKG2sFkfwrRqkU+faDfPVtC0e7FblbJg1d0V7Rda8FHSrgcTCIN71j7ZJQRqXGrG1lata8zs71+u94hQRRi428MLv/zPro2DLHjq8+P/3k80bnqzf5K8Rf5NhvtsfUjRASYA6XJkWW/m4vVjgzYmA94PaQECtSAUfTAPget2IZPmBgYb09SszxXgmJIQunWdOMxtIPCcFvXxjEgQ= X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1725; 31:M3DiHCkcMvJzn53N/fGBTo9fa6wkV7975GJ9BEJuFTcIXkqUDuNUc7Mg7H/9UwRHEFp+kL7F9wssBIWFgxcFVqHX2ymE1n5OUmgyA4SjYhP+Yow0KKSC3/1eHAawwRDEx2QJIsXRBZPlBQQUzCgGwXwFz7jCQ0uDxSuK997m4FGvTSRby5xZiW6gsMceCmBDnMGITlcbAF6dl0qRGA6Fz5BVsmCjVAtTpf5/HFn7La8=; 20:XgBDPaBNE3C+/fqv6nFDfXYBMsLQOCY9GNBARrWlTjtKm8ZwdxoLf65SgHvnjXggmfXXaa/zs4DLYOkfWO33CcWk1N8TjvOJN4Dwn4be6hWT1f/4e75hQpQNFvAFnrFyhpUc0gYppQhUU4xRWhAh9/ROmPodynmz4cDw9nlFeTec70DDhOSzFEqXkPY8OkWoSs+7JAPTYaARfGkAwaCBFd5LYxoF2uQZ9Yu7LKLUOwGuJgA1zwd05pfsbahBJ4P8ul+pFFCSdE+kKI2H23G6utsCGFboTYHSAUKL8owVUv0aaByJCBCgz03JnWNmfXy8/Jqt95+rp7670AYDm3j6y5jGaG6sKMRUQlcOxzRGpBpr+Xo/lSaHUisGHXZ0dNRR4MLpST9ea9UA4dzP97x+CF9Br2P1k7wQGz/TSjDqpiNge4t7f9exWxr9B1/+KORJGZSEUv0XPElnqgC+rkAF6zT4NhWiQXAAaX0IUFM+NApKXU+Buxom0I//Veqh8s/PExk/WHHEM5cTSUhJK2+LaFXXKXssHUnEVwEoSRU7P6HFuZRyPMZzO9u7AkNTVYbOsGMYvRuOgRE2JBNduMl7veN/KCnjNpoackxso1yWW4M= 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:QksiC0nER7pwb2c1QfOJaMak0B6sOQcuYhm6SU1V?= =?us-ascii?Q?eUjU346vYsGvNvkdr4m9IQTR6PKLN8akxRSJc1yt837ctLwnCenziYI0a2EY?= =?us-ascii?Q?Ovmcp/81F+rJ70VFit3LA5H5nnr66LewJc2WIK7LDV1p5gB/H6tOFImZhGRs?= =?us-ascii?Q?UnWCIF5lXmieaEviK9IAeoO2Bo28QSfbBvPJdCVoEbeQNVZGXKzfVRyBf0E7?= =?us-ascii?Q?IpvSLC+ZtDvTlN/9iZBjKhBgRjwjBNMZy5Bn9ntn4DdEn21ChG0XX8BShFde?= =?us-ascii?Q?EYduok5xDU/u0P+JYPUVlDi9+pT0k4ABfWuUo7mhKMfCDXKbquhRgtxyvxQb?= =?us-ascii?Q?cOjAMKOzLB2rw9lzS5N4w9ioOmvDA5mr17E4On0Bu0IHEIMYHt2CFclsWn11?= =?us-ascii?Q?NzuFkCWyn8vvBUJHUdAbpEBB4U8DyVuvXDTwGe4N02VWu9/Uu8diHRhf4Ks/?= =?us-ascii?Q?BaZJpRch8EKrsxCTo59ASL3zLGjC0HnEVL5BjdD6ItvFinuzNEev7RtCjf5U?= =?us-ascii?Q?DI8COzJUt6l1uV1ys4BbovwORjBVEt85qy0HZHaMpp3FW+tr0CDG6fE+3Kjv?= =?us-ascii?Q?0GWMKUK+N0Q+VkxQt4JvQPGoraQCFS4AabT+a2clWW4WFRritRnHdAP+Zxmm?= =?us-ascii?Q?PB/c4/TevrkVl1r7EHfSAyoLAU2YfsZzXifXVCNUotEI4Ku63zwn16XNu8M9?= =?us-ascii?Q?sEGiozp/8NZ7NBqbBgQd0yADzBxazToPlak/m8sDpX5xKDIhSvPG49S3Aq7I?= =?us-ascii?Q?+lmOdfidMeqEcCuiuUdqW+jRkJXG9e+L4xqZmyA4bZM3nUFu03lQTBkVHvMd?= =?us-ascii?Q?TAZ1HLnvotHepriyp/+cUlNQyN2S0dfGaE6xTM42lGigP+NANea25qT0sg/9?= =?us-ascii?Q?FYJc2TgRQUmY8jgMO3hu5wu7B1iumFTBac2W1PScLfCCLXEVOYZDYoVl//Mi?= =?us-ascii?Q?pDdww9pokMdfg6szXGTFbUzvsRoKfnEIggThXzbAwY4f543CIKBu8l4sO/ML?= =?us-ascii?Q?juVqU56/T9M3PCT/psWEUPG+0+X0IQ9sSm+uuqYfGfMEpHpdJTlDSfOkZOPN?= =?us-ascii?Q?uEgvtCqiZEVZ+yPJMYsySemuWYvp21Ykujbla9bxEknXZZb4OFNgqHTs1Z80?= =?us-ascii?Q?ZUhcghwOWWI=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-Diagnostics: =?us-ascii?Q?1; CY1PR0701MB1725; 23:SCe5Ue84ivdxVR371XcBsgvtTZIJnWeKBKiZscv?= =?us-ascii?Q?vPGWw1PU4ZtdDGOgokZHOngZdcjguff8u89Ere+bvyeEO+BzMJMDduauT5CE?= =?us-ascii?Q?yrcWK/14ElvK3HL1uw9o/BlePLNDQMeOvAHEYoBKv63Cs73vIyTDLxiBKb3O?= =?us-ascii?Q?LjfMw012ebTr0BkNkBoRvcmEuvuzKBYK6iz/jHDmzRq17xjl5wHgKOAOMwVi?= =?us-ascii?Q?SThPRtyailvhiN6PSHBLqFLmr19x2lPsGWhQubXjuXrgpyIgMlNx5zI844po?= =?us-ascii?Q?9J+c29Kux3UXggrYyhXG7hV87peDA8HD/aj18vV6XMFJ5oBSwAu6a5s0GQou?= =?us-ascii?Q?R0QS+ewsxXiTpDtuik+dxuF+7+m5/jXpSS18GNglUy6CxcnmX6H8Fqj0uDpx?= =?us-ascii?Q?Ct5yBlS8+fwO1mzSXkI7MMtPXySSb5W0ag18zFdn2RkNdiUs9xIsNeLm22Cp?= =?us-ascii?Q?FDjgD22J/21P5fk1ADnlLvlVM3Da75nvu1pLFGeW75mlofImvoCC/LcxtaCa?= =?us-ascii?Q?Dah23fVZixC52zI154oyZR0R0rxRUoGMItbXEcblWvEHJesuNVt06OQEsfG0?= =?us-ascii?Q?zQexP86NkTi6g81gDxDRO/dz8TjXwwEiveOfb5uBTB//P4jf+aUvc7lxrLia?= =?us-ascii?Q?lFfK6UPbgY/YgYMtXQC+F+7oIcGWDuF4ZyBDWXFRkBSOMfFXvwX/z+nF646x?= =?us-ascii?Q?orgQqkmUHsxLE6v9nq9ZMZQflFyon0lQ1u8avfCSlqJc4t6QW4AdGVnYijLo?= =?us-ascii?Q?F0rEAG13lQ5TFPEvFMGr93x4yZ81+dssplddcShBGsIv5EqcbtnpOkV3XlxT?= =?us-ascii?Q?Yqx+druSCcVg4mBBOJr1IOF9YfFJm+PDF4osKOi9A5CeZT2ICTHglRN8YoeD?= =?us-ascii?Q?6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zz249fU7bhS77ELxxYRRvDZHjk3metf7V4frGc9ExBUuymBNexEwMsrEd6wGTz/giw9S0DpVOztfTa/CdZVufmQ5miiAJGDnu7ts+F+T4HCiazg30wZq/ahX8kjG8d6vdd1cUVJYPF6BHfENQ0bPeKDlC/1rWG0UYy1CGjUyHlwN0tJtPWU5u77l4iEztdr/pCbEe49WvDmgDgmEQcl0VO10fEPiGNvsh68kAl/6jC1jzNOT4G2G+QvpNEN0M+tUj7M9R1SGcopkgWveH4fvEVM/pMCqNSvPuPiE7VmtgH6DenpfOCSsnGVQoeGZEnGgOOE9MIouHEmHQ4c0B+arq+dEjEfJkIGfV+cd8jdupkH7YN/lqeN5SZMboBmMcDeqeFxuEi6mB5+WEWxCTggU0MiSe8itWR9HJUbiC0tb/TsRt1NLVWu3xsZfMZSuyJU4G4/5B2CAmKTxEbo9qMlIN; 24:rolviZlclWpDhnxUIZKMUvedyOmgZmpFN5kxiAdPeG0VxCX+2bLqtY53rLajB22xR4AW+EFO/1yrToni4csV4a8mUQvmbP2DC/NOh0Q3bwg= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1725; 7:CM8Jp1yjBSY7VZpfTCbYKke/IEE67YFQDosjU/WTbOiq81gm/I5OwGDn6Q5gugsDfgPJWG6X/AA3B1usUHYnYVgfaCM+uhNqH49QNjed2pkpiDkdglvxgzosNPl8WvCdELB5sWlkX1iQGEjBSOPc93hNJ8R/sql4VwQTlxEyN3qhVFQNrOXsyGANvYmhgztl5jWIYpo24djKEPHHEjNIvp/5rKNctCPQ0wV4JUdmlo/NdgiYmTC3meRxEgPJVQ9BOIyp9RPTnfVf0MbnThKQ72BjXF0JRZ5m+c2LK2E+sacD0TKxYhtYNkasuvmFJpFA1liyvRVVHmCmzk4/YbjLzg== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 May 2017 20:00:57.9005 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0701MB1725 Subject: [dpdk-dev] [PATCH 14/33] app/testeventdev: order: 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:03 -0000 Setup one port per worker and link to all queues and setup one producer port to inject the events. Signed-off-by: Jerin Jacob --- app/test-eventdev/test_order_common.c | 55 +++++++++++++++++++++++++++++++++++ app/test-eventdev/test_order_common.h | 2 ++ 2 files changed, 57 insertions(+) diff --git a/app/test-eventdev/test_order_common.c b/app/test-eventdev/test_order_common.c index 6d636e66a..935c5a3fd 100644 --- a/app/test-eventdev/test_order_common.c +++ b/app/test-eventdev/test_order_common.c @@ -184,4 +184,59 @@ order_opt_dump(struct evt_options *opt) evt_dump("nb_evdev_ports", "%d", order_nb_event_ports(opt)); } +int +order_event_dev_port_setup(struct evt_test *test, struct evt_options *opt, + uint8_t nb_workers, uint8_t nb_queues) +{ + int ret; + uint8_t port; + struct test_order *t = evt_test_priv(test); + /* 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 < nb_workers; port++) { + struct worker_data *w = &t->worker[port]; + + w->dev_id = opt->dev_id; + w->port_id = port; + w->t = t; + + 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 producer, no links */ + const struct rte_event_port_conf prod_conf = { + .dequeue_depth = 8, + .enqueue_depth = 8, + .new_event_threshold = 1200, + }; + struct prod_data *p = &t->prod; + + p->dev_id = opt->dev_id; + p->port_id = port; /* last port */ + p->queue_id = 0; + p->t = t; + + ret = rte_event_port_setup(opt->dev_id, port, &prod_conf); + if (ret) { + evt_err("failed to setup producer port %d", port); + return ret; + } + + return ret; +} diff --git a/app/test-eventdev/test_order_common.h b/app/test-eventdev/test_order_common.h index ccddef6fb..165931860 100644 --- a/app/test-eventdev/test_order_common.h +++ b/app/test-eventdev/test_order_common.h @@ -94,6 +94,8 @@ int order_test_result(struct evt_test *test, struct evt_options *opt); int order_opt_check(struct evt_options *opt); int order_test_setup(struct evt_test *test, struct evt_options *opt); int order_mempool_setup(struct evt_test *test, struct evt_options *opt); +int order_event_dev_port_setup(struct evt_test *test, struct evt_options *opt, + uint8_t nb_workers, uint8_t nb_queues); void order_test_destroy(struct evt_test *test, struct evt_options *opt); void order_opt_dump(struct evt_options *opt); void order_mempool_destroy(struct evt_test *test, struct evt_options *opt); -- 2.13.0