From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 4A8B4A05D3 for ; Tue, 21 May 2019 04:34:52 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3FE99A3; Tue, 21 May 2019 04:34:52 +0200 (CEST) Received: from tama50.ecl.ntt.co.jp (tama50.ecl.ntt.co.jp [129.60.39.147]) by dpdk.org (Postfix) with ESMTP id 43804A3 for ; Tue, 21 May 2019 04:34:50 +0200 (CEST) Received: from vc2.ecl.ntt.co.jp (vc2.ecl.ntt.co.jp [129.60.86.154]) by tama50.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id x4L2YnZp003212; Tue, 21 May 2019 11:34:49 +0900 Received: from vc2.ecl.ntt.co.jp (localhost [127.0.0.1]) by vc2.ecl.ntt.co.jp (Postfix) with ESMTP id 1FEEE6387B4; Tue, 21 May 2019 11:34:49 +0900 (JST) Received: from localhost.localdomain (lobster.nslab.ecl.ntt.co.jp [129.60.13.95]) by vc2.ecl.ntt.co.jp (Postfix) with ESMTP id 11DEB638746; Tue, 21 May 2019 11:34:49 +0900 (JST) From: ogawa.yasufumi@lab.ntt.co.jp To: spp@dpdk.org, ferruh.yigit@intel.com, ogawa.yasufumi@lab.ntt.co.jp Date: Tue, 21 May 2019 11:32:17 +0900 Message-Id: <1558405944-8355-2-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1558405944-8355-1-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> References: <1558405944-8355-1-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> X-TM-AS-MML: disable Subject: [spp] [PATCH 1/8] shared/sec: rename parsing port for port cmd X-BeenThere: spp@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Soft Patch Panel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spp-bounces@dpdk.org Sender: "spp" From: Yasufumi Ogawa This update is to rename `decode_port_port_value()` to `parse_port()`. Signed-off-by: Yasufumi Ogawa --- .../secondary/spp_worker_th/cmd_parser.c | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/shared/secondary/spp_worker_th/cmd_parser.c b/src/shared/secondary/spp_worker_th/cmd_parser.c index 88b4b4f..64828ca 100644 --- a/src/shared/secondary/spp_worker_th/cmd_parser.c +++ b/src/shared/secondary/spp_worker_th/cmd_parser.c @@ -31,7 +31,7 @@ const char *CMD_ACT_LIST[] = { * List of classifier type. The order of items should be same as the order of * enum `spp_classifier_type` defined in spp_proc.h. */ -/* TODO(yasufum) fix sinmilar var in command_proc.c */ +/* TODO(yasufum) fix similar vars in command_proc.c */ const char *CLS_TYPE_LIST[] = { "none", "mac", @@ -297,7 +297,7 @@ parse_lcore_id(void *output, const char *arg_val) return SPP_RET_OK; } -/* decoding procedure of action for component command */ +/* Parse given action in `component` command. */ static int parse_comp_action(void *output, const char *arg_val, int allow_override __attribute__ ((unused))) @@ -324,7 +324,7 @@ parse_comp_action(void *output, const char *arg_val, return SPP_RET_OK; } -/* Parse given name `arg_val` of component. */ +/* Parse given name of `arg_val` in `component` command. */ static int parse_comp_name(void *output, const char *arg_val, int allow_override __attribute__ ((unused))) @@ -351,7 +351,7 @@ parse_comp_name(void *output, const char *arg_val, return SPP_RET_OK; } -/* Parse given lcore ID of `arg_val` of component. */ +/* Parse given lcore ID of `arg_val` in `component` command. */ static int parse_comp_lcore_id(void *output, const char *arg_val, int allow_override __attribute__ ((unused))) @@ -366,8 +366,8 @@ parse_comp_lcore_id(void *output, const char *arg_val, } /** - * Parse given type of component of `arg_val`. Return OK code if succeeded, or - * NG code. + * Parse given type of component of `arg_val` in `component` command. + * Return OK code if succeeded, or NG code. */ static int parse_comp_type(void *output, const char *arg_val, @@ -392,7 +392,7 @@ parse_comp_type(void *output, const char *arg_val, return SPP_RET_OK; } -/* Parse given action for port of `arg_val`. */ +/* Parse given action for port of `arg_val` in `port` command. */ static int parse_port_action(void *output, const char *arg_val, int allow_override __attribute__ ((unused))) @@ -420,11 +420,11 @@ parse_port_action(void *output, const char *arg_val, return SPP_RET_OK; } -/* decoding procedure of port for port command. */ +/* Parse given port uid in port command. */ static int -decode_port_port_value(void *output, const char *arg_val, int allow_override) +parse_port(void *output, const char *arg_val, int allow_override) { - int ret = SPP_RET_NG; + int ret; struct sppwk_port_idx tmp_port; struct sppwk_cmd_port *port = output; @@ -432,7 +432,7 @@ decode_port_port_value(void *output, const char *arg_val, int allow_override) if (ret < SPP_RET_OK) return SPP_RET_NG; - /* add vlantag command check */ + /* If action is `add`, check the port is already used for rx and tx. */ if (allow_override == 0) { if ((port->wk_action == SPPWK_ACT_ADD) && (spp_check_used_port(tmp_port.iface_type, @@ -442,7 +442,7 @@ decode_port_port_value(void *output, const char *arg_val, int allow_override) tmp_port.iface_no, SPP_PORT_RXTX_TX) >= 0)) { RTE_LOG(ERR, SPP_COMMAND_PROC, - "Port in used. (port command) val=%s\n", + "Port `%s` is already used.\n", arg_val); return SPP_RET_NG; } @@ -833,7 +833,7 @@ cmd_ops_list[][SPPWK_MAX_PARAMS] = { { .name = "port", .offset = offsetof(struct spp_command, spec.port), - .func = decode_port_port_value + .func = parse_port }, { .name = "port rxtx", -- 2.17.1