From patchwork Wed Jul 1 19:46:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 72647 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B8688A0350; Wed, 1 Jul 2020 21:48:34 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CF7DF1D405; Wed, 1 Jul 2020 21:47:16 +0200 (CEST) Received: from mail-pj1-f65.google.com (mail-pj1-f65.google.com [209.85.216.65]) by dpdk.org (Postfix) with ESMTP id 3347A1D156 for ; Wed, 1 Jul 2020 21:47:14 +0200 (CEST) Received: by mail-pj1-f65.google.com with SMTP id h22so11462872pjf.1 for ; Wed, 01 Jul 2020 12:47:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=61Vi4FGZytjg+jh4get4I3NRcVkP+biWELOvXBDju1s=; b=QCrlEBdTvk155b7vorpSuk3DPWZo+C3D4F0wDW4B02ConwUvZBkTf9fFAhDmRBpF24 8TqpQvTo2FdXyi+qRFMviv/iE9/owZCJDCvYhXZ9UOO2VUhxbR1cxGSs2rrxLs8/WQX4 SUvqMj/D3zt1YoBTpVyMGo9XwnJXWOsIsfJ/tnFk8vbWq/DayZv9qT+SGqf0nD6JnX0z JfOmIopY3w2Rzjn+11txJ4177eBnAUqlE09FdvvX3Ub2ilufOd29/FhFJrjIxh+CmxzT hJC5sfNFnzKaEookWbXPnghQ27ipEiWKy500Tew7dKe/L5YXj+Z4L08ztLED9/+vIuPX H/8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=61Vi4FGZytjg+jh4get4I3NRcVkP+biWELOvXBDju1s=; b=bkWL5/ez3c/xx6UdyQDEbansV0YlRy6/Uo+ukBwqLip1zGqKLOpPbcx8XDOhYMogpt PgDKjnsDkgeEZxOJxStxNj5PhtG9ezH9MNPBVG2JMHGTuC6DjNZ6bjnN8eKjfsZmBdwi 6g1O1YjVSMQmNx0Rt0EgF0aMINHAXqf44ZyGkl21B6Ki35/c8uV10aXs5hWTWMy5DrA2 pPAzBREjNN3YG2MrFJLpfZ8Yp3kdigtm80jXea7Y6rLH5UAbCjSx6b1dfsS9ySluo1cp jhZELN3ysXj2x0W3MrlT6nLuDCHtne6U4KE8LA8l3Opk/wKj24WMiQyLcB9b2kGMaXAK UH3A== X-Gm-Message-State: AOAM533NtAA4RAPCtRw1vZI9CiMZimGZl8Nxg2s+5royzjSTnm52l2md nPL0sTtLOp06YG96KN9fqGTH53lviiw= X-Google-Smtp-Source: ABdhPJxg5zCUt4vyLhyyPRdbqzdQFmsi9Nnr/L8vU9Ep74x1zR1TaAMgr+MFLqT+jeCQc8yCW98A2A== X-Received: by 2002:a17:90b:898:: with SMTP id bj24mr7652769pjb.133.1593632832920; Wed, 01 Jul 2020 12:47:12 -0700 (PDT) Received: from hermes.corp.microsoft.com (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id n14sm6501870pgd.78.2020.07.01.12.47.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jul 2020 12:47:12 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Wed, 1 Jul 2020 12:46:33 -0700 Message-Id: <20200701194650.10705-11-stephen@networkplumber.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200701194650.10705-1-stephen@networkplumber.org> References: <20200604210200.25405-1-stephen@networkplumber.org> <20200701194650.10705-1-stephen@networkplumber.org> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v3 10/27] examples/qos_{meter/sched}: replace references to master lcore 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Use initial lcore instead. Signed-off-by: Stephen Hemminger --- examples/qos_meter/main.c | 4 ++-- examples/qos_sched/args.c | 22 +++++++++++----------- examples/qos_sched/cmdline.c | 2 +- examples/qos_sched/main.c | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/examples/qos_meter/main.c b/examples/qos_meter/main.c index 6d057abfe3e7..9f1497121105 100644 --- a/examples/qos_meter/main.c +++ b/examples/qos_meter/main.c @@ -457,8 +457,8 @@ main(int argc, char **argv) rte_exit(EXIT_FAILURE, "Invalid configure flow table\n"); /* Launch per-lcore init on every lcore */ - rte_eal_mp_remote_launch(main_loop, NULL, CALL_MASTER); - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + rte_eal_mp_remote_launch(main_loop, NULL, CALL_INITIAL); + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (rte_eal_wait_lcore(lcore_id) < 0) return -1; } diff --git a/examples/qos_sched/args.c b/examples/qos_sched/args.c index 7431b29816aa..3fdd7ddf1651 100644 --- a/examples/qos_sched/args.c +++ b/examples/qos_sched/args.c @@ -22,7 +22,7 @@ #define MAX_OPT_VALUES 8 #define SYS_CPU_DIR "/sys/devices/system/cpu/cpu%u/topology/" -static uint32_t app_master_core = 1; +static uint32_t app_initial_core = 1; static uint32_t app_numa_mask; static uint64_t app_used_core_mask = 0; static uint64_t app_used_port_mask = 0; @@ -40,7 +40,7 @@ static const char usage[] = " \n" "Application optional parameters: \n" " --i : run in interactive mode (default value is %u) \n" - " --mst I : master core index (default value is %u) \n" + " --mst I : initial core index (default value is %u) \n" " --rsz \"A, B, C\" : Ring sizes \n" " A = Size (in number of buffer descriptors) of each of the NIC RX \n" " rings read by the I/O RX lcores (default value is %u) \n" @@ -72,7 +72,7 @@ static const char usage[] = static void app_usage(const char *prgname) { - printf(usage, prgname, APP_INTERACTIVE_DEFAULT, app_master_core, + printf(usage, prgname, APP_INTERACTIVE_DEFAULT, app_initial_core, APP_RX_DESC_DEFAULT, APP_RING_SIZE, APP_TX_DESC_DEFAULT, MAX_PKT_RX_BURST, PKT_ENQUEUE, PKT_DEQUEUE, MAX_PKT_TX_BURST, NB_MBUF, @@ -98,7 +98,7 @@ app_eal_core_mask(void) cm |= (1ULL << i); } - cm |= (1ULL << rte_get_master_lcore()); + cm |= (1ULL << rte_get_initial_lcore()); return cm; } @@ -353,7 +353,7 @@ app_parse_args(int argc, char **argv) break; } if (str_is(optname, "mst")) { - app_master_core = (uint32_t)atoi(optarg); + app_initial_core = (uint32_t)atoi(optarg); break; } if (str_is(optname, "rsz")) { @@ -408,18 +408,18 @@ app_parse_args(int argc, char **argv) } } - /* check master core index validity */ - for(i = 0; i <= app_master_core; i++) { - if (app_used_core_mask & (1u << app_master_core)) { - RTE_LOG(ERR, APP, "Master core index is not configured properly\n"); + /* check initial core index validity */ + for(i = 0; i <= app_initial_core; i++) { + if (app_used_core_mask & (1u << app_initial_core)) { + RTE_LOG(ERR, APP, "Initial core index is not configured properly\n"); app_usage(prgname); return -1; } } - app_used_core_mask |= 1u << app_master_core; + app_used_core_mask |= 1u << app_initial_core; if ((app_used_core_mask != app_eal_core_mask()) || - (app_master_core != rte_get_master_lcore())) { + (app_initial_core != rte_get_initial_lcore())) { RTE_LOG(ERR, APP, "EAL core mask not configured properly, must be %" PRIx64 " instead of %" PRIx64 "\n" , app_used_core_mask, app_eal_core_mask()); return -1; diff --git a/examples/qos_sched/cmdline.c b/examples/qos_sched/cmdline.c index ba68e0d02693..67e7695b6558 100644 --- a/examples/qos_sched/cmdline.c +++ b/examples/qos_sched/cmdline.c @@ -599,7 +599,7 @@ cmdline_parse_ctx_t main_ctx[] = { NULL, }; -/* prompt function, called from main on MASTER lcore */ +/* prompt function, called from main on initial lcore */ void prompt(void) { diff --git a/examples/qos_sched/main.c b/examples/qos_sched/main.c index 73864d66dbc8..9c6be9fa17c0 100644 --- a/examples/qos_sched/main.c +++ b/examples/qos_sched/main.c @@ -204,7 +204,7 @@ main(int argc, char **argv) return -1; /* launch per-lcore init on every lcore */ - rte_eal_mp_remote_launch(app_main_loop, NULL, SKIP_MASTER); + rte_eal_mp_remote_launch(app_main_loop, NULL, SKIP_INITIAL); if (interactive) { sleep(1);