* [spp] [PATCH] shared/sec: rename enum spp_secondary
@ 2019-06-24 8:55 yasufum.o
0 siblings, 0 replies; only message in thread
From: yasufum.o @ 2019-06-24 8:55 UTC (permalink / raw)
To: spp, ferruh.yigit, yasufum.o
From: Yasufumi Ogawa <yasufum.o@gmail.com>
This update is to rename enum `spp_secondary` to `sppwk_proc_type` and
its members start with `SECONDARY_` to `WK_PROC_`.
Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
---
src/mirror/spp_mirror.c | 4 ++--
.../secondary/spp_worker_th/cmd_res_formatter.c | 4 ++--
src/shared/secondary/spp_worker_th/cmd_utils.h | 12 ++++++------
src/vf/spp_vf.c | 4 ++--
4 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/src/mirror/spp_mirror.c b/src/mirror/spp_mirror.c
index 2cae48a..cb76005 100644
--- a/src/mirror/spp_mirror.c
+++ b/src/mirror/spp_mirror.c
@@ -216,12 +216,12 @@ parse_app_args(int argc, char *argv[])
usage(progname);
return SPP_RET_NG;
}
- g_startup_param.secondary_type = SECONDARY_TYPE_MIRROR;
+ g_startup_param.wk_proc_type = WK_PROC_TYPE_MIRROR;
RTE_LOG(INFO, MIRROR,
"app opts (client_id=%d,type=%d,"
"server=%s:%d,vhost_client=%d,)\n",
g_startup_param.client_id,
- g_startup_param.secondary_type,
+ g_startup_param.wk_proc_type,
g_startup_param.server_ip,
g_startup_param.server_port,
g_startup_param.vhost_client);
diff --git a/src/shared/secondary/spp_worker_th/cmd_res_formatter.c b/src/shared/secondary/spp_worker_th/cmd_res_formatter.c
index 3c2c3a6..f51157a 100644
--- a/src/shared/secondary/spp_worker_th/cmd_res_formatter.c
+++ b/src/shared/secondary/spp_worker_th/cmd_res_formatter.c
@@ -25,7 +25,7 @@ static int append_error_details_value(const char *name, char **output,
* List of worker process type. The order of items should be same as the order
* of enum `secondary_type` in cmd_utils.h.
*/
-/* TODO(yasufum) rename `secondary_type` to `sppwk_proc_type`. */
+/* TODO(yasufum) Add "pcap" after spp_pcap is made to use shared. */
const char *SPPWK_PROC_TYPE_LIST[] = {
"none",
"vf",
@@ -128,7 +128,7 @@ get_wk_type(void)
{
struct startup_param *params;
sppwk_get_mng_data(¶ms, NULL, NULL, NULL, NULL, NULL, NULL);
- return params->secondary_type;
+ return params->wk_proc_type;
}
/* append a secondary process type for JSON format */
diff --git a/src/shared/secondary/spp_worker_th/cmd_utils.h b/src/shared/secondary/spp_worker_th/cmd_utils.h
index b15b40a..4582a82 100644
--- a/src/shared/secondary/spp_worker_th/cmd_utils.h
+++ b/src/shared/secondary/spp_worker_th/cmd_utils.h
@@ -130,11 +130,11 @@ enum copy_mng_flg {
};
/* secondary process type used only from spp_vf and spp_mirror */
-/* TODO(yasufum) rename `secondary_type` to `sppwk_proc_type`. */
-enum secondary_type {
- SECONDARY_TYPE_NONE,
- SECONDARY_TYPE_VF,
- SECONDARY_TYPE_MIRROR,
+/* TODO(yasufum) Add WK_PROC_TYPE_PCAP. */
+enum sppwk_proc_type {
+ WK_PROC_TYPE_NONE,
+ WK_PROC_TYPE_VF,
+ WK_PROC_TYPE_MIRROR,
};
/** VLAN tag information */
@@ -200,7 +200,7 @@ struct startup_param {
char server_ip[INET_ADDRSTRLEN]; /* IP address of spp-ctl */
int server_port; /* Port Number of spp-ctl */
int vhost_client; /* Flag for --vhost-client option */
- enum secondary_type secondary_type;
+ enum sppwk_proc_type wk_proc_type;
};
/* Manage number of interfaces and port information as global variable. */
diff --git a/src/vf/spp_vf.c b/src/vf/spp_vf.c
index 7ba894e..5bed735 100644
--- a/src/vf/spp_vf.c
+++ b/src/vf/spp_vf.c
@@ -172,12 +172,12 @@ parse_app_args(int argc, char *argv[])
usage(progname);
return SPP_RET_NG;
}
- g_startup_param.secondary_type = SECONDARY_TYPE_VF;
+ g_startup_param.wk_proc_type = WK_PROC_TYPE_VF;
RTE_LOG(INFO, APP,
"app opts (client_id=%d,type=%d,server=%s:%d,"
"vhost_client=%d)\n",
g_startup_param.client_id,
- g_startup_param.secondary_type,
+ g_startup_param.wk_proc_type,
g_startup_param.server_ip,
g_startup_param.server_port,
g_startup_param.vhost_client);
--
2.17.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-06-24 8:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-24 8:55 [spp] [PATCH] shared/sec: rename enum spp_secondary yasufum.o
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).