summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYasufumi Ogawa <yasufum.o@gmail.com>2019-09-12 20:40:15 +0900
committerYasufumi Ogawa <yasufum.o@gmail.com>2019-10-04 22:06:14 +0900
commitf60d0f362828e6aac4ec2dfb6736fef89c4867ae (patch)
treee8eddfbd4ad3616237a838223ba33c1cf5f09735
parent53946681622a35bab565488b478680f0030ba3b1 (diff)
downloadspp-f60d0f362828e6aac4ec2dfb6736fef89c4867ae.zip
spp-f60d0f362828e6aac4ec2dfb6736fef89c4867ae.tar.gz
spp-f60d0f362828e6aac4ec2dfb6736fef89c4867ae.tar.xz
shared: rename func spp_get_component_type
This update is to rename spp_get_component_type() to sppwk_get_comp_type() for conventions. Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
-rw-r--r--src/shared/secondary/spp_worker_th/cmd_utils.c7
-rw-r--r--src/shared/secondary/spp_worker_th/cmd_utils.h2
-rw-r--r--src/vf/spp_vf.c4
3 files changed, 6 insertions, 7 deletions
diff --git a/src/shared/secondary/spp_worker_th/cmd_utils.c b/src/shared/secondary/spp_worker_th/cmd_utils.c
index 15ceb6f..58db631 100644
--- a/src/shared/secondary/spp_worker_th/cmd_utils.c
+++ b/src/shared/secondary/spp_worker_th/cmd_utils.c
@@ -492,11 +492,10 @@ del_vhost_sockfile(struct sppwk_port_info *vhost)
/* Get component type of target component_info */
enum sppwk_worker_type
-spp_get_component_type(int id)
+sppwk_get_comp_type(int id)
{
- struct sppwk_comp_info *component_info =
- (g_mng_data.p_component_info + id);
- return component_info->wk_type;
+ struct sppwk_comp_info *ci = (g_mng_data.p_component_info + id);
+ return ci->wk_type;
}
/* Get core information which is in use */
diff --git a/src/shared/secondary/spp_worker_th/cmd_utils.h b/src/shared/secondary/spp_worker_th/cmd_utils.h
index fb68905..4e2f888 100644
--- a/src/shared/secondary/spp_worker_th/cmd_utils.h
+++ b/src/shared/secondary/spp_worker_th/cmd_utils.h
@@ -136,7 +136,7 @@ enum sppwk_lcore_status sppwk_get_lcore_status(unsigned int lcore_id);
* @param id Component ID.
* @return Type of component executed
*/
-enum sppwk_worker_type spp_get_component_type(int id);
+enum sppwk_worker_type sppwk_get_comp_type(int id);
/* TODO(yasufum) revise the name of func. */
/**
diff --git a/src/vf/spp_vf.c b/src/vf/spp_vf.c
index 012e529..ab2e9f2 100644
--- a/src/vf/spp_vf.c
+++ b/src/vf/spp_vf.c
@@ -167,7 +167,7 @@ slave_main(void *arg __attribute__ ((unused)))
if (status != SPPWK_LCORE_RUNNING)
continue;
- if (spp_check_core_update(lcore_id) == SPPWK_RET_OK) {
+ if (sppwk_is_lcore_updated(lcore_id) == 1) {
/* Setting with the flush command trigger. */
info->ref_index = (info->upd_index+1) % TWO_SIDES;
core = get_core_info(lcore_id);
@@ -176,7 +176,7 @@ slave_main(void *arg __attribute__ ((unused)))
/* It is for processing multiple components. */
for (cnt = 0; cnt < core->num; cnt++) {
/* Component classification to call a function. */
- if (spp_get_component_type(core->id[cnt]) ==
+ if (sppwk_get_comp_type(core->id[cnt]) ==
SPPWK_TYPE_CLS) {
/* Component type for classifier. */
ret = classify_packets(core->id[cnt]);