From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id A86C5A045E for ; Fri, 31 May 2019 05:39:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9E0B52C19; Fri, 31 May 2019 05:39:42 +0200 (CEST) Received: from tama50.ecl.ntt.co.jp (tama50.ecl.ntt.co.jp [129.60.39.147]) by dpdk.org (Postfix) with ESMTP id F0D592C60 for ; Fri, 31 May 2019 05:39:40 +0200 (CEST) Received: from vc1.ecl.ntt.co.jp (vc1.ecl.ntt.co.jp [129.60.86.153]) by tama50.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id x4V3ddVg023698; Fri, 31 May 2019 12:39:39 +0900 Received: from vc1.ecl.ntt.co.jp (localhost [127.0.0.1]) by vc1.ecl.ntt.co.jp (Postfix) with ESMTP id E12DFEA85C1; Fri, 31 May 2019 12:39:39 +0900 (JST) Received: from localhost.localdomain (lobster.nslab.ecl.ntt.co.jp [129.60.13.95]) by vc1.ecl.ntt.co.jp (Postfix) with ESMTP id C8376EA85CA; Fri, 31 May 2019 12:39:39 +0900 (JST) From: ogawa.yasufumi@lab.ntt.co.jp To: spp@dpdk.org, ferruh.yigit@intel.com, ogawa.yasufumi@lab.ntt.co.jp Date: Fri, 31 May 2019 12:37:07 +0900 Message-Id: <1559273827-26294-3-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1559273827-26294-1-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> References: <1559273827-26294-1-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> X-TM-AS-MML: disable Subject: [spp] [PATCH 2/2] shared/sec: rename enum spp_core_status X-BeenThere: spp@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Soft Patch Panel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spp-bounces@dpdk.org Sender: "spp" From: Yasufumi Ogawa This update is to rename enum `spp_core_status` to `sppwk_lcore_status` to be more specific. Signed-off-by: Yasufumi Ogawa --- src/mirror/spp_mirror.c | 2 +- src/shared/secondary/spp_worker_th/cmd_utils.c | 10 +++++----- src/shared/secondary/spp_worker_th/cmd_utils.h | 12 ++++++------ src/vf/spp_vf.c | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/mirror/spp_mirror.c b/src/mirror/spp_mirror.c index 5c82e2b..d5abf7b 100644 --- a/src/mirror/spp_mirror.c +++ b/src/mirror/spp_mirror.c @@ -517,7 +517,7 @@ slave_main(void *arg __attribute__ ((unused))) int ret = SPP_RET_OK; int cnt = 0; unsigned int lcore_id = rte_lcore_id(); - enum spp_core_status status = SPP_CORE_STOP; + enum sppwk_lcore_status status = SPP_CORE_STOP; struct core_mng_info *info = &g_core_info[lcore_id]; struct core_info *core = get_core_info(lcore_id); diff --git a/src/shared/secondary/spp_worker_th/cmd_utils.c b/src/shared/secondary/spp_worker_th/cmd_utils.c index cacb565..07d6a2a 100644 --- a/src/shared/secondary/spp_worker_th/cmd_utils.c +++ b/src/shared/secondary/spp_worker_th/cmd_utils.c @@ -189,7 +189,7 @@ spp_vf_add_vhost_pmd(int index, int client) } /* Get core status */ -enum spp_core_status +enum sppwk_lcore_status spp_get_core_status(unsigned int lcore_id) { return (g_mng_data.p_core_info + lcore_id)->status; @@ -202,7 +202,7 @@ spp_get_core_status(unsigned int lcore_id) * If core is in use, status will be checked. */ static int -check_core_status(enum spp_core_status status) +check_core_status(enum sppwk_lcore_status status) { unsigned int lcore_id = 0; RTE_LCORE_FOREACH_SLAVE(lcore_id) { @@ -216,7 +216,7 @@ check_core_status(enum spp_core_status status) } int -check_core_status_wait(enum spp_core_status status) +check_core_status_wait(enum sppwk_lcore_status status) { int cnt = 0; for (cnt = 0; cnt < SPP_CORE_STATUS_CHECK_MAX; cnt++) { @@ -233,14 +233,14 @@ check_core_status_wait(enum spp_core_status status) /* Set core status */ void set_core_status(unsigned int lcore_id, - enum spp_core_status status) + enum sppwk_lcore_status status) { (g_mng_data.p_core_info + lcore_id)->status = status; } /* Set all core to given status */ void -set_all_core_status(enum spp_core_status status) +set_all_core_status(enum sppwk_lcore_status status) { unsigned int lcore_id = 0; RTE_LCORE_FOREACH_SLAVE(lcore_id) { diff --git a/src/shared/secondary/spp_worker_th/cmd_utils.h b/src/shared/secondary/spp_worker_th/cmd_utils.h index 9b01ff9..b1febe9 100644 --- a/src/shared/secondary/spp_worker_th/cmd_utils.h +++ b/src/shared/secondary/spp_worker_th/cmd_utils.h @@ -77,7 +77,7 @@ #define CORE_TYPE_MIRROR_STR "mirror" /* State on component */ -enum spp_core_status { +enum sppwk_lcore_status { SPP_CORE_UNUSE, /**< Not used */ SPP_CORE_STOP, /**< Stopped */ SPP_CORE_IDLE, /**< Idling */ @@ -248,7 +248,7 @@ struct core_info { /* Manage core status and component information as global variable */ struct core_mng_info { /* Status of cpu core */ - volatile enum spp_core_status status; + volatile enum sppwk_lcore_status status; /* Index number of core information for reference */ volatile int ref_index; @@ -374,7 +374,7 @@ int spp_vf_add_vhost_pmd(int index, int client); * @return * Status of specified logical core. */ -enum spp_core_status spp_get_core_status(unsigned int lcore_id); +enum sppwk_lcore_status spp_get_core_status(unsigned int lcore_id); /** * Get component type of target component_info @@ -397,7 +397,7 @@ enum sppwk_worker_type spp_get_component_type(int id); * @retval 0 succeeded. * @retval -1 failed. */ -int check_core_status_wait(enum spp_core_status status); +int check_core_status_wait(enum sppwk_lcore_status status); /** * Set core status @@ -408,7 +408,7 @@ int check_core_status_wait(enum spp_core_status status); * set status. * */ -void set_core_status(unsigned int lcore_id, enum spp_core_status status); +void set_core_status(unsigned int lcore_id, enum sppwk_lcore_status status); /** * Set all core status to given @@ -417,7 +417,7 @@ void set_core_status(unsigned int lcore_id, enum spp_core_status status); * set status. * */ -void set_all_core_status(enum spp_core_status status); +void set_all_core_status(enum sppwk_lcore_status status); /** * Set all of component status to SPP_CORE_STOP_REQUEST if received signal diff --git a/src/vf/spp_vf.c b/src/vf/spp_vf.c index ec2292c..94da67a 100644 --- a/src/vf/spp_vf.c +++ b/src/vf/spp_vf.c @@ -190,7 +190,7 @@ slave_main(void *arg __attribute__ ((unused))) int ret = 0; int cnt = 0; unsigned int lcore_id = rte_lcore_id(); - enum spp_core_status status = SPP_CORE_STOP; + enum sppwk_lcore_status status = SPP_CORE_STOP; struct core_mng_info *info = &g_core_info[lcore_id]; struct core_info *core = get_core_info(lcore_id); -- 2.17.1