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 DE705A05D3 for ; Tue, 21 May 2019 04:34:32 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D527AA3; Tue, 21 May 2019 04:34:32 +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 33BB84C80 for ; Tue, 21 May 2019 04:34:30 +0200 (CEST) Received: from vc1.ecl.ntt.co.jp (vc1.ecl.ntt.co.jp [129.60.86.153]) by tama50.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id x4L2YUT4003207; Tue, 21 May 2019 11:34:30 +0900 Received: from vc1.ecl.ntt.co.jp (localhost [127.0.0.1]) by vc1.ecl.ntt.co.jp (Postfix) with ESMTP id 1F872EA78C6; Tue, 21 May 2019 11:34:30 +0900 (JST) Received: from localhost.localdomain (lobster.nslab.ecl.ntt.co.jp [129.60.13.95]) by vc1.ecl.ntt.co.jp (Postfix) with ESMTP id 11E82EA7A91; Tue, 21 May 2019 11:34:30 +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:03 +0900 Message-Id: <1558405924-8303-6-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1558405924-8303-1-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> References: <1558405924-8303-1-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> X-TM-AS-MML: disable Subject: [spp] [PATCH 5/6] shared/sec: rename func of parsing comp type 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 redundant rename `decode_component_type_value()` to `parse_comp_type()`. Signed-off-by: Yasufumi Ogawa --- src/shared/secondary/spp_worker_th/cmd_parser.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/shared/secondary/spp_worker_th/cmd_parser.c b/src/shared/secondary/spp_worker_th/cmd_parser.c index b03f9b8..7d56146 100644 --- a/src/shared/secondary/spp_worker_th/cmd_parser.c +++ b/src/shared/secondary/spp_worker_th/cmd_parser.c @@ -364,22 +364,25 @@ parse_comp_lcore_id(void *output, const char *arg_val, return parse_lcore_id(&component->core, arg_val); } -/* decoding procedure of type for component command */ +/** + * Parse given type of component of `arg_val`. Return OK code if succeeded, or + * NG code. + */ static int -decode_component_type_value(void *output, const char *arg_val, - int allow_override __attribute__ ((unused))) +parse_comp_type(void *output, const char *arg_val, + int allow_override __attribute__ ((unused))) { enum spp_component_type comp_type; struct sppwk_cmd_comp *component = output; - /* "stop" has no type parameter. */ + /* Parsing comp type is required only for action `start`. */ if (component->wk_action != SPPWK_ACT_START) return SPP_RET_OK; comp_type = get_comp_type_from_str(arg_val); if (unlikely(comp_type <= 0)) { RTE_LOG(ERR, SPP_COMMAND_PROC, - "Unknown component type. val=%s\n", + "Unknown component type '%s'.\n", arg_val); return SPP_RET_NG; } @@ -813,7 +816,7 @@ cmd_ops_list[][SPPWK_MAX_PARAMS] = { { .name = "component type", .offset = offsetof(struct spp_command, spec.comp), - .func = decode_component_type_value + .func = parse_comp_type }, SPPWK_CMD_NO_PARAMS, }, -- 2.17.1