From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0045.outbound.protection.outlook.com [104.47.40.45]) by dpdk.org (Postfix) with ESMTP id 406CD1B53 for ; Thu, 28 Dec 2017 11:57:33 +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=smqM78xVwYW8976jfVjtASIYbPUQebmvWR6IAup7UE4=; b=N2asjEPXwU8HLSzvkhizLzh7dzO7MRUPiomOk5EryeDWYJarwHFIhlxwlLnhjJP11SjLclr7qIgvl/mpKvPwvfjZ6UQbGyJCaQbG0wRb922VsWwuaavKukywnZcybRO0HgrTBOm5v3dHSyvCq/h7wCMMU03uOpkhC9wHG4jwZ80= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from localhost.localdomain (111.93.218.67) by BN6PR07MB3458.namprd07.prod.outlook.com (10.161.153.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.345.14; Thu, 28 Dec 2017 10:57:29 +0000 From: Pavan Nikhilesh To: jerin.jacob@caviumnetworks.com, harry.van.haaren@intel.com, gage.eads@intel.com Cc: dev@dpdk.org, Pavan Nikhilesh Date: Thu, 28 Dec 2017 16:26:53 +0530 Message-Id: <20171228105653.4231-1-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.14.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: SG2PR06CA0111.apcprd06.prod.outlook.com (10.175.207.141) To BN6PR07MB3458.namprd07.prod.outlook.com (10.161.153.21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c1fcdf09-eb94-487a-76d0-08d54de1cb3c X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060); SRVR:BN6PR07MB3458; X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3458; 3:Y4uXsH0dQwuli5atHCnYvSxeevwL1yQndRLh9jEMa4cI87KJ1jMu+h5AC5SaIT3f4LXpLpr0prmHdIdPNgC2xbN6QS+XiSWMKaV3keYvptI246zNdV8Kpzc4rnVsC6tA0+ghP5yUf4C5COOKL40yZz4Chz+uoJm9DUnyt4aLPJrWaFA+LflGO5J47RIli4qFP/baxKU8FYpblwBUE3VO3nFyQuuLFdyEOVLPbbfuFifFjdW/YV6/a4mg3QIttS3u; 25:Ed7aHUZ1tBqnugdj3I8i2QsGYg8YJXSfQxM1yrCsQE78dqf0gxWfwB7mG0ZCDE+TQ4ypCAS3Vbn+wydJpg6GeUfalM93SwI03Xwd0ztSWREhYIx0V/WoNF9DzH1jogFq4CBtSpfQAbMb1FA3l7940rbq1PnqGhnUiWicx7//rpWi+1Ac7y29uHyA0NPFRAfWR0PJaCm7jqV0hAmfUrSYBzYnLseFsv85KgxKD1xOCuqQi9tyLyuM4hACpE7kLD/a78Yd5V5B0HVerXW3HD9MFGM/CxzRYaTauk2YvmV0ByAjFn9rLcEx0R6yhCguJuvuVu+d5c8vDF4RkA4GEjHLr3CMymYp1hzPyYbYPkvigrM=; 31:KdH9nIUNFsq24cQKRQ/fneBxjLnyYuywkw/v+sVRrQ2je4nfG2zQWL8WOFzyBEG1tZF9SU0pn57+YSKQ5Aa410kgStpGdUcRTyswTyTUjLoXj+x8ARDk8bPs9zpVDSeqlT+CcUlxMjnKhlKEJYpWlduhFUval7QfuaC/cMsfjCWHGTf65U5uYKH8nAh807H/7S0uMdgIFWZ/Bi1cj7LzafR8Z36WJzYG365hdylMyCY= X-MS-TrafficTypeDiagnostic: BN6PR07MB3458: X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3458; 20:xRXbLks6mTQaBF6OTfFBDVPzmi/9CAhiLxY8jWR2jbB1mqnEip9Baec4E4RvGQHdKRbqgvAhMeeDy9Vq4i0fRHp46w9k+YI47W67JHPeRGjosgDhO24+gKMxUxuT7hRQyj6xlDsZA4g9oq9Bjm3ARZYE6ipdRHS9mJTIotbJm27fM4mpwkBbi50cQjNKx8YjGRjXUx/JIv2HUN/lSNOjvyap8eTUWeBOBZQ0vR4jXVmq8lE3bdD5BhjxXDTM/K5W2oc8eqq11kNlle/OeZ1sf94h5Ps3maCEtW0vQjCwiOAKNoEkm3SmLwUe4ABAtyDbY7ggdBq7cl6QdKI+Rj32IinIdQI1iURa+y/AfVEOSCfaNC1/sPekr6RgjhA1fBRqgdfRRZbl9vgGlolYSaW4jxqQ7EbBHu4x4kIvjtGme0ha3ErGFjfSlQ3voLtgE+udLU/So+WP7qDubDXxL6HLUh9zMIYWQr7+oc5T4Ge+ctqzl3446x3rxsUKA7IxWwiEmQq9VdRtCIMExldc1YuFFL7JfBhbri/YwLuWzVaHTFRtLIkuXo1pC0P3u4l8JjYwr3dmem8lD2dIgKXeQuWTMxhGGILuXq325iOdgm+jeDg=; 4:P2bJVXOLhnLSe+wDXqat8aaiazyTNles6JRVcaCCt80ufxT0mvODQzd39kv+zRSVWA4A6CHWxm/y0vUtHcVGlHLMWKj4RA5281xM+YFa00DpiS8xmFuzBABnchSAoPEECMC9pBqYg/gaAneffeLNS33vmA5Ee5n7SpDrp4awPP/+hU91s6pd9MfPhg8vQevFCA7mDI50ASUZGIUYG1T+agRT6dDM6AyBVvUs6tqoBvaMbP7tH3Zb/MCckC70QhIkmXx9Hl558361wo22n1aqGw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(8121501046)(5005006)(10201501046)(3002001)(93006095)(3231023)(944501075)(6041268)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123562045)(6072148)(201708071742011); SRVR:BN6PR07MB3458; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:BN6PR07MB3458; X-Forefront-PRVS: 05352A48BE X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(376002)(396003)(346002)(366004)(39850400004)(39380400002)(189003)(199004)(305945005)(42882006)(81166006)(7736002)(59450400001)(478600001)(51416003)(52116002)(6116002)(3846002)(25786009)(36756003)(107886003)(5660300001)(48376002)(50466002)(72206003)(6666003)(8676002)(16586007)(316002)(16526018)(53936002)(81156014)(97736004)(50226002)(6506007)(4326008)(2906002)(386003)(8936002)(105586002)(68736007)(575784001)(47776003)(106356001)(1076002)(66066001)(6486002)(5009440100003)(6512007)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR07MB3458; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A: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; BN6PR07MB3458; 23:6cIYDhJIprVfgxOkdLad1GyHKdUYUVHhIKSGlI3QX?= =?us-ascii?Q?VK5LX4qjdZ3hILshTBgjUAdeoelsnhFPBP96UUzxYI9iY8PChcvX/pq0a8Fy?= =?us-ascii?Q?/deYAH3VubOUZBM9AeGHJZ/4UW/9X0Vmg7JN5MYR0ww3Zb60Xw90z2AUb3sU?= =?us-ascii?Q?oHjMUOHwii03RFJitVDCJ6Gv/zzuF60/SB8ktt1O+F4CfLUqzsnX7rqf0IeF?= =?us-ascii?Q?wGlEID0yN5rGpkR579cPzV/wMJML4IvVAMHppe60UFFBWtJontX4eogRBu7g?= =?us-ascii?Q?b6JROgrMKfNqsTYDEV9sKwfH8vXxN7MCoCfFc8WhpiR9kphGLMkokQ6pTjXw?= =?us-ascii?Q?hQgPdMPxvoicLy/fFsRpRZGAWzKg3EnZPmIsZphpWXcUpu4cbiuXXsdr0Mnm?= =?us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10tQt5ihtcTZbdya4Zl/4ACnhHIi2Y8Xs4ERi7LmMZc4FdMemtePPuTw0aHK2I8m3skdDEZTeJiOLNCzFoxJlRpwaZkfLctyefQLnPne4obnAbs4R8q40vpW6dQWiIXrFGnfo5uRy31dxNDkDXSdI05g0bFyscuhP7YMWMDE4bltWLQdMYpYyX5FTG6fWP8m1RAxcnm+ddNwqz/IGQx1FTVVb/H+hG9fUsVcMnW4NdX9BqcNQ/wOZp9yhOFlA8K6YFEkzcSD0y9KGrJ7QoK2ipCgEnWL8k5xm9i9qj09L8xYCQ5ysDN6fA9p8=; 5:kjYx5v8Rb+pcAZ9CMWriZnt5uoDljCTxi+1unYZvpDu1IesTxf/aaCpPLC9dxDLXSPQraC2doB2QqwixzTAUeD4ZUIRQ4WuIEM67tY7bjW1qqF6JmUdhWkozBZ6eoVDP/cO/YsAPSttNlFUMStB+TvSlfqOEoDwcQwRlCUyv8XM=; 24:MMd5YO3zrD60FrfHhvClswg5rphCbqrrFRGLxnMfsi+xGUcAQZVmwYiFKY3sBN8ZehVJpZLzNBpxKgWU7Ls826o2jwFVKFAd+TV7FwwFmwc=; 7:SoOF37WAGD2FdlvtXihJwVEb9aNUHNU9rrElpobJA6S0t8t6lTaqT0NKhRSoDlp28HEWIluuCWI2A643npwV5kvoFoWDMeuQTbJi4bUaVPQfvN7H8LLjeA1rBeKeqB9/QB1xhHJfowQGVweJFm2QcC28nVZ8xPdTW/pLPCllTyOeKNzvZp03SJPT8fpKjOFlJ/JhStS9sdcD/RAgYpGaQEldYgN3NZwJhsX610MRdmG5dyo97/JVedqBv6Eolu/q SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Dec 2017 10:57:29.1761 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c1fcdf09-eb94-487a-76d0-08d54de1cb3c X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR07MB3458 Subject: [dpdk-dev] [PATCH] app/eventdev: fix event device queue count 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: Thu, 28 Dec 2017 10:57:33 -0000 Fix the event device queue count reported when producer type is Rx adapter for perfomance queue and atq test. Fixes: 20eb154e0435 ("app/testeventdev: add perf queue test") Signed-off-by: Pavan Nikhilesh --- app/test-eventdev/test_perf_atq.c | 6 +++--- app/test-eventdev/test_perf_queue.c | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/test-eventdev/test_perf_atq.c b/app/test-eventdev/test_perf_atq.c index 8ca07d4f8..8e8e2fa87 100644 --- a/app/test-eventdev/test_perf_atq.c +++ b/app/test-eventdev/test_perf_atq.c @@ -38,7 +38,8 @@ static inline int atq_nb_event_queues(struct evt_options *opt) { /* nb_queues = number of producers */ - return evt_nr_active_lcores(opt->plcores); + return opt->prod_type == EVT_PROD_TYPE_ETH_RX_ADPTR ? + rte_eth_dev_count() : evt_nr_active_lcores(opt->plcores); } static inline __attribute__((always_inline)) void @@ -193,8 +194,7 @@ perf_atq_eventdev_setup(struct evt_test *test, struct evt_options *opt) 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); + nb_queues = atq_nb_event_queues(opt); memset(&dev_info, 0, sizeof(struct rte_event_dev_info)); ret = rte_event_dev_info_get(opt->dev_id, &dev_info); diff --git a/app/test-eventdev/test_perf_queue.c b/app/test-eventdev/test_perf_queue.c index 4583122b3..86eb1f0b5 100644 --- a/app/test-eventdev/test_perf_queue.c +++ b/app/test-eventdev/test_perf_queue.c @@ -38,7 +38,9 @@ static inline int perf_queue_nb_event_queues(struct evt_options *opt) { /* nb_queues = number of producers * number of stages */ - return evt_nr_active_lcores(opt->plcores) * opt->nb_stages; + uint8_t nb_prod = opt->prod_type == EVT_PROD_TYPE_ETH_RX_ADPTR ? + rte_eth_dev_count() : evt_nr_active_lcores(opt->plcores); + return nb_prod * opt->nb_stages; } static inline __attribute__((always_inline)) void @@ -190,9 +192,7 @@ perf_queue_eventdev_setup(struct evt_test *test, struct evt_options *opt) 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() * nb_stages : - perf_queue_nb_event_queues(opt); + nb_queues = perf_queue_nb_event_queues(opt); memset(&dev_info, 0, sizeof(struct rte_event_dev_info)); ret = rte_event_dev_info_get(opt->dev_id, &dev_info); @@ -224,7 +224,7 @@ perf_queue_eventdev_setup(struct evt_test *test, struct evt_options *opt) .nb_atomic_order_sequences = opt->nb_flows, }; /* queue configurations */ - for (queue = 0; queue < perf_queue_nb_event_queues(opt); queue++) { + for (queue = 0; queue < nb_queues; queue++) { q_conf.schedule_type = (opt->sched_type_list[queue % nb_stages]); -- 2.15.1