Soft Patch Panel
 help / color / Atom feed
* [spp] [PATCH] shared: rename func spp_get_component_type
@ 2019-09-12 11:40 yasufum.o
  0 siblings, 0 replies; only message in thread
From: yasufum.o @ 2019-09-12 11:40 UTC (permalink / raw)
  To: spp, ferruh.yigit, yasufum.o

From: Yasufumi Ogawa <yasufum.o@gmail.com>

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>
---
 src/shared/secondary/spp_worker_th/cmd_utils.c | 7 +++----
 src/shared/secondary/spp_worker_th/cmd_utils.h | 2 +-
 src/vf/spp_vf.c                                | 4 ++--
 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 bf4cdbe..6c0c938 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]);
-- 
2.17.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-12 11:40 [spp] [PATCH] shared: rename func spp_get_component_type yasufum.o

Soft Patch Panel

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/spp/0 spp/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 spp spp/ http://inbox.dpdk.org/spp \
		spp@dpdk.org
	public-inbox-index spp


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.spp


AGPL code for this site: git clone https://public-inbox.org/ public-inbox