Soft Patch Panel
 help / color / Atom feed
* [spp] [PATCH 0/2] Update old log labels APP
@ 2019-05-31  3:36 ogawa.yasufumi
  2019-05-31  3:36 ` [spp] [PATCH 1/2] shared/sec: change log label in cmd parser ogawa.yasufumi
  2019-05-31  3:36 ` [spp] [PATCH 2/2] shared/sec: change log label in cmd runner ogawa.yasufumi
  0 siblings, 2 replies; 3+ messages in thread
From: ogawa.yasufumi @ 2019-05-31  3:36 UTC (permalink / raw)
  To: spp, ferruh.yigit, ogawa.yasufumi

From: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>

Log label `APP` was used in SPP secondary processes, but revised as
subdivided into several modules. However, it is still remained in some
of functions. This series of patches is to update this old label.

Yasufumi Ogawa (2):
  shared/sec: change log label in cmd parser
  shared/sec: change log label in cmd runner

 .../secondary/spp_worker_th/cmd_parser.c      |  75 ++++-----
 .../secondary/spp_worker_th/cmd_runner.c      | 142 +++++++++---------
 2 files changed, 110 insertions(+), 107 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [spp] [PATCH 1/2] shared/sec: change log label in cmd parser
  2019-05-31  3:36 [spp] [PATCH 0/2] Update old log labels APP ogawa.yasufumi
@ 2019-05-31  3:36 ` ogawa.yasufumi
  2019-05-31  3:36 ` [spp] [PATCH 2/2] shared/sec: change log label in cmd runner ogawa.yasufumi
  1 sibling, 0 replies; 3+ messages in thread
From: ogawa.yasufumi @ 2019-05-31  3:36 UTC (permalink / raw)
  To: spp, ferruh.yigit, ogawa.yasufumi

From: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>

In cmd_parser.c, two of labels are used in log messages, `APP` and
`SPP_COMMAND_PROC`. First one is almost no meaning and second one is
not suitable considering the feature of this module. In addition, no
need to use two labels.

This update is to change both of labels to `WK_CMD_PARSER`.

Signed-off-by: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
---
 .../secondary/spp_worker_th/cmd_parser.c      | 75 ++++++++++---------
 1 file changed, 38 insertions(+), 37 deletions(-)

diff --git a/src/shared/secondary/spp_worker_th/cmd_parser.c b/src/shared/secondary/spp_worker_th/cmd_parser.c
index af8cc3e..77efbd7 100644
--- a/src/shared/secondary/spp_worker_th/cmd_parser.c
+++ b/src/shared/secondary/spp_worker_th/cmd_parser.c
@@ -11,8 +11,7 @@
 
 #include "cmd_parser.h"
 
