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 88300A0350; Sat, 6 Jun 2020 00:59:41 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 853D31D5C6; Sat, 6 Jun 2020 00:59:07 +0200 (CEST) Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43]) by dpdk.org (Postfix) with ESMTP id D5AC81D547 for ; Sat, 6 Jun 2020 00:59:03 +0200 (CEST) Received: by mail-pj1-f43.google.com with SMTP id i12so3245009pju.3 for ; Fri, 05 Jun 2020 15:59:03 -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=yELUG3Q6/b/aZZ/ZzIXlNpOPVOumpBb0YTIwuA+qhro=; b=uM8OGb/cxGERouoCDGhBMEUTDyGaWUxc5uW5tDfTCD3Hag4/JXmpFd//vXuqx/69BM y3zGrp7YFq8S+GvcMCGQSERilsxGxUcojmxUjziNlNB69oII29qW6d+juVj8VrLiZZEV uwZ3yuxyRSA+TY/vWaCpwfG1cHO5bEzq3k5KnZOQA2kQVYkT/2P36h+7F34RUH45YiN3 OVWB9MWqulw1n0e0bLP79YS/zeCCW9EOcld6e0eJv33e4gHowhQYYHvtwoytcpEh/2cD n6rDRoUrQqKaQv9s50dopo3M2OHrC30yA/pZnLKjBnRdQ00MrzpH2qJXXkQ+J0CQYaBj +Jgw== 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=yELUG3Q6/b/aZZ/ZzIXlNpOPVOumpBb0YTIwuA+qhro=; b=tf5hsy0lW1T0wOevxwKg9QlwiWY1amNimrAaK0v6kJm/RZ9wM06C4qVAnFWVKU88Ww J/9BAIYFfrL3w/wxGlBSoEwrH8EzMRqIX5kotK94KYw/VlTkJpmZuYcW6+rkMcseLLHK kxmhxX2k7mu2AMwIyCYKGmStT6zpPiFmcoP/fsSnwAIaEfBi+42t9+/QCFzFhzR9lutl AaqoROQIsnt8ZakO6YVfc8sBFQCNryfBO7E1g/5CBh/tXmEK3tZ6NlZwIdCSaBgGhXN/ 20n6ijgVnAyIzQ0pJYineuU+/pnyUR7LzYKzf3121Z5OdkZ2SJOzVH8qZIV1j59Ay+W+ IEyQ== X-Gm-Message-State: AOAM533I6pka6xTzYik/1ocQ7fz8foqO2/Hgjdu3VmYrc5qbYokvxIK4 2Mk2kf4Yie4RITEHvV43syiKJl1pUIk= X-Google-Smtp-Source: ABdhPJzHF3HxjI0Pn3u+C8rjD8G+RK6xcU96xEhIBiiOm9nhIljzCdU07Lc3S6pJN1EOK7XpRebcwA== X-Received: by 2002:a17:902:b08d:: with SMTP id p13mr11744991plr.131.1591397942570; Fri, 05 Jun 2020 15:59:02 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id j186sm543121pfb.220.2020.06.05.15.59.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jun 2020 15:59:01 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Fri, 5 Jun 2020 15:57:50 -0700 Message-Id: <20200605225811.26342-6-stephen@networkplumber.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200605225811.26342-1-stephen@networkplumber.org> References: <20200604210200.25405-1-stephen@networkplumber.org> <20200605225811.26342-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [RFC v2 05/26] drivers: replace master/slave terminolgy 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 rte_get_master_lcore() with rte_get_initial_lcore(). Replace RTE_LCORE_FOREACH_SLAVE with RTE_LCORE_FOREACH_WORKER Signed-off-by: Stephen Hemminger --- drivers/bus/dpaa/dpaa_bus.c | 2 +- drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 6 +++--- drivers/net/bnxt/bnxt_ring.c | 4 ++-- drivers/net/qede/base/bcm_osal.c | 4 ++-- drivers/net/softnic/rte_eth_softnic_thread.c | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c index d53fe6083a79..49c7891109e8 100644 --- a/drivers/bus/dpaa/dpaa_bus.c +++ b/drivers/bus/dpaa/dpaa_bus.c @@ -260,7 +260,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_initial_lcore(); else if (lcore >= RTE_MAX_LCORE) return -1; diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c index 21c535f2fbad..d498161fe427 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c @@ -195,7 +195,7 @@ dpaa2_configure_stashing(struct dpaa2_dpio_dev *dpio_dev, int lcoreid) /* Set the Stashing Destination */ if (lcoreid < 0) { - lcoreid = rte_get_master_lcore(); + lcoreid = rte_get_initial_lcore(); if (lcoreid < 0) { DPAA2_BUS_ERR("Getting CPU Index failed"); return -1; @@ -259,7 +259,7 @@ dpaa2_affine_qbman_swp(void) uint64_t tid = syscall(SYS_gettid); if (lcore_id == LCORE_ID_ANY) - lcore_id = rte_get_master_lcore(); + lcore_id = rte_get_initial_lcore(); /* if the core id is not supported */ else if (lcore_id >= RTE_MAX_LCORE) return -1; @@ -307,7 +307,7 @@ dpaa2_affine_qbman_ethrx_swp(void) uint64_t tid = syscall(SYS_gettid); if (lcore_id == LCORE_ID_ANY) - lcore_id = rte_get_master_lcore(); + lcore_id = rte_get_initial_lcore(); /* if the core id is not supported */ else if (lcore_id >= RTE_MAX_LCORE) return -1; diff --git a/drivers/net/bnxt/bnxt_ring.c b/drivers/net/bnxt/bnxt_ring.c index 24a947f27823..b649e3317ea1 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_initial_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_initial_lcore()); cpr = rte_zmalloc_socket("cpr", sizeof(struct bnxt_cp_ring_info), diff --git a/drivers/net/qede/base/bcm_osal.c b/drivers/net/qede/base/bcm_osal.c index 48d016e2404c..d7d847278565 100644 --- a/drivers/net/qede/base/bcm_osal.c +++ b/drivers/net/qede/base/bcm_osal.c @@ -132,7 +132,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_initial_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); @@ -171,7 +171,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_initial_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_thread.c b/drivers/net/softnic/rte_eth_softnic_thread.c index dcfb5eb82c18..a2b6f522427a 100644 --- a/drivers/net/softnic/rte_eth_softnic_thread.c +++ b/drivers/net/softnic/rte_eth_softnic_thread.c @@ -25,7 +25,7 @@ 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 */ @@ -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_initial_lcore()) return 0; /* FALSE */ if (softnic->params.sc && rte_lcore_has_role(thread_id, ROLE_SERVICE)) -- 2.26.2