From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0054.outbound.protection.outlook.com [104.47.34.54]) by dpdk.org (Postfix) with ESMTP id 469581B1B2 for ; Mon, 11 Dec 2017 16:14:36 +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=OVgE2R0Sn/i7nvH4CXzVC9zgvjkDqu0XLWM10NG+qW0=; b=EuDNHgmKPWyQFXUozOqVpyvdufK/JMMBVemeb8qVHaH2cK7AN9Y5Tmb3MNFw+ZJ/8XVqex1SqzjjoXMW1ZRE3y+WCxhUiKqfwsCuufm/5k/JrIjOSFXaoMKDc1pRzmqXqLCY6uvm7lrIJzDJ3Dz/bzIn/Ttle+hRFTcmYV9yzCs= Received: from Pavan-LT.caveonetworks.com (111.93.218.67) by CY4PR07MB3463.namprd07.prod.outlook.com (10.171.252.144) 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 15:14:32 +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 20:43:45 +0530 Message-Id: <20171211151346.14405-7-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20171211151346.14405-1-pbhagavatula@caviumnetworks.com> References: <1508330348-30060-1-git-send-email-pbhagavatula@caviumnetworks.com> <20171211151346.14405-1-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: DM5PR13CA0046.namprd13.prod.outlook.com (10.168.240.160) To CY4PR07MB3463.namprd07.prod.outlook.com (10.171.252.144) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 93978042-1986-4b1e-5ea4-08d540a9e392 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603307); SRVR:CY4PR07MB3463; X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3463; 3:oL/Uv7q5r/w1Q2s8rjcBgX818JfIZ/jnyaSW5vXUKPmt0OtcsmIolios1v2hU87BnOcv7s4pEA3+0I8jo08d5yaPbSnQDe+BXFlZEX2K3BeUJWlDAtp2nmGIXR90MtE+mtq+KDSg+Im470ex86Dcx52bTBtOTjoDrn9A7pvy+YIZTqLp6LNHc5TyYhQpjVjfTwFnjDQytVQs3FPNFamGl0VGpkzCsR/r85y3fnntfZYf/3yDVqrBa0hAp9Gsl02U; 25:A0akGifXRrk5iGQQraJLwSRdWoP3eZbOCxh4aiwiAFvsh75M+aufxnjswHKTqL67zoIOYu/o6kPQMzEKXq/vAUp2BM3nGb7z+OlvDSUEd4Jn9nMjR3T9VZlwNuq0uoNPhk7K/YzzfYOzohnQHMJCu1EbYAD4FixYaPx7eCd1d5kTyXB7gZEW58RUmDbQno44o/AuVw3DcVPlKq82G6TeT+sUuDj5GgU4MooScN4u2YsmaxNec+XrVqQC7JEvre/KnHagD5vVvsJKcG8IXeqLARJFa4RFIalxEdW84ChBbzKxkNacbUNvV/Oz/bHdW4Y/w+yGbNoBfY3BX0kiOEMtGw==; 31:5BwozcHKUqtGh5w+atek1hanPHUFaM0hc1t1nkgLwPSROqjIE+ju8ekZvvpuECaBA38I3V3qdz+Ro8LYKIBfdX/7rFSutTy8CbvkWQ9mf736Q3D4BWTjQWpY+xlJXlP38Vv4vflpxe3gCr9T/j4xwLhd0amyklUVWT1upDqsNkCgK13E47CatbX5lyNCD37cuLL+o4vX7RNU9p+14cD+FYwVpci6YqchC/nn5paCLZ4= X-MS-TrafficTypeDiagnostic: CY4PR07MB3463: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3463; 20:aybWYDhNB63VK0Ht8zZI9u/1TlrUffBXDn5oCLSpbycY62IxPk4mL9bF1YTSbYnGaoM/pf7sABqSUJaE0HovPAmGz3YJoslCcjQKVo9aF/Op0mVKYtQqFhsuYshMl1leFh+qSxAOPZmIAleBGP/nyrWH7ZCuhyDLgy/ImbfPHFVyHi/L6FDYwGhKyrO3En0FOw7DJfiiinFJ6SBfOY42rgMvEqD/Ao6BQ3WBnEaOOu6att+aLgTy9M1zmPHBNb0UZ3qDe/aTarMjxGnrgZ6hFq++qt9zWcF1Oe9Hujo128wJojb0sexhA4MSkOJhNUBD4F3LHOkogce3eVpGsP6MIZgc7D3vcEwyMsJwSFUfkNqMjcATA5IVsUxavm5osZ1CGpcijBID1PQs0KN1l+5nAobiCkk6Fn3FKI8yVJWwGYlsxB5KjOHmDn6CTyokK7RB8YOKeLMXhA/amUuxOeP703zSivfBnsMF+/Zip1vR7dLIvAatNEKZ3AlOWY0sWmHogIT3yAqOTfDb4Gk5iVPeOcZtJabxwtc/TC/aDgwyB31X0JnsbaaEilaky9wJDc+iXMahQKhtvdkkMlaIC8ZqNJ10B7WzpxY1aZ/DCrYyuJ4=; 4:cyTKbp6/IIOupUsfq4t6nUOc6QvxZqh3EcM5Q3BUyNITw0h4w4zBPBxgePp+T1X2F0DtSnAZBCuGCHa7hga0Gnlj3bkZTa/4Wq65syVMXp+uEcJ/w7pJocccul0jf5qDGP9ShGLFlgH8GJEdrYUCK5iQzC1UFfOdtw1BpHnsgX1XAIyh8V2OLK/u0L+QmeUduGJvoMfpPnbJMP5VvUwtIVu+uY4otugIiNGtTxNSMdox/x8e+VA9Mv6icRi5bHxIJxLa6VyfUf2Ox+wljY9jRA== 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)(3002001)(10201501046)(3231022)(6041248)(20161123562025)(20161123564025)(20161123560025)(20161123555025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:CY4PR07MB3463; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:CY4PR07MB3463; X-Forefront-PRVS: 0518EEFB48 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(346002)(376002)(199004)(189003)(97736004)(53936002)(53416004)(106356001)(16586007)(105586002)(8676002)(25786009)(1076002)(8936002)(107886003)(81166006)(36756003)(50226002)(69596002)(7736002)(305945005)(66066001)(50466002)(6506006)(4326008)(16526018)(6486002)(81156014)(3846002)(2906002)(2950100002)(5660300001)(42882006)(6636002)(6666003)(6116002)(316002)(68736007)(47776003)(478600001)(72206003)(52116002)(6512007)(8656006)(48376002)(5009440100003)(51416003)(76176011)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR07MB3463; H:Pavan-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; CY4PR07MB3463; 23:lIN5cqiW3RMTRCBL5bbo1s6sRsbwaXpe7phtHkwzz?= =?us-ascii?Q?YW+5ELuNjAY12Fe/jArpf3c8bnZU7M7VCo6I6Vg1ZFY7cMXhW9AjTVhbSChz?= =?us-ascii?Q?rvbyAXIdwheMAtO/CSiGydXqP6TpoF1cb95Ci8vaRt4drYbhQqH0fvw8EQaq?= =?us-ascii?Q?aJyYHjRYbgFMf6JnaX/4vI9ISEJNHYG9qtUc/wzqP9SF9wfQN9BKEUQNAaSN?= =?us-ascii?Q?5Oxaobd2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pamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Dec 2017 15:14:32.2589 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 93978042-1986-4b1e-5ea4-08d540a9e392 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR07MB3463 Subject: [dpdk-dev] [PATCH v3 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 15:14:37 -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 1fd7ef8b1..9aff31f20 100644 --- a/app/test-eventdev/test_perf_common.c +++ b/app/test-eventdev/test_perf_common.c @@ -267,6 +267,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