-#define RTE_LOGTYPE_SPP_COMMAND_PROC RTE_LOGTYPE_USER1
-#define RTE_LOGTYPE_APP RTE_LOGTYPE_USER2
+#define RTE_LOGTYPE_WK_CMD_PARSER RTE_LOGTYPE_USER1
 
 /**
  * List of command action for getting the index of enum enum `sppwk_action`.
@@ -157,20 +156,22 @@ parse_resource_uid(const char *res_uid,
 		ptype = RING;
 		iface_no_str = &res_uid[strlen(SPP_IFTYPE_RING_STR)+1];
 	} else {
-		RTE_LOG(ERR, APP, "Unexpected port type in '%s'.\n", res_uid);
+		RTE_LOG(ERR, WK_CMD_PARSER, "Unexpected port type in '%s'.\n",
+				res_uid);
 		return SPP_RET_NG;
 	}
 
 	int port_id = strtol(iface_no_str, &endptr, 0);
 	if (unlikely(iface_no_str == endptr) || unlikely(*endptr != '\0')) {
-		RTE_LOG(ERR, APP, "No interface number in '%s'.\n", res_uid);
+		RTE_LOG(ERR, WK_CMD_PARSER, "No interface number in '%s'.\n",
+				res_uid);
 		return SPP_RET_NG;
 	}
 
 	*iface_type = ptype;
 	*iface_no = port_id;
 
-	RTE_LOG(DEBUG, APP, "Parsed '%s' to '%d' and '%d'.\n",
+	RTE_LOG(DEBUG, WK_CMD_PARSER, "Parsed '%s' to '%d' and '%d'.\n",
 			res_uid, *iface_type, *iface_no);
 	return SPP_RET_OK;
 }
@@ -180,7 +181,7 @@ parse_resource_uid(const char *res_uid,
 static enum spp_component_type
 get_comp_type_from_str(const char *type_str)
 {
-	RTE_LOG(DEBUG, APP, "type_str is %s\n", type_str);
+	RTE_LOG(DEBUG, WK_CMD_PARSER, "type_str is %s\n", type_str);
 
 #ifdef SPP_VF_MODULE
 	if (strncmp(type_str, CORE_TYPE_CLASSIFIER_MAC_STR,
@@ -320,7 +321,7 @@ parse_port_uid(void *output, const char *arg_val)
 	struct sppwk_port_idx *port = output;
 	ret = parse_resource_uid(arg_val, &port->iface_type, &port->iface_no);
 	if (unlikely(ret != 0)) {
-		RTE_LOG(ERR, SPP_COMMAND_PROC,
+		RTE_LOG(ERR, WK_CMD_PARSER,
 				"Invalid resource UID '%s'.\n", arg_val);
 		return SPP_RET_NG;
 	}
@@ -334,7 +335,7 @@ parse_lcore_id(void *output, const char *arg_val)
 	int ret;
 	ret = get_uint_in_range(output, arg_val, 0, RTE_MAX_LCORE-1);
 	if (unlikely(ret < 0)) {
-		RTE_LOG(ERR, SPP_COMMAND_PROC,
+		RTE_LOG(ERR, WK_CMD_PARSER,
 				"Invalid lcore id '%s'.\n", arg_val);
 		return SPP_RET_NG;
 	}
@@ -350,7 +351,7 @@ parse_comp_action(void *output, const char *arg_val,
 	/* Get index of registered commands. */
 	ret = get_list_idx(arg_val, CMD_ACT_LIST);
 	if (unlikely(ret <= 0)) {
-		RTE_LOG(ERR, SPP_COMMAND_PROC,
+		RTE_LOG(ERR, WK_CMD_PARSER,
 				"Given invalid cmd `%s`.\n",
 				arg_val);
 		return SPP_RET_NG;
@@ -358,7 +359,7 @@ parse_comp_action(void *output, const char *arg_val,
 
 	if (unlikely(ret != SPPWK_ACT_START) &&
 			unlikely(ret != SPPWK_ACT_STOP)) {
-		RTE_LOG(ERR, SPP_COMMAND_PROC,
+		RTE_LOG(ERR, WK_CMD_PARSER,
 				"Unknown component action. val=%s\n",
 				arg_val);
 		return SPP_RET_NG;
@@ -381,7 +382,7 @@ parse_comp_name(void *output, const char *arg_val,
 		/* Check if lcore is already used. */
 		ret = sppwk_get_lcore_id(arg_val);  /* Get lcore ID. */
 		if (unlikely(ret >= 0)) {
-			RTE_LOG(ERR, SPP_COMMAND_PROC,
+			RTE_LOG(ERR, WK_CMD_PARSER,
 					"Comp name '%s' is already used.\n",
 					arg_val);
 			return SPP_RET_NG;
@@ -426,7 +427,7 @@ parse_comp_type(void *output, const char *arg_val,
 
 	comp_type = get_comp_type_from_str(arg_val);
 	if (unlikely(comp_type <= 0)) {
-		RTE_LOG(ERR, SPP_COMMAND_PROC,
+		RTE_LOG(ERR, WK_CMD_PARSER,
 				"Unknown component type '%s'.\n",
 				arg_val);
 		return SPP_RET_NG;
@@ -445,7 +446,7 @@ parse_port_action(void *output, const char *arg_val,
 	/* Get index of registered commands. */
 	ret = get_list_idx(arg_val, CMD_ACT_LIST);
 	if (unlikely(ret <= 0)) {
-		RTE_LOG(ERR, SPP_COMMAND_PROC,
+		RTE_LOG(ERR, WK_CMD_PARSER,
 				"Unknown port action. val=%s\n",
 				arg_val);
 		return SPP_RET_NG;
@@ -454,7 +455,7 @@ parse_port_action(void *output, const char *arg_val,
 	/* TODO(yasufum) fix not explicit checking this condition. */
 	if (unlikely(ret != SPPWK_ACT_ADD) &&
 			unlikely(ret != SPPWK_ACT_DEL)) {
-		RTE_LOG(ERR, SPP_COMMAND_PROC,
+		RTE_LOG(ERR, WK_CMD_PARSER,
 				"Unknown port action. val=%s\n",
 				arg_val);
 		return SPP_RET_NG;
@@ -485,7 +486,7 @@ parse_port(void *output, const char *arg_val, int allow_override)
 				(spp_check_used_port(tmp_port.iface_type,
 						tmp_port.iface_no,
 						SPP_PORT_RXTX_TX) >= 0)) {
-			RTE_LOG(ERR, SPP_COMMAND_PROC,
+			RTE_LOG(ERR, WK_CMD_PARSER,
 				"Port `%s` is already used.\n",
 				arg_val);
 			return SPP_RET_NG;
@@ -506,7 +507,7 @@ parse_port_rxtx(void *output, const char *arg_val, int allow_override)
 
 	ret = get_list_idx(arg_val, PORT_DIR_LIST);
 	if (unlikely(ret <= 0)) {
-		RTE_LOG(ERR, SPP_COMMAND_PROC, "Unknown port rxtx. val=%s\n",
+		RTE_LOG(ERR, WK_CMD_PARSER, "Unknown port rxtx. val=%s\n",
 				arg_val);
 		return SPP_RET_NG;
 	}
@@ -516,7 +517,7 @@ parse_port_rxtx(void *output, const char *arg_val, int allow_override)
 		if ((port->wk_action == SPPWK_ACT_ADD) &&
 				(spp_check_used_port(port->port.iface_type,
 					port->port.iface_no, ret) >= 0)) {
-			RTE_LOG(ERR, SPP_COMMAND_PROC,
+			RTE_LOG(ERR, WK_CMD_PARSER,
 				"Port in used. (port command) val=%s\n",
 				arg_val);
 			return SPP_RET_NG;
@@ -538,7 +539,7 @@ parse_comp_name_portcmd(void *output, const char *arg_val,
 	/* Check if lcore is already used. */
 	ret = sppwk_get_lcore_id(arg_val);  /* Get lcore ID. */
 	if (unlikely(ret < SPP_RET_OK)) {
-		RTE_LOG(ERR, SPP_COMMAND_PROC,
+		RTE_LOG(ERR, WK_CMD_PARSER,
 				"Unknown component name. val=%s\n", arg_val);
 		return SPP_RET_NG;
 	}
@@ -565,7 +566,7 @@ parse_port_vlan_ops(void *output, const char *arg_val,
 	case SPPWK_PORT_ABL_OPS_NONE:
 		ret = get_list_idx(arg_val, PORT_ABILITY_LIST);
 		if (unlikely(ret <= 0)) {
-			RTE_LOG(ERR, SPP_COMMAND_PROC,
+			RTE_LOG(ERR, WK_CMD_PARSER,
 					"Unknown port ability. val=%s\n",
 					arg_val);
 			return SPP_RET_NG;
@@ -598,7 +599,7 @@ parse_port_vid(void *output, const char *arg_val,
 		vlan_id = get_int_in_range(&ability->data.vlantag.vid,
 			arg_val, 0, ETH_VLAN_ID_MAX);
 		if (unlikely(vlan_id < SPP_RET_OK)) {
-			RTE_LOG(ERR, SPP_COMMAND_PROC,
+			RTE_LOG(ERR, WK_CMD_PARSER,
 					"Invalid `%s` for parsing VLAN ID.\n",
 					arg_val);
 			return SPP_RET_NG;
@@ -627,7 +628,7 @@ parse_port_pcp(void *output, const char *arg_val,
 		pcp = get_int_in_range(&ability->data.vlantag.pcp,
 				arg_val, 0, SPP_VLAN_PCP_MAX);
 		if (unlikely(pcp < SPP_RET_OK)) {
-			RTE_LOG(ERR, SPP_COMMAND_PROC,
+			RTE_LOG(ERR, WK_CMD_PARSER,
 					"Invalid `%s`for parsing PCP.\n",
 					arg_val);
 			return SPP_RET_NG;
@@ -656,7 +657,7 @@ parse_mac_addr(void *output, const char *arg_val,
 	/* Check if the given value is valid. */
 	res = sppwk_convert_mac_str_to_int64(str_val);
 	if (unlikely(res < SPP_RET_OK)) {
-		RTE_LOG(ERR, SPP_COMMAND_PROC,
+		RTE_LOG(ERR, WK_CMD_PARSER,
 				"Invalid MAC address `%s`.\n", str_val);
 		return SPP_RET_NG;
 	}
@@ -676,7 +677,7 @@ parse_cls_action(void *output, const char *arg_val,
 	int idx;
 	idx = get_list_idx(arg_val, CMD_ACT_LIST);
 	if (unlikely(idx <= 0)) {
-		RTE_LOG(ERR, SPP_COMMAND_PROC,
+		RTE_LOG(ERR, WK_CMD_PARSER,
 				"Failed to get index for action `%s`.\n",
 				arg_val);
 		return SPP_RET_NG;
@@ -684,7 +685,7 @@ parse_cls_action(void *output, const char *arg_val,
 
 	if (unlikely(idx != SPPWK_ACT_ADD) &&
 			unlikely(idx != SPPWK_ACT_DEL)) {
-		RTE_LOG(ERR, SPP_COMMAND_PROC,
+		RTE_LOG(ERR, WK_CMD_PARSER,
 				"Unknown action `%s` for port.\n",
 				arg_val);
 		return SPP_RET_NG;
@@ -702,7 +703,7 @@ parse_cls_type(void *output, const char *arg_val,
 	int idx;
 	idx = get_list_idx(arg_val, CLS_TYPE_LIST);
 	if (unlikely(idx <= 0)) {
-		RTE_LOG(ERR, SPP_COMMAND_PROC,
+		RTE_LOG(ERR, WK_CMD_PARSER,
 				"Unknown classifier type. val=%s\n",
 				arg_val);
 		return SPP_RET_NG;
@@ -720,7 +721,7 @@ parse_cls_vid(void *output, const char *arg_val,
 	int idx;
 	idx = get_int_in_range(output, arg_val, 0, ETH_VLAN_ID_MAX);
 	if (unlikely(idx < SPP_RET_OK)) {
-		RTE_LOG(ERR, SPP_COMMAND_PROC, "Invalid VLAN ID `%s`.\n",
+		RTE_LOG(ERR, WK_CMD_PARSER, "Invalid VLAN ID `%s`.\n",
 				arg_val);
 		return SPP_RET_NG;
 	}
@@ -742,7 +743,7 @@ parse_cls_port(void *cls_cmd_attr, const char *arg_val,
 		return SPP_RET_NG;
 
 	if (is_added_port(tmp_port.iface_type, tmp_port.iface_no) == 0) {
-		RTE_LOG(ERR, SPP_COMMAND_PROC, "Port not added. val=%s\n",
+		RTE_LOG(ERR, WK_CMD_PARSER, "Port not added. val=%s\n",
 				arg_val);
 		return SPP_RET_NG;
 	}
@@ -753,7 +754,7 @@ parse_cls_port(void *cls_cmd_attr, const char *arg_val,
 	if (unlikely(cls_attrs->wk_action == SPPWK_ACT_ADD)) {
 		if (!is_used_with_addr(ETH_VLAN_ID_MAX, 0,
 				tmp_port.iface_type, tmp_port.iface_no)) {
-			RTE_LOG(ERR, SPP_COMMAND_PROC, "Port in used. "
+			RTE_LOG(ERR, WK_CMD_PARSER, "Port in used. "
 					"(classifier_table command) val=%s\n",
 					arg_val);
 			return SPP_RET_NG;
@@ -766,7 +767,7 @@ parse_cls_port(void *cls_cmd_attr, const char *arg_val,
 		if (!is_used_with_addr(cls_attrs->vid,
 				(uint64_t)mac_addr,
 				tmp_port.iface_type, tmp_port.iface_no)) {
-			RTE_LOG(ERR, SPP_COMMAND_PROC, "Port in used. "
+			RTE_LOG(ERR, WK_CMD_PARSER, "Port in used. "
 					"(classifier_table command) val=%s\n",
 					arg_val);
 			return SPP_RET_NG;
@@ -937,7 +938,7 @@ parse_cmd_comp(struct sppwk_cmd_req *request, int argc, char *argv[],
 				((char *)&request->commands[0] + list->offset),
 				argv[pi], 0);
 		if (unlikely(ret < 0)) {
-			RTE_LOG(ERR, SPP_COMMAND_PROC,
+			RTE_LOG(ERR, WK_CMD_PARSER,
 					"Invalid value. command=%s, name=%s, "
 					"index=%d, value=%s\n",
 					argv[0], list->name, pi, argv[pi]);
@@ -972,7 +973,7 @@ parse_cmd_cls_table_vlan(struct sppwk_cmd_req *request, int argc, char *argv[],
 				((char *)&request->commands[0] + list->offset),
 				argv[pi], 0);
 		if (unlikely(ret < SPP_RET_OK)) {
-			RTE_LOG(ERR, SPP_COMMAND_PROC, "Bad value. "
+			RTE_LOG(ERR, WK_CMD_PARSER, "Bad value. "
 				"command=%s, name=%s, index=%d, value=%s\n",
 					argv[0], list->name, pi, argv[pi]);
 			return set_detailed_parse_error(wk_err_msg,
@@ -1003,7 +1004,7 @@ parse_cmd_port(struct sppwk_cmd_req *request, int argc, char *argv[],
 				((char *)&request->commands[0] + list->offset),
 				argv[pi], flag);
 		if (unlikely(ret < SPP_RET_OK)) {
-			RTE_LOG(ERR, SPP_COMMAND_PROC, "Bad value. "
+			RTE_LOG(ERR, WK_CMD_PARSER, "Bad value. "
 				"command=%s, name=%s, index=%d, value=%s\n",
 					argv[0], list->name, pi, argv[pi]);
 			return set_detailed_parse_error(wk_err_msg,
@@ -1072,14 +1073,14 @@ parse_wk_cmd(struct sppwk_cmd_req *request,
 	 */
 	ret = split_cmd_params(tmp_str, SPPWK_MAX_PARAMS, &argc, argv);
 	if (ret < SPP_RET_OK) {
-		RTE_LOG(ERR, SPP_COMMAND_PROC,
+		RTE_LOG(ERR, WK_CMD_PARSER,
 				"Num of params should be less than %d. "
 				"request_str=%s\n",
 				SPPWK_MAX_PARAMS, request_str);
 		return set_parse_error(wk_err_msg, SPPWK_PARSE_WRONG_FORMAT,
 				NULL);
 	}
-	RTE_LOG(DEBUG, SPP_COMMAND_PROC, "Decode array. num=%d\n", argc);
+	RTE_LOG(DEBUG, WK_CMD_PARSER, "Decode array. num=%d\n", argc);
 
 	for (i = 0; cmd_attr_list[i].cmd_name[0] != '\0'; i++) {
 		list = &cmd_attr_list[i];
@@ -1105,14 +1106,14 @@ parse_wk_cmd(struct sppwk_cmd_req *request,
 	 * unknown command.
 	 */
 	if (is_valid_nof_params == 0) {
-		RTE_LOG(ERR, SPP_COMMAND_PROC,
+		RTE_LOG(ERR, WK_CMD_PARSER,
 				"Number of parmas is out of range. "
 				"request_str=%s\n", request_str);
 		return set_parse_error(wk_err_msg, SPPWK_PARSE_WRONG_FORMAT,
 				NULL);
 	}
 
-	RTE_LOG(ERR, SPP_COMMAND_PROC,
+	RTE_LOG(ERR, WK_CMD_PARSER,
 			"Unknown command '%s' and request_str=%s\n",
 			argv[0], request_str);
 	return set_detailed_parse_error(wk_err_msg, "command", argv[0]);
@@ -1132,7 +1133,7 @@ sppwk_parse_req(
 	request->num_command = 1;
 	ret = parse_wk_cmd(request, request_str, wk_err_msg);
 	if (unlikely(ret != SPP_RET_OK)) {
-		RTE_LOG(ERR, SPP_COMMAND_PROC,
+		RTE_LOG(ERR, WK_CMD_PARSER,
 				"Cannot decode command request. "
 				"ret=%d, request_str=%.*s\n",
 				ret, (int)request_str_len, request_str);
-- 
2.17.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [spp] [PATCH 2/2] shared/sec: change log label in cmd runner
  2019-05-31  3:36 [spp] [PATCH 0/2] Update old log labels APP ogawa.yasufumi
  2019-05-31  3:36 ` [spp] [PATCH 1/2] shared/sec: change log label in cmd parser ogawa.yasufumi
@ 2019-05-31  3:36 ` ogawa.yasufumi
  1 sibling, 0 replies; 3+ messages in thread
From: ogawa.yasufumi @ 2019-05-31  3:36 UTC (permalink / raw)
  To: spp, ferruh.yigit, ogawa.yasufumi

From: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>

As previous update, this patch is to change log labels to
`WK_CMD_RUNNER`.

Signed-off-by: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
---
 .../secondary/spp_worker_th/cmd_runner.c      | 142 +++++++++---------
 1 file changed, 72 insertions(+), 70 deletions(-)

diff --git a/src/shared/secondary/spp_worker_th/cmd_runner.c b/src/shared/secondary/spp_worker_th/cmd_runner.c
index e917007..613e924 100644
--- a/src/shared/secondary/spp_worker_th/cmd_runner.c
+++ b/src/shared/secondary/spp_worker_th/cmd_runner.c
@@ -17,8 +17,7 @@
 #include "cmd_parser.h"
 #include "cmd_runner.h"
 
-#define RTE_LOGTYPE_SPP_COMMAND_PROC RTE_LOGTYPE_USER1
-#define RTE_LOGTYPE_APP RTE_LOGTYPE_USER2
+#define RTE_LOGTYPE_WK_CMD_RUNNER RTE_LOGTYPE_USER1
 
 /* request message initial size */
 #define CMD_ERR_MSG_LEN 128
@@ -136,25 +135,26 @@ update_cls_table(enum sppwk_action wk_action,
 	uint64_t mac_uint64;
 	struct sppwk_port_info *port_info;
 
-	RTE_LOG(DEBUG, APP, "Called update_cls_table with "
+	RTE_LOG(DEBUG, WK_CMD_RUNNER, "Called __func__ with "
 			"type `mac`, mac_addr `%s`, and port `%d:%d`.\n",
 			mac_str, port->iface_type, port->iface_no);
 
 	mac_int64 = sppwk_convert_mac_str_to_int64(mac_str);
 	if (unlikely(mac_int64 == -1)) {
-		RTE_LOG(ERR, APP, "Invalid MAC address `%s`.\n", mac_str);
+		RTE_LOG(ERR, WK_CMD_RUNNER, "Invalid MAC address `%s`.\n",
+				mac_str);
 		return SPP_RET_NG;
 	}
 	mac_uint64 = (uint64_t)mac_int64;
 
 	port_info = get_sppwk_port(port->iface_type, port->iface_no);
 	if (unlikely(port_info == NULL)) {
-		RTE_LOG(ERR, APP, "Failed to get port %d:%d.\n",
+		RTE_LOG(ERR, WK_CMD_RUNNER, "Failed to get port %d:%d.\n",
 				port->iface_type, port->iface_no);
 		return SPP_RET_NG;
 	}
 	if (unlikely(port_info->iface_type == UNDEF)) {
-		RTE_LOG(ERR, APP, "Port %d:%d doesn't exist.\n",
+		RTE_LOG(ERR, WK_CMD_RUNNER, "Port %d:%d doesn't exist.\n",
 				port->iface_type, port->iface_no);
 		return SPP_RET_NG;
 	}
@@ -162,12 +162,14 @@ update_cls_table(enum sppwk_action wk_action,
 	if (wk_action == SPPWK_ACT_DEL) {
 		if ((port_info->cls_attrs.vlantag.vid != 0) &&
 				port_info->cls_attrs.vlantag.vid != vid) {
-			RTE_LOG(ERR, APP, "Unexpected VLAN ID `%d`.\n", vid);
+			RTE_LOG(ERR, WK_CMD_RUNNER,
+					"Unexpected VLAN ID `%d`.\n", vid);
 			return SPP_RET_NG;
 		}
 		if ((port_info->cls_attrs.mac_addr != 0) &&
 				port_info->cls_attrs.mac_addr != mac_uint64) {
-			RTE_LOG(ERR, APP, "Unexpected MAC %s.\n", mac_str);
+			RTE_LOG(ERR, WK_CMD_RUNNER, "Unexpected MAC %s.\n",
+					mac_str);
 			return SPP_RET_NG;
 		}
 
@@ -180,14 +182,14 @@ update_cls_table(enum sppwk_action wk_action,
 		if (unlikely(port_info->cls_attrs.vlantag.vid !=
 				ETH_VLAN_ID_MAX)) {
 			/* TODO(yasufum) why two vids are required in msg ? */
-			RTE_LOG(ERR, APP, "Used port %d:%d, vid %d != %d.\n",
+			RTE_LOG(ERR, WK_CMD_RUNNER, "Used port %d:%d, vid %d != %d.\n",
 					port->iface_type, port->iface_no,
 					port_info->cls_attrs.vlantag.vid, vid);
 			return SPP_RET_NG;
 		}
 		if (unlikely(port_info->cls_attrs.mac_addr != 0)) {
 			/* TODO(yasufum) why two macs are required in msg ? */
-			RTE_LOG(ERR, APP, "Used port %d:%d, mac %s != %s.\n",
+			RTE_LOG(ERR, WK_CMD_RUNNER, "Used port %d:%d, mac %s != %s.\n",
 					port->iface_type, port->iface_no,
 					port_info->cls_attrs.mac_addr_str,
 					mac_str);
@@ -228,21 +230,21 @@ update_comp(enum sppwk_action wk_action, const char *name,
 	case SPPWK_ACT_START:
 		info = (core_info + lcore_id);
 		if (info->status == SPP_CORE_UNUSE) {
-			RTE_LOG(ERR, APP, "Core %d is not available because "
+			RTE_LOG(ERR, WK_CMD_RUNNER, "Core %d is not available because "
 				"it is in SPP_CORE_UNUSE state.\n", lcore_id);
 			return SPP_RET_NG;
 		}
 
 		comp_lcore_id = sppwk_get_lcore_id(name);
 		if (comp_lcore_id >= 0) {
-			RTE_LOG(ERR, APP, "Component name '%s' is already "
+			RTE_LOG(ERR, WK_CMD_RUNNER, "Component name '%s' is already "
 				"used.\n", name);
 			return SPP_RET_NG;
 		}
 
 		comp_lcore_id = get_free_lcore_id();
 		if (comp_lcore_id < 0) {
-			RTE_LOG(ERR, APP, "Cannot assign component over the "
+			RTE_LOG(ERR, WK_CMD_RUNNER, "Cannot assign component over the "
 				"maximum number.\n");
 			return SPP_RET_NG;
 		}
@@ -304,14 +306,14 @@ static int
 check_port_count(int component_type, enum spp_port_rxtx rxtx, int num_rx,
 								int num_tx)
 {
-	RTE_LOG(INFO, SPP_COMMAND_PROC, "port count, port_type=%d,"
+	RTE_LOG(INFO, WK_CMD_RUNNER, "port count, port_type=%d,"
 				" rx=%d, tx=%d\n", rxtx, num_rx, num_tx);
 	if (rxtx == SPP_PORT_RXTX_RX)
 		num_rx++;
 	else
 		num_tx++;
 	/* Add rx or tx port appointed in port_type. */
-	RTE_LOG(INFO, SPP_COMMAND_PROC, "Num of ports after count up,"
+	RTE_LOG(INFO, WK_CMD_RUNNER, "Num of ports after count up,"
 				" port_type=%d, rx=%d, tx=%d\n",
 				rxtx, num_rx, num_tx);
 	switch (component_type) {
@@ -365,7 +367,7 @@ update_port(enum sppwk_action wk_action,
 
 	comp_lcore_id = sppwk_get_lcore_id(name);
 	if (comp_lcore_id < 0) {
-		RTE_LOG(ERR, APP, "Unknown component by port command. "
+		RTE_LOG(ERR, WK_CMD_RUNNER, "Unknown component by port command. "
 				"(component = %s)\n", name);
 		return SPP_RET_NG;
 	}
@@ -399,7 +401,7 @@ update_port(enum sppwk_action wk_action,
 					    SPPWK_PORT_ABL_OPS_ADD_VLANTAG))
 					cnt++;
 				if (cnt >= SPP_PORT_ABILITY_MAX) {
-					RTE_LOG(ERR, APP, "update VLAN tag "
+					RTE_LOG(ERR, WK_CMD_RUNNER, "update VLAN tag "
 						"Non-registratio\n");
 					return SPP_RET_NG;
 				}
@@ -413,7 +415,7 @@ update_port(enum sppwk_action wk_action,
 		}
 
 		if (*nof_ports >= RTE_MAX_ETHPORTS) {
-			RTE_LOG(ERR, APP, "Cannot assign port over the "
+			RTE_LOG(ERR, WK_CMD_RUNNER, "Cannot assign port over the "
 				"maximum number.\n");
 			return SPP_RET_NG;
 		}
@@ -425,7 +427,7 @@ update_port(enum sppwk_action wk_action,
 				cnt++;
 			}
 			if (cnt >= SPP_PORT_ABILITY_MAX) {
-				RTE_LOG(ERR, APP,
+				RTE_LOG(ERR, WK_CMD_RUNNER,
 						"No space of port ability.\n");
 				return SPP_RET_NG;
 			}
@@ -512,7 +514,7 @@ spp_iterate_core_info(struct spp_iterate_core_params *params)
 				"", SPP_TYPE_UNUSE_STR,
 				0, NULL, 0, NULL);
 			if (unlikely(ret != 0)) {
-				RTE_LOG(ERR, APP, "Cannot iterate core "
+				RTE_LOG(ERR, WK_CMD_RUNNER, "Cannot iterate core "
 						"information. "
 						"(core = %d, type = %d)\n",
 						lcore_id, SPP_COMPONENT_UNUSE);
@@ -545,7 +547,7 @@ spp_iterate_core_info(struct spp_iterate_core_params *params)
 						params);
 #endif /* SPP_MIRROR_MODULE */
 			if (unlikely(ret != 0)) {
-				RTE_LOG(ERR, APP, "Cannot iterate core "
+				RTE_LOG(ERR, WK_CMD_RUNNER, "Cannot iterate core "
 						"information. "
 						"(core = %d, type = %d)\n",
 						lcore_id, comp_info->type);
@@ -567,7 +569,7 @@ spp_iterate_classifier_table(
 
 	ret = spp_classifier_mac_iterate_table(params);
 	if (unlikely(ret != 0)) {
-		RTE_LOG(ERR, APP, "Cannot iterate classifier_mac_table.\n");
+		RTE_LOG(ERR, WK_CMD_RUNNER, "Cannot iterate classifier_mac_table.\n");
 		return SPP_RET_NG;
 	}
 
@@ -604,7 +606,7 @@ append_json_comma(char **output)
 {
 	*output = spp_strbuf_append(*output, JSON_COMMA, strlen(JSON_COMMA));
 	if (unlikely(*output == NULL)) {
-		RTE_LOG(ERR, SPP_COMMAND_PROC,
+		RTE_LOG(ERR, WK_CMD_RUNNER,
 				"JSON's comma failed to add.\n");
 		return SPP_RET_NG;
 	}
@@ -621,7 +623,7 @@ append_json_uint_value(const char *name, char **output, unsigned int value)
 	*output = spp_strbuf_append(*output, "",
 			strlen(name) + CMD_TAG_APPEND_SIZE*2);
 	if (unlikely(*output == NULL)) {
-		RTE_LOG(ERR, SPP_COMMAND_PROC,
+		RTE_LOG(ERR, WK_CMD_RUNNER,
 				"JSON's numeric format failed to add. "
 				"(name = %s, uint = %u)\n", name, value);
 		return SPP_RET_NG;
@@ -641,7 +643,7 @@ append_json_int_value(const char *name, char **output, int value)
 	*output = spp_strbuf_append(*output, "",
 			strlen(name) + CMD_TAG_APPEND_SIZE*2);
 	if (unlikely(*output == NULL)) {
-		RTE_LOG(ERR, SPP_COMMAND_PROC,
+		RTE_LOG(ERR, WK_CMD_RUNNER,
 				"JSON's numeric format failed to add. "
 				"(name = %s, int = %d)\n", name, value);
 		return SPP_RET_NG;
@@ -661,7 +663,7 @@ append_json_str_value(const char *name, char **output, const char *str)
 	*output = spp_strbuf_append(*output, "",
 			strlen(name) + strlen(str) + CMD_TAG_APPEND_SIZE);
 	if (unlikely(*output == NULL)) {
-		RTE_LOG(ERR, SPP_COMMAND_PROC,
+		RTE_LOG(ERR, WK_CMD_RUNNER,
 				"JSON's string format failed to add. "
 				"(name = %s, str = %s)\n", name, str);
 		return SPP_RET_NG;
@@ -681,7 +683,7 @@ append_json_array_brackets(const char *name, char **output, const char *str)
 	*output = spp_strbuf_append(*output, "",
 			strlen(name) + strlen(str) + CMD_TAG_APPEND_SIZE);
 	if (unlikely(*output == NULL)) {
-		RTE_LOG(ERR, SPP_COMMAND_PROC,
+		RTE_LOG(ERR, WK_CMD_RUNNER,
 				"JSON's square bracket failed to add. "
 				"(name = %s, str = %s)\n", name, str);
 		return SPP_RET_NG;
@@ -701,7 +703,7 @@ append_json_block_brackets(const char *name, char **output, const char *str)
 	*output = spp_strbuf_append(*output, "",
 			strlen(name) + strlen(str) + CMD_TAG_APPEND_SIZE);
 	if (unlikely(*output == NULL)) {
-		RTE_LOG(ERR, SPP_COMMAND_PROC,
+		RTE_LOG(ERR, WK_CMD_RUNNER,
 				"JSON's curly bracket failed to add. "
 				"(name = %s, str = %s)\n", name, str);
 		return SPP_RET_NG;
@@ -722,7 +724,7 @@ exec_cmd(const struct spp_command *cmd)
 {
 	int ret;
 
-	RTE_LOG(INFO, SPP_COMMAND_PROC, "Exec `%s` cmd.\n",
+	RTE_LOG(INFO, WK_CMD_RUNNER, "Exec `%s` cmd.\n",
 			sppwk_cmd_type_str(cmd->type));
 
 	switch (cmd->type) {
@@ -734,7 +736,7 @@ exec_cmd(const struct spp_command *cmd)
 				cmd->spec.cls_table.mac,
 				&cmd->spec.cls_table.port);
 		if (ret == 0) {
-			RTE_LOG(INFO, SPP_COMMAND_PROC, "Exec flush.\n");
+			RTE_LOG(INFO, WK_CMD_RUNNER, "Exec flush.\n");
 			ret = spp_flush();
 		}
 		break;
@@ -746,19 +748,19 @@ exec_cmd(const struct spp_command *cmd)
 				cmd->spec.comp.core,
 				cmd->spec.comp.type);
 		if (ret == 0) {
-			RTE_LOG(INFO, SPP_COMMAND_PROC, "Exec flush.\n");
+			RTE_LOG(INFO, WK_CMD_RUNNER, "Exec flush.\n");
 			ret = spp_flush();
 		}
 		break;
 
 	case SPPWK_CMDTYPE_PORT:
-		RTE_LOG(INFO, SPP_COMMAND_PROC, "with action `%s`.\n",
+		RTE_LOG(INFO, WK_CMD_RUNNER, "with action `%s`.\n",
 				sppwk_action_str(cmd->spec.port.wk_action));
 		ret = update_port(cmd->spec.port.wk_action,
 				&cmd->spec.port.port, cmd->spec.port.rxtx,
 				cmd->spec.port.name, &cmd->spec.port.ability);
 		if (ret == 0) {
-			RTE_LOG(INFO, SPP_COMMAND_PROC, "Exec flush.\n");
+			RTE_LOG(INFO, WK_CMD_RUNNER, "Exec flush.\n");
 			ret = spp_flush();
 		}
 		break;
@@ -883,7 +885,7 @@ append_error_details_value(const char *name, char **output, void *tmp)
 
 	tmp_buff = spp_strbuf_allocate(CMD_RES_BUF_INIT_SIZE);
 	if (unlikely(tmp_buff == NULL)) {
-		RTE_LOG(ERR, SPP_COMMAND_PROC,
+		RTE_LOG(ERR, WK_CMD_RUNNER,
 				/* TODO(yasufum) refactor no meaning err msg */
 				"allocate error. (name = %s)\n",
 				name);
@@ -925,7 +927,7 @@ append_interface_array(char **output, const enum port_type type)
 
 		*output = spp_strbuf_append(*output, tmp_str, strlen(tmp_str));
 		if (unlikely(*output == NULL)) {
-			RTE_LOG(ERR, SPP_COMMAND_PROC,
+			RTE_LOG(ERR, WK_CMD_RUNNER,
 					"Interface number failed to add. "
 					"(type = %d)\n", type);
 			return SPP_RET_NG;
@@ -954,7 +956,7 @@ append_interface_value(const char *name, char **output,
 	int ret = SPP_RET_NG;
 	char *tmp_buff = spp_strbuf_allocate(CMD_RES_BUF_INIT_SIZE);
 	if (unlikely(tmp_buff == NULL)) {
-		RTE_LOG(ERR, SPP_COMMAND_PROC,
+		RTE_LOG(ERR, WK_CMD_RUNNER,
 				/* TODO(yasufum) refactor no meaning err msg */
 				"allocate error. (name = %s)\n",
 				name);
@@ -1011,7 +1013,7 @@ append_vlan_block(const char *name, char **output,
 	struct spp_port_ability *info = NULL;
 	char *tmp_buff = spp_strbuf_allocate(CMD_RES_BUF_INIT_SIZE);
 	if (unlikely(tmp_buff == NULL)) {
-		RTE_LOG(ERR, SPP_COMMAND_PROC,
+		RTE_LOG(ERR, WK_CMD_RUNNER,
 				/* TODO(yasufum) refactor no meaning err msg */
 				"allocate error. (name = %s)\n",
 				name);
@@ -1062,7 +1064,7 @@ append_port_block(char **output, const struct sppwk_port_idx *port,
 	char port_str[CMD_TAG_APPEND_SIZE];
 	char *tmp_buff = spp_strbuf_allocate(CMD_RES_BUF_INIT_SIZE);
 	if (unlikely(tmp_buff == NULL)) {
-		RTE_LOG(ERR, SPP_COMMAND_PROC,
+		RTE_LOG(ERR, WK_CMD_RUNNER,
 				/* TODO(yasufum) refactor no meaning err msg */
 				"allocate error. (name = port_block)\n");
 		return SPP_RET_NG;
@@ -1095,7 +1097,7 @@ append_port_array(const char *name, char **output, const int num,
 	int i = 0;
 	char *tmp_buff = spp_strbuf_allocate(CMD_RES_BUF_INIT_SIZE);
 	if (unlikely(tmp_buff == NULL)) {
-		RTE_LOG(ERR, SPP_COMMAND_PROC,
+		RTE_LOG(ERR, WK_CMD_RUNNER,
 				/* TODO(yasufum) refactor no meaning err msg */
 				"allocate error. (name = %s)\n",
 				name);
@@ -1133,7 +1135,7 @@ append_core_element_value(
 	tmp_buff = spp_strbuf_allocate(CMD_RES_BUF_INIT_SIZE);
 	if (unlikely(tmp_buff == NULL)) {
 		/* TODO(yasufum) refactor no meaning err msg */
-		RTE_LOG(ERR, SPP_COMMAND_PROC,
+		RTE_LOG(ERR, WK_CMD_RUNNER,
 				"allocate error. (name = %s)\n",
 				name);
 		return ret;
@@ -1197,7 +1199,7 @@ append_core_value(const char *name, char **output,
 	struct spp_iterate_core_params itr_params;
 	char *tmp_buff = spp_strbuf_allocate(CMD_RES_BUF_INIT_SIZE);
 	if (unlikely(tmp_buff == NULL)) {
-		RTE_LOG(ERR, SPP_COMMAND_PROC,
+		RTE_LOG(ERR, WK_CMD_RUNNER,
 				/* TODO(yasufum) refactor no meaning err msg */
 				"allocate error. (name = %s)\n",
 				name);
@@ -1234,7 +1236,7 @@ append_classifier_element_value(
 	buff = params->output;
 	tmp_buff = spp_strbuf_allocate(CMD_RES_BUF_INIT_SIZE);
 	if (unlikely(tmp_buff == NULL)) {
-		RTE_LOG(ERR, SPP_COMMAND_PROC,
+		RTE_LOG(ERR, WK_CMD_RUNNER,
 				/* TODO(yasufum) refactor no meaning err msg */
 				"allocate error. (name = classifier_table)\n");
 		return ret;
@@ -1285,7 +1287,7 @@ append_classifier_table_value(const char *name, char **output,
 	struct spp_iterate_classifier_table_params itr_params;
 	char *tmp_buff = spp_strbuf_allocate(CMD_RES_BUF_INIT_SIZE);
 	if (unlikely(tmp_buff == NULL)) {
-		RTE_LOG(ERR, SPP_COMMAND_PROC,
+		RTE_LOG(ERR, WK_CMD_RUNNER,
 				/* TODO(yasufum) refactor no meaning err msg */
 				"allocate error. (name = %s)\n",
 				name);
@@ -1318,7 +1320,7 @@ append_response_list_value(char **output,
 	char *tmp_buff;
 	tmp_buff = spp_strbuf_allocate(CMD_RES_BUF_INIT_SIZE);
 	if (unlikely(tmp_buff == NULL)) {
-		RTE_LOG(ERR, SPP_COMMAND_PROC,
+		RTE_LOG(ERR, WK_CMD_RUNNER,
 				/* TODO(yasufum) refactor no meaning err msg */
 				"allocate error. (name = response_list)\n");
 		return SPP_RET_NG;
@@ -1329,7 +1331,7 @@ append_response_list_value(char **output,
 		ret = responses[i].func(responses[i].tag_name, &tmp_buff, tmp);
 		if (unlikely(ret < SPP_RET_OK)) {
 			spp_strbuf_free(tmp_buff);
-			RTE_LOG(ERR, SPP_COMMAND_PROC,
+			RTE_LOG(ERR, WK_CMD_RUNNER,
 					"Failed to get reply string. "
 					"(tag = %s)\n", responses[i].tag_name);
 			return SPP_RET_NG;
@@ -1342,7 +1344,7 @@ append_response_list_value(char **output,
 			ret = append_json_comma(output);
 			if (unlikely(ret < SPP_RET_OK)) {
 				spp_strbuf_free(tmp_buff);
-				RTE_LOG(ERR, SPP_COMMAND_PROC,
+				RTE_LOG(ERR, WK_CMD_RUNNER,
 						"Failed to add commas. "
 						"(tag = %s)\n",
 						responses[i].tag_name);
@@ -1354,7 +1356,7 @@ append_response_list_value(char **output,
 				strlen(tmp_buff));
 		if (unlikely(*output == NULL)) {
 			spp_strbuf_free(tmp_buff);
-			RTE_LOG(ERR, SPP_COMMAND_PROC,
+			RTE_LOG(ERR, WK_CMD_RUNNER,
 					"Failed to add reply string. "
 					"(tag = %s)\n",
 					responses[i].tag_name);
@@ -1402,7 +1404,7 @@ append_command_results_value(const char *name, char **output,
 	char *tmp_buff1, *tmp_buff2;
 	tmp_buff1 = spp_strbuf_allocate(CMD_RES_BUF_INIT_SIZE);
 	if (unlikely(tmp_buff1 == NULL)) {
-		RTE_LOG(ERR, SPP_COMMAND_PROC,
+		RTE_LOG(ERR, WK_CMD_RUNNER,
 				/* TODO(yasufum) refactor no meaning err msg */
 				"allocate error. (name = %s, buff=1)\n",
 				name);
@@ -1412,7 +1414,7 @@ append_command_results_value(const char *name, char **output,
 	tmp_buff2 = spp_strbuf_allocate(CMD_RES_BUF_INIT_SIZE);
 	if (unlikely(tmp_buff2 == NULL)) {
 		spp_strbuf_free(tmp_buff1);
-		RTE_LOG(ERR, SPP_COMMAND_PROC,
+		RTE_LOG(ERR, WK_CMD_RUNNER,
 				/* TODO(yasufum) refactor no meaning err msg */
 				"allocate error. (name = %s, buff=2)\n",
 				name);
@@ -1451,7 +1453,7 @@ append_info_value(const char *name, char **output)
 	int ret = SPP_RET_NG;
 	char *tmp_buff = spp_strbuf_allocate(CMD_RES_BUF_INIT_SIZE);
 	if (unlikely(tmp_buff == NULL)) {
-		RTE_LOG(ERR, SPP_COMMAND_PROC,
+		RTE_LOG(ERR, WK_CMD_RUNNER,
 				/* TODO(yasufum) refactor no meaning err msg */
 				"allocate error. (name = %s)\n",
 				name);
@@ -1481,7 +1483,7 @@ send_decode_error_response(int *sock,
 	tmp_buff = spp_strbuf_allocate(CMD_RES_BUF_INIT_SIZE);
 	if (unlikely(tmp_buff == NULL)) {
 		/* TODO(yasufum) refactor no meaning err msg */
-		RTE_LOG(ERR, SPP_COMMAND_PROC, "allocate error. "
+		RTE_LOG(ERR, WK_CMD_RUNNER, "allocate error. "
 				"(name = decode_error_response)\n");
 		return;
 	}
@@ -1491,7 +1493,7 @@ send_decode_error_response(int *sock,
 			request->num_command, command_results);
 	if (unlikely(ret < SPP_RET_OK)) {
 		spp_strbuf_free(tmp_buff);
-		RTE_LOG(ERR, SPP_COMMAND_PROC,
+		RTE_LOG(ERR, WK_CMD_RUNNER,
 				"Failed to make command result response.\n");
 		return;
 	}
@@ -1500,7 +1502,7 @@ send_decode_error_response(int *sock,
 	if (unlikely(msg == NULL)) {
 		spp_strbuf_free(tmp_buff);
 		/* TODO(yasufum) refactor no meaning err msg */
-		RTE_LOG(ERR, SPP_COMMAND_PROC, "allocate error. "
+		RTE_LOG(ERR, WK_CMD_RUNNER, "allocate error. "
 				"(name = decode_error_response)\n");
 		return;
 	}
@@ -1508,20 +1510,20 @@ send_decode_error_response(int *sock,
 	spp_strbuf_free(tmp_buff);
 	if (unlikely(ret < SPP_RET_OK)) {
 		spp_strbuf_free(msg);
-		RTE_LOG(ERR, SPP_COMMAND_PROC,
+		RTE_LOG(ERR, WK_CMD_RUNNER,
 				/* TODO(yasufum) refactor no meaning err msg */
 				"allocate error. (name = result_response)\n");
 		return;
 	}
 
-	RTE_LOG(DEBUG, SPP_COMMAND_PROC,
+	RTE_LOG(DEBUG, WK_CMD_RUNNER,
 			"Make command response (decode error). "
 			"response_str=\n%s\n", msg);
 
 	/* send response to requester */
 	ret = spp_send_message(sock, msg, strlen(msg));
 	if (unlikely(ret != SPP_RET_OK)) {
-		RTE_LOG(ERR, SPP_COMMAND_PROC,
+		RTE_LOG(ERR, WK_CMD_RUNNER,
 				"Failed to send decode error response.\n");
 		/* not return */
 	}
@@ -1539,7 +1541,7 @@ send_command_result_response(int *sock,
 	char *msg, *tmp_buff;
 	tmp_buff = spp_strbuf_allocate(CMD_RES_BUF_INIT_SIZE);
 	if (unlikely(tmp_buff == NULL)) {
-		RTE_LOG(ERR, SPP_COMMAND_PROC,
+		RTE_LOG(ERR, WK_CMD_RUNNER,
 				/* TODO(yasufum) refactor no meaning err msg */
 				"allocate error. (name = result_response)\n");
 		return;
@@ -1550,7 +1552,7 @@ send_command_result_response(int *sock,
 			request->num_command, command_results);
 	if (unlikely(ret < SPP_RET_OK)) {
 		spp_strbuf_free(tmp_buff);
-		RTE_LOG(ERR, SPP_COMMAND_PROC,
+		RTE_LOG(ERR, WK_CMD_RUNNER,
 				"Failed to make command result response.\n");
 		return;
 	}
@@ -1560,7 +1562,7 @@ send_command_result_response(int *sock,
 		ret = append_client_id_value("client_id", &tmp_buff, NULL);
 		if (unlikely(ret < SPP_RET_OK)) {
 			spp_strbuf_free(tmp_buff);
-			RTE_LOG(ERR, SPP_COMMAND_PROC, "Failed to make "
+			RTE_LOG(ERR, WK_CMD_RUNNER, "Failed to make "
 					"client id response.\n");
 			return;
 		}
@@ -1573,7 +1575,7 @@ send_command_result_response(int *sock,
 		ret = append_info_value("info", &tmp_buff);
 		if (unlikely(ret < SPP_RET_OK)) {
 			spp_strbuf_free(tmp_buff);
-			RTE_LOG(ERR, SPP_COMMAND_PROC,
+			RTE_LOG(ERR, WK_CMD_RUNNER,
 					"Failed to make status response.\n");
 			return;
 		}
@@ -1582,7 +1584,7 @@ send_command_result_response(int *sock,
 	msg = spp_strbuf_allocate(CMD_RES_BUF_INIT_SIZE);
 	if (unlikely(msg == NULL)) {
 		spp_strbuf_free(tmp_buff);
-		RTE_LOG(ERR, SPP_COMMAND_PROC,
+		RTE_LOG(ERR, WK_CMD_RUNNER,
 				/* TODO(yasufum) refactor no meaning err msg */
 				"allocate error. (name = result_response)\n");
 		return;
@@ -1591,20 +1593,20 @@ send_command_result_response(int *sock,
 	spp_strbuf_free(tmp_buff);
 	if (unlikely(ret < SPP_RET_OK)) {
 		spp_strbuf_free(msg);
-		RTE_LOG(ERR, SPP_COMMAND_PROC,
+		RTE_LOG(ERR, WK_CMD_RUNNER,
 				/* TODO(yasufum) refactor no meaning err msg */
 				"allocate error. (name = result_response)\n");
 		return;
 	}
 
-	RTE_LOG(DEBUG, SPP_COMMAND_PROC,
+	RTE_LOG(DEBUG, WK_CMD_RUNNER,
 			"Make command response (command result). "
 			"response_str=\n%s\n", msg);
 
 	/* send response to requester */
 	ret = spp_send_message(sock, msg, strlen(msg));
 	if (unlikely(ret != SPP_RET_OK)) {
-		RTE_LOG(ERR, SPP_COMMAND_PROC,
+		RTE_LOG(ERR, WK_CMD_RUNNER,
 			"Failed to send command result response.\n");
 		/* not return */
 	}
@@ -1627,7 +1629,7 @@ process_request(int *sock, const char *request_str, size_t request_str_len)
 	memset(&wk_err_msg, 0, sizeof(struct sppwk_parse_err_msg));
 	memset(command_results, 0, sizeof(command_results));
 
-	RTE_LOG(DEBUG, SPP_COMMAND_PROC, "Start command request processing. "
+	RTE_LOG(DEBUG, WK_CMD_RUNNER, "Start command request processing. "
 			"request_str=\n%.*s\n",
 			(int)request_str_len, request_str);
 
@@ -1639,12 +1641,12 @@ process_request(int *sock, const char *request_str, size_t request_str_len)
 		prepare_parse_err_msg(command_results, &request,
 				&wk_err_msg);
 		send_decode_error_response(sock, &request, command_results);
-		RTE_LOG(DEBUG, SPP_COMMAND_PROC,
+		RTE_LOG(DEBUG, WK_CMD_RUNNER,
 				"End command request processing.\n");
 		return SPP_RET_OK;
 	}
 
-	RTE_LOG(DEBUG, SPP_COMMAND_PROC, "Command request is valid. "
+	RTE_LOG(DEBUG, WK_CMD_RUNNER, "Command request is valid. "
 			"num_command=%d, num_valid_command=%d\n",
 			request.num_command, request.num_valid_command);
 
@@ -1671,7 +1673,7 @@ process_request(int *sock, const char *request_str, size_t request_str_len)
 		/* Other route is normal end because it responds to command. */
 		set_cmd_result(&command_results[0], CMD_SUCCESS, "");
 		send_command_result_response(sock, &request, command_results);
-		RTE_LOG(INFO, SPP_COMMAND_PROC,
+		RTE_LOG(INFO, WK_CMD_RUNNER,
 				"Terminate process for exit.\n");
 		return SPP_RET_NG;
 	}
@@ -1679,7 +1681,7 @@ process_request(int *sock, const char *request_str, size_t request_str_len)
 	/* send response */
 	send_command_result_response(sock, &request, command_results);
 
-	RTE_LOG(DEBUG, SPP_COMMAND_PROC, "End command request processing.\n");
+	RTE_LOG(DEBUG, WK_CMD_RUNNER, "End command request processing.\n");
 
 	return SPP_RET_OK;
 }
@@ -1704,7 +1706,7 @@ sppwk_cmd_run(void)
 	if (unlikely(msgbuf == NULL)) {
 		msgbuf = spp_strbuf_allocate(CMD_REQ_BUF_INIT_SIZE);
 		if (unlikely(msgbuf == NULL)) {
-			RTE_LOG(ERR, SPP_COMMAND_PROC,
+			RTE_LOG(ERR, WK_CMD_RUNNER,
 					"Cannot allocate memory "
 					"for receive data(init).\n");
 			return SPP_RET_NG;
-- 
2.17.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-31  3:36 [spp] [PATCH 0/2] Update old log labels APP ogawa.yasufumi
2019-05-31  3:36 ` [spp] [PATCH 1/2] shared/sec: change log label in cmd parser ogawa.yasufumi
2019-05-31  3:36 ` [spp] [PATCH 2/2] shared/sec: change log label in cmd runner ogawa.yasufumi

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