From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0089.outbound.protection.outlook.com [104.47.34.89]) by dpdk.org (Postfix) with ESMTP id 02F991AEE8 for ; Wed, 18 Oct 2017 14:40:30 +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=zCoeKdETMIZGc3+PYi0qlEpWZEFqCjAxDY4TjnyP0q4=; b=IhmPPLJwDQdVTlkpaM47JeTmbxAV2+lrRRFofzBMSHisqnIi6WS+Nficrv9MlBU3i3s/9QcyllA5t/LWl6t/Ib8vAE1SddqvCiOnN1V/fE2ZaeezApgPZ+8YAJTPNiDkdtlxNjgWUODJzNsLkY044pRGllXTfRPgeHFrwqLrzSw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from PBHAGAVATULA-LT.caveonetworks.com (111.93.218.67) by DM5PR07MB3467.namprd07.prod.outlook.com (10.164.153.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Wed, 18 Oct 2017 12:40:24 +0000 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 Date: Wed, 18 Oct 2017 18:09:07 +0530 Message-Id: <1508330348-30060-8-git-send-email-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1508330348-30060-1-git-send-email-pbhagavatula@caviumnetworks.com> References: <1508330348-30060-1-git-send-email-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BMXPR01CA0040.INDPRD01.PROD.OUTLOOK.COM (10.174.214.26) To DM5PR07MB3467.namprd07.prod.outlook.com (10.164.153.22) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 04ac3c07-ca18-47e9-779d-08d51625695e X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:DM5PR07MB3467; X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3467; 3:pg77A9cbqYA4XMXin6jJNkJRGDUsovH5DMUX/5c691oPQn2o4HAlJjgBkeL+rR661hd6mW9bX34uNdQHVSSMP7tdyY3E1j2Dttuf3pchhWBdcUReaEWQfVWDrKTiICIIaENkRmHoBD2P7XnUX8H+lLa9ARlc5NOQQYJkLriJLuXnHFW3vEqsLFqwMTtiyoD8rrKLO1crHeGbuNqHqZHVlb0wOMx1mvX+IZk0km6oT+cl4y77AwTEDVzh/Dp+mcWY; 25:7orK55IfPxRLBCPq2iLgoW+a93CZTKJif5s0yMa/ViE76JElhskkcE4NXgvWqrIdCq0IYPZyyQfXVbiC3EhTQJSDcXPrG/zlxtOhEXea/iSPHy5+LNc3MCT+jv95w7IWhd+dKgpz/fvasCp2fDPpZ2cAO/ngvAI0mqzkJ0dQxFJEjFT18PUESkDUx4oYR7o85iucvGInoudKZvm+NFHX1ie0dnYamXpFI3KffCU7/6E6JpzNGAAJ/PI4GpGve7RcdNcqleSWajDLn82HCJul2zIic+n3nUz8/v9H3qQVv8ocnrId+z0rWZErxxhCFAJ0WqMSB5gvy6f5QGmx8rsCmw==; 31:HfNoHlnrfDgiNHlZ8cpXGDi3hzQ41USZHwT35MQyWyoCSYGa0FTzkSxeGhYP75XhUPOrpXVd6fGSHtnkuxsMjfVyhwp9CNBkQy/6xd1fz7ZDkl5scJiyXnrTezA/sGHJNavR0DCmFB7s59DhJ3JWYVj9JtWvtAQsMv/yrW2OAzyF3UH9AhLhHoXFt8g7LwNNS4/AETTamrRDHgSwQZg79wRJpnbSBkonGosTaYlG4XU= X-MS-TrafficTypeDiagnostic: DM5PR07MB3467: X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3467; 20:s1nJk06ziUBnhfbQ6xNoJ31e43146YcWi4MeX/BVYsLTjRkT/N9V+7toyugUkNfzH8fLgKJwvL6fiHWmAfJp83DtB+2w9ro6e4n86MiVuIfqJmc2tXYhfYShhPNWj5hTdlaJ5baDeaBwUnW5dfM+e7lCVcgM0l6PjKYCNYXF+3AjBIUggzzhf3vXALfTV8RnWGDnvAf3OuwbpZcYpzhR9N3b1IhdQxPhiGdNvmYOa6INB9sXvIdjYfb58JmRwFCTyOHTcqhAVwiG0KyMxEiw7frgtF2puZz7Xlt8CtBCKcd/HBnawT154y1l9m2ZwmfWN3+ziZcxtmMMjNeRhUUJhl1D4nDTe19CfBynFJs1hjo2+1jkcHh6XGuxEk7A6PgOZyxlR5mIA7RFq2d5Ybt9cuwC9OP4qlqVGmLB8cnEikjZnwunQ6mFgTkR5YCbFn/sxS7jY452wg/nx081HekXCyDYBK/Z2OSX/sgxDfsEW2z+NbkBWAfAYmI06INtl92MU74SixbpMCtUoCn7WPI7rb+TRyAq0YtQjwVJsKUhtuYdtdzEke02ncrejFNUDqRiy33bjKkeNK73f2JwgOiIxU4zixzbKy2c4ecvKghKPFw=; 4:Wdv8hB1MSdb9fnd9bIp3eETMngtYe8cqpIsrWt05VPJanYCvbC26ZI1QaTehCR2hpPaTSEm9uIgMFEkI6virPoCEb7hogq/LcKhndePiPHx1j4mRaEol2JSgyyfeyX1UR8l2l2zdCt5LglkVnxPhhPiS7p7O5BDhDJOMMXwJGfnX91Zv32vV1p8TJODkN+yvPGc5w6CSAq59b+KsQK8ReKau3unQc8VViKmWWzLIDXLxh0jR8cj655yZb9ejs2sO X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(93006095)(100000703101)(100105400095)(10201501046)(3002001)(6041248)(20161123558100)(20161123562025)(20161123564025)(20161123555025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM5PR07MB3467; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM5PR07MB3467; X-Forefront-PRVS: 0464DBBBC4 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(346002)(376002)(199003)(189002)(36756003)(316002)(72206003)(478600001)(48376002)(16586007)(106356001)(25786009)(53936002)(107886003)(6666003)(50226002)(8656005)(6636002)(105586002)(2950100002)(42882006)(8656005)(50466002)(5003940100001)(6512007)(6506006)(101416001)(189998001)(6116002)(33646002)(4326008)(5660300001)(2906002)(81166006)(7736002)(5009440100003)(6486002)(3846002)(97736004)(305945005)(53416004)(81156014)(66066001)(76176999)(8676002)(8936002)(16526018)(68736007)(50986999)(47776003)(69596002)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR07MB3467; H:PBHAGAVATULA-LT.caveonetworks.com; 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; DM5PR07MB3467; 23:kugWaYwnSnEtWA5+fhDlpLNSroFaf48+Wvizfyqaf?= =?us-ascii?Q?cv1RvM9MAbLQNQfNEzzbRFBW7Qt935jf+02c7TFBV7F0MPKnZPbptFiMCyO5?= =?us-ascii?Q?47dTy91AqiRCqQFvalkfJIXID0Y5VYFllcLyzHThDGGMab1x45fL5FYCA4sG?= =?us-ascii?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2/wazwbrtGl7mMCC/gPn+dl+vUWFv99XrSyTJb28p+mUb2uBijcl/msz7nCC1zOLM2pRM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Oct 2017 12:40:24.8005 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR07MB3467 Subject: [dpdk-dev] [PATCH 7/8] app/eventdev: add service core configuration 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: Wed, 18 Oct 2017 12:40:30 -0000 Add service core configuration for Rx adapter. The configuration picks the least used service core to run the service on. Signed-off-by: Pavan Nikhilesh --- app/test-eventdev/evt_common.h | 41 ++++++++++++++++-------------------- app/test-eventdev/test_perf_atq.c | 12 +++++++---- app/test-eventdev/test_perf_common.c | 13 ++++++++++++ app/test-eventdev/test_perf_queue.c | 12 +++++++---- 4 files changed, 47 insertions(+), 31 deletions(-) diff --git a/app/test-eventdev/evt_common.h b/app/test-eventdev/evt_common.h index 0fadab4..042823a 100644 --- a/app/test-eventdev/evt_common.h +++ b/app/test-eventdev/evt_common.h @@ -94,41 +94,36 @@ evt_has_all_types_queue(uint8_t dev_id) } static inline int -evt_service_setup(uint8_t dev_id) +evt_service_setup(uint32_t service_id) { - uint32_t service_id; int32_t core_cnt; unsigned int lcore = 0; uint32_t core_array[RTE_MAX_LCORE]; uint8_t cnt; uint8_t min_cnt = UINT8_MAX; - if (evt_has_distributed_sched(dev_id)) - return 0; - if (!rte_service_lcore_count()) return -ENOENT; - if (!rte_event_dev_service_id_get(dev_id, &service_id)) { - core_cnt = rte_service_lcore_list(core_array, - RTE_MAX_LCORE); - if (core_cnt < 0) - return -ENOENT; - /* Get the core which has least number of services running. */ - while (core_cnt--) { - /* Reset default mapping */ - rte_service_map_lcore_set(service_id, - core_array[core_cnt], 0); - cnt = rte_service_lcore_count_services( - core_array[core_cnt]); - if (cnt < min_cnt) { - lcore = core_array[core_cnt]; - min_cnt = cnt; - } + core_cnt = rte_service_lcore_list(core_array, + RTE_MAX_LCORE); + if (core_cnt < 0) + return -ENOENT; + /* Get the core which has least number of services running. */ + while (core_cnt--) { + /* Reset default mapping */ + rte_service_map_lcore_set(service_id, + core_array[core_cnt], 0); + cnt = rte_service_lcore_count_services( + core_array[core_cnt]); + if (cnt < min_cnt) { + lcore = core_array[core_cnt]; + min_cnt = cnt; } - if (rte_service_map_lcore_set(service_id, lcore, 1)) - return -ENOENT; } + if (rte_service_map_lcore_set(service_id, lcore, 1)) + return -ENOENT; + return 0; } diff --git a/app/test-eventdev/test_perf_atq.c b/app/test-eventdev/test_perf_atq.c index 8bc701b..67cf58a 100644 --- a/app/test-eventdev/test_perf_atq.c +++ b/app/test-eventdev/test_perf_atq.c @@ -231,10 +231,14 @@ perf_atq_eventdev_setup(struct evt_test *test, struct evt_options *opt) if (ret) return ret; - ret = evt_service_setup(opt->dev_id); - if (ret) { - evt_err("No service lcore found to run event dev."); - return ret; + if (!evt_has_distributed_sched(opt->dev_id)) { + uint32_t service_id; + rte_event_dev_service_id_get(opt->dev_id, &service_id); + ret = evt_service_setup(service_id); + if (ret) { + evt_err("No service lcore found to run event dev."); + return ret; + } } ret = rte_event_dev_start(opt->dev_id); diff --git a/app/test-eventdev/test_perf_common.c b/app/test-eventdev/test_perf_common.c index 0ade1dc..873eab9 100644 --- a/app/test-eventdev/test_perf_common.c +++ b/app/test-eventdev/test_perf_common.c @@ -269,6 +269,19 @@ perf_event_rx_adapter_setup(struct evt_options *opt, uint8_t stride, return ret; } + if (!(cap & RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT)) { + uint32_t service_id; + + rte_event_eth_rx_adapter_service_id_get(prod, + &service_id); + ret = evt_service_setup(service_id); + if (ret) { + evt_err("Failed to setup service core" + " for Rx adapter\n"); + return ret; + } + } + ret = rte_eth_dev_start(prod); if (ret) { evt_err("Ethernet dev [%d] failed to start." diff --git a/app/test-eventdev/test_perf_queue.c b/app/test-eventdev/test_perf_queue.c index 16e2c9d..23a8a6b 100644 --- a/app/test-eventdev/test_perf_queue.c +++ b/app/test-eventdev/test_perf_queue.c @@ -243,10 +243,14 @@ perf_queue_eventdev_setup(struct evt_test *test, struct evt_options *opt) if (ret) return ret; - ret = evt_service_setup(opt->dev_id); - if (ret) { - evt_err("No service lcore found to run event dev."); - return ret; + if (!evt_has_distributed_sched(opt->dev_id)) { + uint32_t service_id; + rte_event_dev_service_id_get(opt->dev_id, &service_id); + ret = evt_service_setup(service_id); + if (ret) { + evt_err("No service lcore found to run event dev."); + return ret; + } } ret = rte_event_dev_start(opt->dev_id); -- 2.7.4