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 9FA22A04C7; Tue, 15 Sep 2020 17:19:46 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 01E331C129; Tue, 15 Sep 2020 17:19:06 +0200 (CEST) Received: from mail-qv1-f68.google.com (mail-qv1-f68.google.com [209.85.219.68]) by dpdk.org (Postfix) with ESMTP id BD6BF1C119 for ; Tue, 15 Sep 2020 17:19:02 +0200 (CEST) Received: by mail-qv1-f68.google.com with SMTP id b13so1899922qvl.2 for ; Tue, 15 Sep 2020 08:19:02 -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=O4CzsFWOEUc5JEHnE/4MQwzlVXlN191cf8GIEpoWD5w=; b=D7l+dG/K98pVqeLVAbsuF+GZAgX06Gc5auJeokU+yg1Wzsvg34aCajUY4nbq+Ltlk+ 2C1LfOXY2klIBu/M99RwkDST01ij7muTxyePdaJBGrBvculiG6/lfAqpAU9jSItK73+9 3rsRcVmgXEQ+1miQfcrWTsK7IMqOGcQuf13FIwaEY1Z72L5zI5GTYz0b7sEeA+/W7Odf 4AISWy8uYl7OS1hyJMlgnF9VuEyxLK0AEu3auPOCoA/97DqlKmW08qkFi3LQEvTttkMG nleC7pwT6zf+GDfD/AWhfZXpT4qUrHRFZlLdKGgpxILMAMcY+q62nYIcg81AzagKmnVD UyZg== 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=O4CzsFWOEUc5JEHnE/4MQwzlVXlN191cf8GIEpoWD5w=; b=U4JBjx50k2AHm9A1RGv09X3XGw3ZYkO/qtZo4qd+7J/wY/ULhM6AcaU3k049O8CULC yQsOb5ZN2lYZiWdUGvSqq5iQ0GmoJmpXsK9J+SxVUyCdWXG3+XISeKpvV2qYF5lAnCfQ FTSpaQcJoctOsvYxDmGUWjX1ytXDpxBGXsG6ii3iAAQomZd4EKWxC10DxYrd92i4ZZwA QRdIO6vhEAsA4gpKVms4MnLx06s6WAT9gZL4slp8xCkHDtrXSdz3/3PHDt9olvuj+duZ s6ShUCAf++5MkCYK8IaDhAzOH0dtADBO4YeDSHCvYRADWTZpGJfO11z834OLv1d2qBEK F48Q== X-Gm-Message-State: AOAM533NSJodfgETw38sTgVq8xlMMW8A5aePF7xH7yKr2CiEs18Khsc/ qR2sOFDKhLELv/2yD4acFs7ttSV5tpuHKg== X-Google-Smtp-Source: ABdhPJzqq9mNgtFH/UWQk+DhFtx3KqxF5h1zLkpCwIgdR9nv3UaFHqhdyvaF6OhFPeGV315/5Qwu7g== X-Received: by 2002:a17:902:a507:b029:d1:844d:ac88 with SMTP id s7-20020a170902a507b02900d1844dac88mr19585417plq.7.1600182692334; Tue, 15 Sep 2020 08:11:32 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id c127sm13742278pfa.165.2020.09.15.08.11.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 08:11:31 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Anatoly Burakov Date: Tue, 15 Sep 2020 08:11:02 -0700 Message-Id: <20200915151114.12024-6-stephen@networkplumber.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200915151114.12024-1-stephen@networkplumber.org> References: <20200911190701.29171-1-stephen@networkplumber.org> <20200915151114.12024-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3 05/17] 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 f4dca9da9133..ca2073e1dd2b 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 54f654744259..910fb11c9c38 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), @@ -819,7 +819,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 96b27dfd309d..85deddf120b4 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); @@ -1618,7 +1618,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) @@ -1768,7 +1768,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 65837b53d063..4c2706ab4b90 100644 --- a/drivers/net/qede/base/bcm_osal.c +++ b/drivers/net/qede/base/bcm_osal.c @@ -112,7 +112,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); @@ -151,7 +151,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..d95160ab21f6 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 thead: 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