From: ogawa.yasufumi@lab.ntt.co.jp
To: spp@dpdk.org, ferruh.yigit@intel.com, ogawa.yasufumi@lab.ntt.co.jp
Subject: [spp] [PATCH 1/9] spp_pcap: rename enum spp_core_status
Date: Fri, 31 May 2019 17:51:31 +0900 [thread overview]
Message-ID: <1559292699-26940-2-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> (raw)
In-Reply-To: <1559292699-26940-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/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
next prev parent reply other threads:[~2019-05-31 8:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-31 8:51 [spp] [PATCH 0/9] Refactor func and struct for spp_pcap resources ogawa.yasufumi
2019-05-31 8:51 ` ogawa.yasufumi [this message]
2019-05-31 8:51 ` [spp] [PATCH 2/9] spp_pcap: rename file of util libs ogawa.yasufumi
2019-05-31 8:51 ` [spp] [PATCH 3/9] spp_pcap: refactor parse error code ogawa.yasufumi
2019-05-31 8:51 ` [spp] [PATCH 4/9] spp_pcap: rename define starts from SPP_CMD_MAX ogawa.yasufumi
2019-05-31 8:51 ` [spp] [PATCH 5/9] spp_pcap: rename define of buffer size for cmds ogawa.yasufumi
2019-05-31 8:51 ` [spp] [PATCH 6/9] spp_pcap: revise name of error message object ogawa.yasufumi
2019-05-31 8:51 ` [spp] [PATCH 7/9] spp_pcap: revise return codes ogawa.yasufumi
2019-05-31 8:51 ` [spp] [PATCH 8/9] spp_pcap: rename struct spp_port_info ogawa.yasufumi
2019-05-31 8:51 ` [spp] [PATCH 9/9] spp_pcap: rename struct spp_port_index ogawa.yasufumi
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=1559292699-26940-2-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).