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 75334A045E for ; Fri, 31 May 2019 10:54:17 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 010C11B957; Fri, 31 May 2019 10:54:16 +0200 (CEST) Received: from tama500.ecl.ntt.co.jp (tama500.ecl.ntt.co.jp [129.60.39.148]) by dpdk.org (Postfix) with ESMTP id 692E81B94B for ; Fri, 31 May 2019 10:54:14 +0200 (CEST) Received: from vc1.ecl.ntt.co.jp (vc1.ecl.ntt.co.jp [129.60.86.153]) by tama500.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id x4V8sCZg000676; Fri, 31 May 2019 17:54:12 +0900 Received: from vc1.ecl.ntt.co.jp (localhost [127.0.0.1]) by vc1.ecl.ntt.co.jp (Postfix) with ESMTP id 8049BEA8605; Fri, 31 May 2019 17:54:12 +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 70E7EEA85FC; Fri, 31 May 2019 17:54:12 +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 17:51:31 +0900 Message-Id: <1559292699-26940-2-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1559292699-26940-1-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> References: <1559292699-26940-1-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> X-TM-AS-MML: disable Subject: [spp] [PATCH 1/9] spp_pcap: 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/pcap/cmd_utils.c | 10 +++++----- src/pcap/cmd_utils.h | 13 +++++++------ 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/pcap/cmd_utils.c b/src/pcap/cmd_utils.c index be12058..f8f5e46 100644 --- a/src/pcap/cmd_utils.c +++ b/src/pcap/cmd_utils.c @@ -64,7 +64,7 @@ add_ring_pmd(int ring_id) } /* Get core status */ -enum spp_core_status +enum sppwk_lcore_status spp_get_core_status(unsigned int lcore_id) { return (g_mng_data_addr.p_core_info + lcore_id)->status; @@ -77,7 +77,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) { @@ -91,7 +91,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++) { @@ -109,14 +109,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_addr.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/pcap/cmd_utils.h b/src/pcap/cmd_utils.h index 1b028fa..c7684c9 100644 --- a/src/pcap/cmd_utils.h +++ b/src/pcap/cmd_utils.h @@ -31,8 +31,9 @@ #define SPP_IFTYPE_NIC_STR "phy" #define SPP_IFTYPE_RING_STR "ring" +/* TODO(yasufum) merge it to the same definition in shared/.../cmd_utils.h */ /* State on core */ -enum spp_core_status { +enum sppwk_lcore_status { SPP_CORE_UNUSE, /**< Not used */ SPP_CORE_STOP, /**< Stopped */ SPP_CORE_IDLE, /**< Idling */ @@ -177,7 +178,7 @@ struct iface_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; }; struct spp_iterate_core_params; @@ -230,7 +231,7 @@ int add_ring_pmd(int ring_id); * @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); /** * Run check_core_status() for SPP_CORE_STATUS_CHECK_MAX times with @@ -242,7 +243,7 @@ enum spp_core_status spp_get_core_status(unsigned int lcore_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 @@ -253,7 +254,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 @@ -262,7 +263,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 -- 2.17.1