From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0045.outbound.protection.outlook.com [104.47.42.45]) by dpdk.org (Postfix) with ESMTP id 358061B75A for ; Fri, 13 Oct 2017 18:37:17 +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=LCvbQMyH524UrBORV35yrx6j3koZYnfPPbtpJt7cC8o=; b=Ceb5r+/qpmQo5ih6lhHorx0CIGo3PzgAq344CuZS7c8ErdlliHpzejtEqEGzRKfjOGQ4noep+H/XS+XflEgVQBIbWwxKFniRV4pkIbf3KeH+byObkASjS32cnA1czpDp+z3N1kUYgFiY5yy7g0uLAdf7WiwtwqE2paKsHlX8/sQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from PBHAGAVATULA-LT.caveonetworks.com (111.93.218.67) by CY4PR07MB3464.namprd07.prod.outlook.com (10.171.252.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Fri, 13 Oct 2017 16:37:13 +0000 From: Pavan Nikhilesh To: jerin.jacob@caviumnetworks.com, hemant.agrawal@nxp.com, harry.van.haaren@intel.com Cc: dev@dpdk.org, Pavan Bhagavatula Date: Fri, 13 Oct 2017 22:06:46 +0530 Message-Id: <1507912610-14409-3-git-send-email-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1507912610-14409-1-git-send-email-pbhagavatula@caviumnetworks.com> References: <1507712990-13064-1-git-send-email-pbhagavatula@caviumnetworks.com> <1507912610-14409-1-git-send-email-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: DM5PR05CA0054.namprd05.prod.outlook.com (10.174.188.171) To CY4PR07MB3464.namprd07.prod.outlook.com (10.171.252.145) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9538b5a9-c9c7-4350-4966-08d51258a962 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:CY4PR07MB3464; X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3464; 3:Qgl93exWRgB6dqUN0kpPPv60eABrbIdYVmX4yMOr93uC7lXa3zMffZC4H9sa085wUlL2V3IeWozIFwXVVIaj5QR3tEUPPmlP8SLV+8Fj3lKwOk0doMhisSQB83COE92wJ4dcY8PZAAS0Wq3m/eswOksq5L7e54Itg8nbapTsoMEKLB6m+JteXjgvH7hUu5n763L28oyO9g2GVldRDNUplYn2hwOEutsSoLx7oZLJWl1r6iGquYPmcOUL60GmJkTN; 25:np5i3GtPyOu0KWy6qjFlbXbr5zBRrknmfPSoWI2Bu1OQZjnaQ2zDJ7wBTeJV/Sxaw+6KihstZjHgsTe3TEPo7SSV+9g0bpC+JcB6r89rQrawpM0LFkxzoq5NWYoSUHV7M7MCcuqy502FL4Rb67SNSH0FA0VgukyIHo/lvWaYMIjCIS2jLfj8bjMG13vxnUh9y019x3ekAsDLhtW/sRPT7MyuqIKY6qkSuv6QVtsZyUDVcVG7A12II7xdnV45h16gTZ+DRnWiNXivLKgJkeM9f6DP4xiwC7VKpZ38F3qQK5hWCo0orffMCuPgU7YHGO3R2LYh5994RxKSUcEdjsbXmg==; 31:lNjmLutUOGkvhg6tgq/qAVuMhAM2ZnLqp8ouYI7OZmKzlXdxkHKCpJj+3Td5uTRlkAaNsp4NsFGEp0lOhPtqkFA2Tt0cW8B05Av2diiSw0bejDbtj8CGThPtUG8plLM/9NaUlI7DpWEWpx106x0ryJkeoXohc90Uum4Aitl2s2zdYkHgGKZSF/N2yzIF1GFoN3JC1qvO1ZKELr0v00r3Bil9kO7+W0O6kHaJ/CCXEmo= X-MS-TrafficTypeDiagnostic: CY4PR07MB3464: X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3464; 20:Krz5YNcO7PvuI8WDCO9qS03+fnPQSCJw2QxvsWzp7CwNea8uWI7MGKewE9yR2vQXGMSvOkMWBeFf3Hy4BwgfSvEbu7IpW/N5DlOgKvOG0qQloTypH84et3GGKMEwclrxL04HJObK6Dm+f2p+045l14l6gLClGOgLJJJXh0F+Qv9iJYvnS1NK+0lDs8wrJA1hIpCw2watj4JApIbJ4vNgqT781bayM69p03wyikQBiwxChAdk9m3z7iPHWTYYYaybPXmvIGJ44U6u/KsayYXe/Pm+TWTbBjgpD1Vi24rxXv4j4ah+pHwQM/selKYhPI4QJvgpZN1cxTuA7Ghh5f0z6mtKNxLfF8I1bYG+hrEQqNQnr6HXRdN5D2xs7HYNaK5/pb3PiJjhv9JOt8BB2Xw8CT4VjrGDFLMynOwXi2ZFAOD3OAHYXzjkrunk7bX0RtvAYomBOnMNU8CuFrpJ3TRfae3kEC4t6y+JCDrBgicRCMxo0p/rnQMa+SYW1/i92YmtyOSW8loaPr0Y9Cx7nauh3f1z8OXZ3TeN5sC5D5klSlTzf2lWE6UXfHKxDBtq4MBoke+ty+HFIaDljrDlp87v6hhokB3Kr0t17gd1NhNte4E=; 4:jDbOFQ2hhLVxw/YsBJLMp9btJ7LAOPcBx63EbalLN06KZi0OYSITupUPrTwooQgcy6P9VsAEl4WkURPBuVHaOuKySTraTQ4PTwJjzBpin9qsCa9MEZULk8YHdasgEnmPUi9FIFM2dufZ5e4gjIyaj8854LsiVd4LBtCtTTaTVXk/pBhhh3AOvUfF7N+ZbrZlrFqm8DlcrPAmgfHTv8bPJWfmaMYzxk3dTR9P+Yrf51Ei9pAy2jPKViTdECReajKe 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)(8121501046)(5005006)(10201501046)(3002001)(100000703101)(100105400095)(93006095)(6041248)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123560025)(20161123558100)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY4PR07MB3464; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY4PR07MB3464; X-Forefront-PRVS: 04599F3534 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(376002)(346002)(189002)(199003)(68736007)(5660300001)(53416004)(15650500001)(3846002)(6116002)(33646002)(6486002)(316002)(6506006)(575784001)(5009440100003)(50466002)(72206003)(478600001)(4326008)(2906002)(2950100002)(25786009)(42882006)(107886003)(6666003)(36756003)(53936002)(5003940100001)(48376002)(69596002)(97736004)(105586002)(6512007)(16526018)(106356001)(50226002)(8676002)(50986999)(7736002)(189998001)(101416001)(16586007)(81156014)(8656003)(47776003)(81166006)(305945005)(8936002)(66066001)(76176999)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR07MB3464; H:PBHAGAVATULA-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; CY4PR07MB3464; 23:TPWvuISzvLssOiH9Mj5kcTcr/9AJEmIOlyw/ma4ve?= =?us-ascii?Q?xwTF3WJCwId4HURBWhhFYMc2eulms8JQgwbsnpd1w9lHkoaQG6zgkmenFLEq?= =?us-ascii?Q?mSYV5j1Th3FJGT6KBjQaxXlGycyQDk75q80nhYQOC3eRcK23AU89s/pTv9yQ?= =?us-ascii?Q?83t0+UCPhnduInDad7Noq6HpfJqaIofw2GrHZh8qqDpbTlt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FZsitfpdBMhqrny3F2DQm4+PhjXdk4ZSjPa4KLq8Y8E7qMUQg= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Oct 2017 16:37:13.2012 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR07MB3464 Subject: [dpdk-dev] [PATCH v2 3/7] app/test-eventdev: update app to use service cores 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: Fri, 13 Oct 2017 16:37:18 -0000 From: Pavan Bhagavatula Use service cores for offloading event scheduling in case of centralized scheduling instead of calling the schedule api directly. This removes the dependency on dedicated scheduler core specified by giving command line option --slcore. Signed-off-by: Pavan Nikhilesh --- app/test-eventdev/evt_common.h | 41 ++++++++++++++++++++++++++++++ app/test-eventdev/evt_options.c | 10 -------- app/test-eventdev/evt_options.h | 8 ------ app/test-eventdev/test_order_atq.c | 6 +++++ app/test-eventdev/test_order_common.c | 3 --- app/test-eventdev/test_order_queue.c | 6 +++++ app/test-eventdev/test_perf_atq.c | 6 +++++ app/test-eventdev/test_perf_common.c | 47 ++--------------------------------- app/test-eventdev/test_perf_common.h | 1 + app/test-eventdev/test_perf_queue.c | 6 +++++ 10 files changed, 68 insertions(+), 66 deletions(-) diff --git a/app/test-eventdev/evt_common.h b/app/test-eventdev/evt_common.h index 4102076..1589190 100644 --- a/app/test-eventdev/evt_common.h +++ b/app/test-eventdev/evt_common.h @@ -36,6 +36,7 @@ #include #include #include +#include #define CLNRM "\x1b[0m" #define CLRED "\x1b[31m" @@ -113,4 +114,44 @@ evt_sched_type2queue_cfg(uint8_t sched_type) return ret; } + +static inline int +evt_service_setup(uint8_t dev_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; + } + } + if (rte_service_map_lcore_set(service_id, lcore, 1)) + return -ENOENT; + } + return 0; +} + #endif /* _EVT_COMMON_*/ diff --git a/app/test-eventdev/evt_options.c b/app/test-eventdev/evt_options.c index 65e22f8..e2187df 100644 --- a/app/test-eventdev/evt_options.c +++ b/app/test-eventdev/evt_options.c @@ -114,13 +114,6 @@ evt_parse_test_name(struct evt_options *opt, const char *arg) } static int -evt_parse_slcore(struct evt_options *opt, const char *arg) -{ - opt->slcore = atoi(arg); - return 0; -} - -static int evt_parse_socket_id(struct evt_options *opt, const char *arg) { opt->socket_id = atoi(arg); @@ -188,7 +181,6 @@ usage(char *program) "\t--test : name of the test application to run\n" "\t--socket_id : socket_id of application resources\n" "\t--pool_sz : pool size of the mempool\n" - "\t--slcore : lcore id of the scheduler\n" "\t--plcores : list of lcore ids for producers\n" "\t--wlcores : list of lcore ids for workers\n" "\t--stlist : list of scheduled types of the stages\n" @@ -254,7 +246,6 @@ static struct option lgopts[] = { { EVT_POOL_SZ, 1, 0, 0 }, { EVT_NB_PKTS, 1, 0, 0 }, { EVT_WKR_DEQ_DEP, 1, 0, 0 }, - { EVT_SCHED_LCORE, 1, 0, 0 }, { EVT_SCHED_TYPE_LIST, 1, 0, 0 }, { EVT_FWD_LATENCY, 0, 0, 0 }, { EVT_QUEUE_PRIORITY, 0, 0, 0 }, @@ -278,7 +269,6 @@ evt_opts_parse_long(int opt_idx, struct evt_options *opt) { EVT_POOL_SZ, evt_parse_pool_sz}, { EVT_NB_PKTS, evt_parse_nb_pkts}, { EVT_WKR_DEQ_DEP, evt_parse_wkr_deq_dep}, - { EVT_SCHED_LCORE, evt_parse_slcore}, { EVT_SCHED_TYPE_LIST, evt_parse_sched_type_list}, { EVT_FWD_LATENCY, evt_parse_fwd_latency}, { EVT_QUEUE_PRIORITY, evt_parse_queue_priority}, diff --git a/app/test-eventdev/evt_options.h b/app/test-eventdev/evt_options.h index d8a9fdc..a9a9125 100644 --- a/app/test-eventdev/evt_options.h +++ b/app/test-eventdev/evt_options.h @@ -47,7 +47,6 @@ #define EVT_VERBOSE ("verbose") #define EVT_DEVICE ("dev") #define EVT_TEST ("test") -#define EVT_SCHED_LCORE ("slcore") #define EVT_PROD_LCORES ("plcores") #define EVT_WORK_LCORES ("wlcores") #define EVT_NB_FLOWS ("nb_flows") @@ -67,7 +66,6 @@ struct evt_options { bool plcores[RTE_MAX_LCORE]; bool wlcores[RTE_MAX_LCORE]; uint8_t sched_type_list[EVT_MAX_STAGES]; - int slcore; uint32_t nb_flows; int socket_id; int pool_sz; @@ -219,12 +217,6 @@ evt_dump_nb_flows(struct evt_options *opt) } static inline void -evt_dump_scheduler_lcore(struct evt_options *opt) -{ - evt_dump("scheduler lcore", "%d", opt->slcore); -} - -static inline void evt_dump_worker_dequeue_depth(struct evt_options *opt) { evt_dump("worker deq depth", "%d", opt->wkr_deq_dep); diff --git a/app/test-eventdev/test_order_atq.c b/app/test-eventdev/test_order_atq.c index 7e6c67d..4ee0dea 100644 --- a/app/test-eventdev/test_order_atq.c +++ b/app/test-eventdev/test_order_atq.c @@ -179,6 +179,12 @@ order_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; + } + ret = rte_event_dev_start(opt->dev_id); if (ret) { evt_err("failed to start eventdev %d", opt->dev_id); diff --git a/app/test-eventdev/test_order_common.c b/app/test-eventdev/test_order_common.c index 80e14c0..7cfe7fa 100644 --- a/app/test-eventdev/test_order_common.c +++ b/app/test-eventdev/test_order_common.c @@ -292,9 +292,6 @@ order_launch_lcores(struct evt_test *test, struct evt_options *opt, int64_t old_remaining = -1; while (t->err == false) { - - rte_event_schedule(opt->dev_id); - uint64_t new_cycles = rte_get_timer_cycles(); int64_t remaining = rte_atomic64_read(&t->outstand_pkts); diff --git a/app/test-eventdev/test_order_queue.c b/app/test-eventdev/test_order_queue.c index beadd9c..a14e0b0 100644 --- a/app/test-eventdev/test_order_queue.c +++ b/app/test-eventdev/test_order_queue.c @@ -192,6 +192,12 @@ order_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; + } + ret = rte_event_dev_start(opt->dev_id); if (ret) { evt_err("failed to start eventdev %d", opt->dev_id); diff --git a/app/test-eventdev/test_perf_atq.c b/app/test-eventdev/test_perf_atq.c index 9c3efa3..0e9f2db 100644 --- a/app/test-eventdev/test_perf_atq.c +++ b/app/test-eventdev/test_perf_atq.c @@ -221,6 +221,12 @@ 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; + } + ret = rte_event_dev_start(opt->dev_id); if (ret) { evt_err("failed to start eventdev %d", opt->dev_id); diff --git a/app/test-eventdev/test_perf_common.c b/app/test-eventdev/test_perf_common.c index 7b09299..e77b472 100644 --- a/app/test-eventdev/test_perf_common.c +++ b/app/test-eventdev/test_perf_common.c @@ -88,18 +88,6 @@ perf_producer(void *arg) return 0; } -static inline int -scheduler(void *arg) -{ - struct test_perf *t = arg; - const uint8_t dev_id = t->opt->dev_id; - - while (t->done == false) - rte_event_schedule(dev_id); - - return 0; -} - static inline uint64_t processed_pkts(struct test_perf *t) { @@ -163,15 +151,6 @@ perf_launch_lcores(struct evt_test *test, struct evt_options *opt, port_idx++; } - /* launch scheduler */ - if (!evt_has_distributed_sched(opt->dev_id)) { - ret = rte_eal_remote_launch(scheduler, t, opt->slcore); - if (ret) { - evt_err("failed to launch sched %d", opt->slcore); - return ret; - } - } - const uint64_t total_pkts = opt->nb_pkts * evt_nr_active_lcores(opt->plcores); @@ -307,10 +286,9 @@ int perf_opt_check(struct evt_options *opt, uint64_t nb_queues) { unsigned int lcores; - bool need_slcore = !evt_has_distributed_sched(opt->dev_id); - /* N producer + N worker + 1 scheduler(based on dev capa) + 1 master */ - lcores = need_slcore ? 4 : 3; + /* N producer + N worker + 1 master */ + lcores = 3; if (rte_lcore_count() < lcores) { evt_err("test need minimum %d lcores", lcores); @@ -322,10 +300,6 @@ perf_opt_check(struct evt_options *opt, uint64_t nb_queues) evt_err("worker lcores overlaps with master lcore"); return -1; } - if (need_slcore && evt_lcores_has_overlap(opt->wlcores, opt->slcore)) { - evt_err("worker lcores overlaps with scheduler lcore"); - return -1; - } if (evt_lcores_has_overlap_multi(opt->wlcores, opt->plcores)) { evt_err("worker lcores overlaps producer lcores"); return -1; @@ -344,10 +318,6 @@ perf_opt_check(struct evt_options *opt, uint64_t nb_queues) evt_err("producer lcores overlaps with master lcore"); return -1; } - if (need_slcore && evt_lcores_has_overlap(opt->plcores, opt->slcore)) { - evt_err("producer lcores overlaps with scheduler lcore"); - return -1; - } if (evt_has_disabled_lcore(opt->plcores)) { evt_err("one or more producer lcores are not enabled"); return -1; @@ -357,17 +327,6 @@ perf_opt_check(struct evt_options *opt, uint64_t nb_queues) return -1; } - /* Validate scheduler lcore */ - if (!evt_has_distributed_sched(opt->dev_id) && - opt->slcore == (int)rte_get_master_lcore()) { - evt_err("scheduler lcore and master lcore should be different"); - return -1; - } - if (need_slcore && !rte_lcore_is_enabled(opt->slcore)) { - evt_err("scheduler lcore is not enabled"); - return -1; - } - if (evt_has_invalid_stage(opt)) return -1; @@ -405,8 +364,6 @@ perf_opt_dump(struct evt_options *opt, uint8_t nb_queues) evt_dump_producer_lcores(opt); evt_dump("nb_worker_lcores", "%d", evt_nr_active_lcores(opt->wlcores)); evt_dump_worker_lcores(opt); - if (!evt_has_distributed_sched(opt->dev_id)) - evt_dump_scheduler_lcore(opt); evt_dump_nb_stages(opt); evt_dump("nb_evdev_ports", "%d", perf_nb_event_ports(opt)); evt_dump("nb_evdev_queues", "%d", nb_queues); diff --git a/app/test-eventdev/test_perf_common.h b/app/test-eventdev/test_perf_common.h index 4956586..c6fc70c 100644 --- a/app/test-eventdev/test_perf_common.h +++ b/app/test-eventdev/test_perf_common.h @@ -159,6 +159,7 @@ int perf_test_setup(struct evt_test *test, struct evt_options *opt); int perf_mempool_setup(struct evt_test *test, struct evt_options *opt); int perf_event_dev_port_setup(struct evt_test *test, struct evt_options *opt, uint8_t stride, uint8_t nb_queues); +int perf_event_dev_service_setup(uint8_t dev_id); int perf_launch_lcores(struct evt_test *test, struct evt_options *opt, int (*worker)(void *)); void perf_opt_dump(struct evt_options *opt, uint8_t nb_queues); diff --git a/app/test-eventdev/test_perf_queue.c b/app/test-eventdev/test_perf_queue.c index 658c08a..78f43b5 100644 --- a/app/test-eventdev/test_perf_queue.c +++ b/app/test-eventdev/test_perf_queue.c @@ -232,6 +232,12 @@ 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; + } + ret = rte_event_dev_start(opt->dev_id); if (ret) { evt_err("failed to start eventdev %d", opt->dev_id); -- 2.7.4