From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id DFDF3A04B7; Tue, 13 Oct 2020 17:28:31 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7167E1BB09; Tue, 13 Oct 2020 17:26:55 +0200 (CEST) Received: from mail-pj1-f68.google.com (mail-pj1-f68.google.com [209.85.216.68]) by dpdk.org (Postfix) with ESMTP id A0AED1B9E8 for ; Tue, 13 Oct 2020 17:26:52 +0200 (CEST) Received: by mail-pj1-f68.google.com with SMTP id gv6so32675pjb.4 for ; Tue, 13 Oct 2020 08:26:52 -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=DTYbXqg+n9sZs30QxVjS85WLMDwMU+h4JV2KPsdjDVw=; b=Tc5YkfGZBVRplyP2ELbJr4yFpD4W/MgOqxWgdlPF/FtyRJD0QQCFgVClT18QyKrTqA J+SLgrLU5ebFEoF4FxKKNEur6MakeShozN3QEcqQMHo2XWKOo6uIOpbDLOgTzt3B8Jy2 3tMxCZurXpkrql5qffA5fk/G4UjN6kL4m4iJFcd7jRd1+1FveVA5qNpUEs/68wTWCRPD 8ceHVqZZ/vJ0KeNlpzwGAVHKOfH/F4A6gsBGRtrSn+xVP6GaG9Ck2kv9RnIkFjy5BLd2 LBn6dpaH8rw4fTF4WfBApf4TofrgEXhD3FkfZ8/ZkG/Scd84fj/lEDI0DGoErQ2Nszxm wN9Q== 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=DTYbXqg+n9sZs30QxVjS85WLMDwMU+h4JV2KPsdjDVw=; b=nnqziQvBcjjN78mWNEQQgglIEeD3oj40u2cokaYv2hrlhDU490DY4dl+fjstrZlu1C wsqyRvVSEizeFBazooubXN3kTPc4TPNGkwKQLeoTQkATVsOf4avDLHysDd7CtthhfGF1 rhpLUXNF+5vgOBgWoOhuso8h3BZJE+EZbUWE3nlndwPAuPhC/e1Ddw1ZH8Z2yk8McLdz GeHg6aWY8IjqNRksTWlP94S3GNKJPykCL+J4h9Sk0ohWZCMMTJSUbFpPiBG7xjUmoLUH mHnmSFVNaa58ovIgl3CUskLoQMXXVfRuhiIwIedxE0BWrfSIYYk4C1O0B5GH29SPzks3 EJkg== X-Gm-Message-State: AOAM531G0J09iYYq4Q10Rbv9vjidSZZq+w73NRAMTN+3TlKYJlAeAkZg NYxuTmQtNSx0xJCMIJZC+i1z6M0FrzhsRw== X-Google-Smtp-Source: ABdhPJwaM21CLYL39mFQc0LOOicdiaAEiNkuQl0dGdV2lKJAckO+O6Xk42OdCKLkMwxajag9mChQHA== X-Received: by 2002:a17:90a:668e:: with SMTP id m14mr244605pjj.61.1602602809349; Tue, 13 Oct 2020 08:26:49 -0700 (PDT) Received: from hermes.local (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id z12sm23815233pfr.197.2020.10.13.08.26.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Oct 2020 08:26:45 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Anatoly Burakov , Hemant Agrawal , Sachin Saxena , Stephen Hemminger , Long Li , Nipun Gupta , Jerin Jacob , Harry van Haaren , Ajit Khaparde , Somnath Kotur , Liron Himi , Rasesh Mody , Shahed Shaikh , Jasvinder Singh , Cristian Dumitrescu Date: Tue, 13 Oct 2020 08:25:57 -0700 Message-Id: <20201013152610.2589-6-stephen@networkplumber.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201013152610.2589-1-stephen@networkplumber.org> References: <20200914182002.6750-1-stephen@networkplumber.org> <20201013152610.2589-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v5 05/18] drivers: replace master lcore with main 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" Replace use of deprecated rte_master_lcore with rte_main_lcore. Signed-off-by: Stephen Hemminger Acked-by: Anatoly Burakov --- drivers/bus/dpaa/dpaa_bus.c | 2 +- drivers/bus/pci/pci_common_uio.c | 3 ++- drivers/bus/vmbus/vmbus_common_uio.c | 2 +- drivers/event/dpaa2/dpaa2_eventdev_selftest.c | 10 +++++----- drivers/event/octeontx/ssovf_evdev_selftest.c | 10 +++++----- drivers/event/sw/sw_evdev_selftest.c | 2 +- drivers/net/bnxt/bnxt_ring.c | 4 ++-- drivers/net/mvpp2/mrvl_ethdev.c | 6 +++--- drivers/net/qede/base/bcm_osal.c | 4 ++-- drivers/net/softnic/rte_eth_softnic_internals.h | 2 +- drivers/net/softnic/rte_eth_softnic_thread.c | 16 ++++++++-------- 11 files changed, 31 insertions(+), 30 deletions(-) diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c index 32e872da5209..c94c72106f2c 100644 --- a/drivers/bus/dpaa/dpaa_bus.c +++ b/drivers/bus/dpaa/dpaa_bus.c @@ -257,7 +257,7 @@ int rte_dpaa_portal_init(void *arg) BUS_INIT_FUNC_TRACE(); if ((size_t)arg == 1 || lcore == LCORE_ID_ANY) - lcore = rte_get_master_lcore(); + lcore = rte_get_main_lcore(); else if (lcore >= RTE_MAX_LCORE) return -1; diff --git a/drivers/bus/pci/pci_common_uio.c b/drivers/bus/pci/pci_common_uio.c index 793dfd0a7c9b..318f9a1d550b 100644 --- a/drivers/bus/pci/pci_common_uio.c +++ b/drivers/bus/pci/pci_common_uio.c @@ -51,7 +51,8 @@ pci_uio_map_secondary(struct rte_pci_device *dev) void *mapaddr = pci_map_resource(uio_res->maps[i].addr, fd, (off_t)uio_res->maps[i].offset, (size_t)uio_res->maps[i].size, 0); - /* fd is not needed in slave process, close it */ + + /* fd is not needed in secondary process, close it */ close(fd); if (mapaddr != uio_res->maps[i].addr) { RTE_LOG(ERR, EAL, diff --git a/drivers/bus/vmbus/vmbus_common_uio.c b/drivers/bus/vmbus/vmbus_common_uio.c index 8e476f2eaf8b..a689bf11b3f6 100644 --- a/drivers/bus/vmbus/vmbus_common_uio.c +++ b/drivers/bus/vmbus/vmbus_common_uio.c @@ -85,7 +85,7 @@ vmbus_uio_map_secondary(struct rte_vmbus_device *dev) return -1; } - /* fd is not needed in slave process, close it */ + /* fd is not needed in secondary process, close it */ close(fd); dev->primary = uio_res->primary; diff --git a/drivers/event/dpaa2/dpaa2_eventdev_selftest.c b/drivers/event/dpaa2/dpaa2_eventdev_selftest.c index ba4f4bd23447..b1f38914841d 100644 --- a/drivers/event/dpaa2/dpaa2_eventdev_selftest.c +++ b/drivers/event/dpaa2/dpaa2_eventdev_selftest.c @@ -501,8 +501,8 @@ wait_workers_to_join(int lcore, const rte_atomic32_t *count) static int -launch_workers_and_wait(int (*master_worker)(void *), - int (*slave_workers)(void *), uint32_t total_events, +launch_workers_and_wait(int (*main_worker)(void *), + int (*workers)(void *), uint32_t total_events, uint8_t nb_workers, uint8_t sched_type) { uint8_t port = 0; @@ -537,9 +537,9 @@ launch_workers_and_wait(int (*master_worker)(void *), w_lcore = rte_get_next_lcore( /* start core */ -1, - /* skip master */ 1, + /* skip main */ 1, /* wrap */ 0); - rte_eal_remote_launch(master_worker, ¶m[0], w_lcore); + rte_eal_remote_launch(main_worker, ¶m[0], w_lcore); for (port = 1; port < nb_workers; port++) { param[port].total_events = &atomic_total_events; @@ -548,7 +548,7 @@ launch_workers_and_wait(int (*master_worker)(void *), param[port].dequeue_tmo_ticks = dequeue_tmo_ticks; rte_smp_wmb(); w_lcore = rte_get_next_lcore(w_lcore, 1, 0); - rte_eal_remote_launch(slave_workers, ¶m[port], w_lcore); + rte_eal_remote_launch(workers, ¶m[port], w_lcore); } ret = wait_workers_to_join(w_lcore, &atomic_total_events); diff --git a/drivers/event/octeontx/ssovf_evdev_selftest.c b/drivers/event/octeontx/ssovf_evdev_selftest.c index 239362fcf549..7a2b7ded259c 100644 --- a/drivers/event/octeontx/ssovf_evdev_selftest.c +++ b/drivers/event/octeontx/ssovf_evdev_selftest.c @@ -601,8 +601,8 @@ wait_workers_to_join(int lcore, const rte_atomic32_t *count) static inline int -launch_workers_and_wait(int (*master_worker)(void *), - int (*slave_workers)(void *), uint32_t total_events, +launch_workers_and_wait(int (*main_worker)(void *), + int (*worker)(void *), uint32_t total_events, uint8_t nb_workers, uint8_t sched_type) { uint8_t port = 0; @@ -637,9 +637,9 @@ launch_workers_and_wait(int (*master_worker)(void *), w_lcore = rte_get_next_lcore( /* start core */ -1, - /* skip master */ 1, + /* skip main */ 1, /* wrap */ 0); - rte_eal_remote_launch(master_worker, ¶m[0], w_lcore); + rte_eal_remote_launch(main_worker, ¶m[0], w_lcore); for (port = 1; port < nb_workers; port++) { param[port].total_events = &atomic_total_events; @@ -648,7 +648,7 @@ launch_workers_and_wait(int (*master_worker)(void *), param[port].dequeue_tmo_ticks = dequeue_tmo_ticks; rte_smp_wmb(); w_lcore = rte_get_next_lcore(w_lcore, 1, 0); - rte_eal_remote_launch(slave_workers, ¶m[port], w_lcore); + rte_eal_remote_launch(worker, ¶m[port], w_lcore); } ret = wait_workers_to_join(w_lcore, &atomic_total_events); diff --git a/drivers/event/sw/sw_evdev_selftest.c b/drivers/event/sw/sw_evdev_selftest.c index 38c21fa0fa3d..6dfbdd308310 100644 --- a/drivers/event/sw/sw_evdev_selftest.c +++ b/drivers/event/sw/sw_evdev_selftest.c @@ -3108,7 +3108,7 @@ worker_loopback(struct test *t, uint8_t disable_implicit_release) p_lcore = rte_get_next_lcore( /* start core */ -1, - /* skip master */ 1, + /* skip main */ 1, /* wrap */ 0); w_lcore = rte_get_next_lcore(p_lcore, 1, 0); diff --git a/drivers/net/bnxt/bnxt_ring.c b/drivers/net/bnxt/bnxt_ring.c index f7f6ee804960..aeb6cb6150d8 100644 --- a/drivers/net/bnxt/bnxt_ring.c +++ b/drivers/net/bnxt/bnxt_ring.c @@ -429,7 +429,7 @@ int bnxt_alloc_rxtx_nq_ring(struct bnxt *bp) if (!BNXT_HAS_NQ(bp) || bp->rxtx_nq_ring) return 0; - socket_id = rte_lcore_to_socket_id(rte_get_master_lcore()); + socket_id = rte_lcore_to_socket_id(rte_get_main_lcore()); nqr = rte_zmalloc_socket("nqr", sizeof(struct bnxt_cp_ring_info), @@ -820,7 +820,7 @@ int bnxt_alloc_async_ring_struct(struct bnxt *bp) if (BNXT_NUM_ASYNC_CPR(bp) == 0) return 0; - socket_id = rte_lcore_to_socket_id(rte_get_master_lcore()); + socket_id = rte_lcore_to_socket_id(rte_get_main_lcore()); cpr = rte_zmalloc_socket("cpr", sizeof(struct bnxt_cp_ring_info), diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c index a230a9684028..8af545d6a2ea 100644 --- a/drivers/net/mvpp2/mrvl_ethdev.c +++ b/drivers/net/mvpp2/mrvl_ethdev.c @@ -814,7 +814,7 @@ mrvl_flush_bpool(struct rte_eth_dev *dev) unsigned int core_id = rte_lcore_id(); if (core_id == LCORE_ID_ANY) - core_id = rte_get_master_lcore(); + core_id = rte_get_main_lcore(); hif = mrvl_get_hif(priv, core_id); @@ -1623,7 +1623,7 @@ mrvl_fill_bpool(struct mrvl_rxq *rxq, int num) core_id = rte_lcore_id(); if (core_id == LCORE_ID_ANY) - core_id = rte_get_master_lcore(); + core_id = rte_get_main_lcore(); hif = mrvl_get_hif(rxq->priv, core_id); if (!hif) @@ -1773,7 +1773,7 @@ mrvl_rx_queue_release(void *rxq) unsigned int core_id = rte_lcore_id(); if (core_id == LCORE_ID_ANY) - core_id = rte_get_master_lcore(); + core_id = rte_get_main_lcore(); if (!q) return; diff --git a/drivers/net/qede/base/bcm_osal.c b/drivers/net/qede/base/bcm_osal.c index 44a8692f5cdc..2c59397e0412 100644 --- a/drivers/net/qede/base/bcm_osal.c +++ b/drivers/net/qede/base/bcm_osal.c @@ -143,7 +143,7 @@ void *osal_dma_alloc_coherent(struct ecore_dev *p_dev, snprintf(mz_name, sizeof(mz_name), "%lx", (unsigned long)rte_get_timer_cycles()); if (core_id == (unsigned int)LCORE_ID_ANY) - core_id = rte_get_master_lcore(); + core_id = rte_get_main_lcore(); socket_id = rte_lcore_to_socket_id(core_id); mz = rte_memzone_reserve_aligned(mz_name, size, socket_id, RTE_MEMZONE_IOVA_CONTIG, RTE_CACHE_LINE_SIZE); @@ -182,7 +182,7 @@ void *osal_dma_alloc_coherent_aligned(struct ecore_dev *p_dev, snprintf(mz_name, sizeof(mz_name), "%lx", (unsigned long)rte_get_timer_cycles()); if (core_id == (unsigned int)LCORE_ID_ANY) - core_id = rte_get_master_lcore(); + core_id = rte_get_main_lcore(); socket_id = rte_lcore_to_socket_id(core_id); mz = rte_memzone_reserve_aligned(mz_name, size, socket_id, RTE_MEMZONE_IOVA_CONTIG, align); diff --git a/drivers/net/softnic/rte_eth_softnic_internals.h b/drivers/net/softnic/rte_eth_softnic_internals.h index 6eec43b22b13..fe31be68dca3 100644 --- a/drivers/net/softnic/rte_eth_softnic_internals.h +++ b/drivers/net/softnic/rte_eth_softnic_internals.h @@ -547,7 +547,7 @@ TAILQ_HEAD(pipeline_list, pipeline); #endif /** - * Master thead: data plane thread context + * Main thread: data plane thread context */ struct softnic_thread { struct rte_ring *msgq_req; diff --git a/drivers/net/softnic/rte_eth_softnic_thread.c b/drivers/net/softnic/rte_eth_softnic_thread.c index dcfb5eb82c18..a8c26a5b2377 100644 --- a/drivers/net/softnic/rte_eth_softnic_thread.c +++ b/drivers/net/softnic/rte_eth_softnic_thread.c @@ -18,14 +18,14 @@ #include "rte_eth_softnic_internals.h" /** - * Master thread: data plane thread init + * Main thread: data plane thread init */ void softnic_thread_free(struct pmd_internals *softnic) { uint32_t i; - RTE_LCORE_FOREACH_SLAVE(i) { + RTE_LCORE_FOREACH_WORKER(i) { struct softnic_thread *t = &softnic->thread[i]; /* MSGQs */ @@ -78,7 +78,7 @@ softnic_thread_init(struct pmd_internals *softnic) return -1; } - /* Master thread records */ + /* Main thread records */ t->msgq_req = msgq_req; t->msgq_rsp = msgq_rsp; t->service_id = UINT32_MAX; @@ -99,7 +99,7 @@ softnic_thread_init(struct pmd_internals *softnic) static inline int thread_is_valid(struct pmd_internals *softnic, uint32_t thread_id) { - if (thread_id == rte_get_master_lcore()) + if (thread_id == rte_get_main_lcore()) return 0; /* FALSE */ if (softnic->params.sc && rte_lcore_has_role(thread_id, ROLE_SERVICE)) @@ -209,7 +209,7 @@ pipeline_is_running(struct pipeline *p) } /** - * Master thread & data plane threads: message passing + * Main thread & data plane threads: message passing */ enum thread_req_type { THREAD_REQ_PIPELINE_ENABLE = 0, @@ -243,7 +243,7 @@ struct thread_msg_rsp { }; /** - * Master thread + * Main thread */ static struct thread_msg_req * thread_msg_alloc(void) @@ -587,7 +587,7 @@ thread_msg_handle(struct softnic_thread_data *t) } /** - * Master thread & data plane threads: message passing + * Main thread & data plane threads: message passing */ enum pipeline_req_type { /* Port IN */ @@ -753,7 +753,7 @@ struct pipeline_msg_rsp { }; /** - * Master thread + * Main thread */ static struct pipeline_msg_req * pipeline_msg_alloc(void) -- 2.27.0