From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0066.outbound.protection.outlook.com [104.47.38.66]) by dpdk.org (Postfix) with ESMTP id 1C5CF1B197 for ; Mon, 11 Dec 2017 12:13:28 +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=UdstXGBO5BBfWEgI6ofna/F2KLXOyLaoKgAN1vhqhi0=; b=aFzG3To1otaJS+59zBv3bOj+rXTqZYlfvVgxIfcegJw7aJs1sUvdzCRjCzzxbKwU29hwsd9FwhRDWf1rW96LvZL6TqlIOqLI123tf5zbu36aXBkAW2Rig2BrBgK/AzZRfFV4qTzONQ95GwUrGYEG+n15bG2NaKm1PHlCieyY1x4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from Pavan-LT.caveonetworks.com (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.302.9; Mon, 11 Dec 2017 11:13:23 +0000 From: Pavan Nikhilesh To: jerin.jacob@caviumnetworks.com, 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 Cc: dev@dpdk.org, Pavan Nikhilesh Date: Mon, 11 Dec 2017 16:42:35 +0530 Message-Id: <20171211111236.1331-7-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20171211111236.1331-1-pbhagavatula@caviumnetworks.com> References: <1508330348-30060-1-git-send-email-pbhagavatula@caviumnetworks.com> <20171211111236.1331-1-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BN6PR1301CA0010.namprd13.prod.outlook.com (10.174.84.151) To BN6PR07MB3458.namprd07.prod.outlook.com (10.161.153.21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 90a840e0-6cd7-42c8-f243-08d5408833b2 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603307); SRVR:BN6PR07MB3458; X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3458; 3:cFpSgsmF56heOOxZOzuPGESvzksX/wpf335x5Q73aaxtPIblH7pXtb6B/DYf5EZw0u3mWfrzgFO1jP+pRyX3Wnr2j0+6tyNdiu4g/VOIdg8xTF75O1pmAp0YlTaMeL35T/k8jVkIs84IEzMAEOqGfzauOjD3IKeTFK47Z4M1V8R56prfAHMdRUQZFuWWYBAijB9dLyKkdTTIZxdo/9OPI8Ya/CCoHr7qnxTVXBFH5mid//sMH874Xb9HFpsGxY+x; 25:bThW8ljrjQseMs5pL6IgNjCX7RKieIRhYPR1EATtmDItL1hsfc90ZLrGoF5cUmYtsn6Xr1RSZ/Mg1CSOdjXmaJ+UwC9VXuLqrK65AQmz5N+01VGhGadeS5lSFtJwMc5XuTkix5ofdLLJJ3zFf/3kXA+bNkkYHLB2h5w1GrpdO85YeqVaMAQ+3RtroG2SZYw80PjLNlZIv+3QWTL2ZFYS2HOoY6HFQwmKCss4LoDjfxfMLQ0xHV47ZgU2bpOQC4XPuWtibG4JOU8l7QOTlHFJfMxbvWKi8WIiT5irBE/pItdk50Et6W/Yo8TDZ01jMFCnHznsnobAJgWskqvhtJXzhQ==; 31:amSEm1vwV2C94GVyOjzhGGOdwwrRHvmnu1pDkaOkN6u99LiiFD4G7kwevxJ4V1e39qG5TJ9d7EP+LUyC76g/2KUlg0bAW4pOC/Tr0V4Iel2ablcNUFKq/jxJqTs35BNNtdKoVnw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Wpxg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(5005006)(8121501046)(93006095)(3231022)(10201501046)(3002001)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123555025)(20161123560025)(20161123564025)(20161123562025)(6072148)(201708071742011); SRVR:BN6PR07MB3458; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:BN6PR07MB3458; X-Forefront-PRVS: 0518EEFB48 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(366004)(376002)(189003)(199004)(76176011)(51416003)(105586002)(48376002)(5660300001)(52116002)(6506006)(3846002)(2906002)(50466002)(106356001)(97736004)(66066001)(316002)(25786009)(305945005)(2950100002)(8656006)(478600001)(4326008)(16586007)(16526018)(42882006)(81166006)(6636002)(8676002)(81156014)(72206003)(8936002)(33646002)(107886003)(36756003)(68736007)(69596002)(6486002)(6666003)(50226002)(53936002)(47776003)(6116002)(53416004)(5009440100003)(1076002)(6512007)(7736002)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR07MB3458; H:Pavan-LT.caveonetworks.com; 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:m1/cwzRihHr7u3UNGCuK722JacEn9oC1bwYP7qeE4?= =?us-ascii?Q?fFF3aCHtpK9NyL5jraLHyhyNDwQd6c2v3JXRxDl6O+e8SX1czcmtA+rUWVon?= =?us-ascii?Q?PoiqlZG0HuTLtHfocqPO4d5DJpCHTxqly1e8A5XUCfqCj2qUVggpJzWQDyVw?= =?us-ascii?Q?1rqd2sFZSSKOYgnpjmwfyp9CHNRWwoG+KEiWaWwFjoI/xf57J3Cswx2Dxctk?= =?us-ascii?Q?WX3ZhnZ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osticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Dec 2017 11:13:23.9732 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 90a840e0-6cd7-42c8-f243-08d5408833b2 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 v2 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: Mon, 11 Dec 2017 11:13:29 -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 0fadab4a0..042823a52 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 1fe16ed63..8ca07d4f8 100644 --- a/app/test-eventdev/test_perf_atq.c +++ b/app/test-eventdev/test_perf_atq.c @@ -239,10 +239,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 483103b11..e03a80272 100644 --- a/app/test-eventdev/test_perf_common.c +++ b/app/test-eventdev/test_perf_common.c @@ -268,6 +268,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 e446c5437..4583122b3 100644 --- a/app/test-eventdev/test_perf_queue.c +++ b/app/test-eventdev/test_perf_queue.c @@ -252,10 +252,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.14.1