From: ogawa.yasufumi@lab.ntt.co.jp
To: spp@dpdk.org, ferruh.yigit@intel.com, ogawa.yasufumi@lab.ntt.co.jp
Subject: [spp] [PATCH 2/2] shared/sec: rename enum spp_core_status
Date: Fri, 31 May 2019 12:37:07 +0900 [thread overview]
Message-ID: <1559273827-26294-3-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> (raw)
In-Reply-To: <1559273827-26294-1-git-send-email-ogawa.yasufumi@lab.ntt.co.jp>
From: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
This update is to rename enum `spp_core_status` to
`sppwk_lcore_status` to be more specific.
Signed-off-by: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
---
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
prev parent reply other threads:[~2019-05-31 3:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-31 3:37 [spp] [PATCH 0/2] Rename struct of component ogawa.yasufumi
2019-05-31 3:37 ` [spp] [PATCH 1/2] shared/sec: rename struct spp_component_info ogawa.yasufumi
2019-05-31 3:37 ` ogawa.yasufumi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1559273827-26294-3-git-send-email-ogawa.yasufumi@lab.ntt.co.jp \
--to=ogawa.yasufumi@lab.ntt.co.jp \
--cc=ferruh.yigit@intel.com \
--cc=spp@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).