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 B23CBA0096 for ; Wed, 8 May 2019 04:03:57 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A94061D7; Wed, 8 May 2019 04:03:57 +0200 (CEST) Received: from tama500.ecl.ntt.co.jp (tama500.ecl.ntt.co.jp [129.60.39.148]) by dpdk.org (Postfix) with ESMTP id ABB4E3772 for ; Wed, 8 May 2019 04:03:53 +0200 (CEST) Received: from vc1.ecl.ntt.co.jp (vc1.ecl.ntt.co.jp [129.60.86.153]) by tama500.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id x4823quj023081; Wed, 8 May 2019 11:03:52 +0900 Received: from vc1.ecl.ntt.co.jp (localhost [127.0.0.1]) by vc1.ecl.ntt.co.jp (Postfix) with ESMTP id 7A6FBEA7089; Wed, 8 May 2019 11:03:52 +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 709B2EA705C; Wed, 8 May 2019 11:03:52 +0900 (JST) From: ogawa.yasufumi@lab.ntt.co.jp To: spp@dpdk.org, ferruh.yigit@intel.com, ogawa.yasufumi@lab.ntt.co.jp Date: Wed, 8 May 2019 11:01:30 +0900 Message-Id: <1557280895-7978-13-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1557280895-7978-1-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> References: <1557280895-7978-1-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> X-TM-AS-MML: disable Subject: [spp] [PATCH 12/17] shared/sec: change struct of comp command 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 For refactoring, change the name of struct `spp_command_component` to `sppwk_cmd_comp`. Signed-off-by: Yasufumi Ogawa --- src/shared/secondary/spp_worker_th/cmd_parser.h | 4 ++-- src/shared/secondary/spp_worker_th/command_dec.c | 14 +++++++------- src/shared/secondary/spp_worker_th/command_proc.c | 8 ++++---- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/shared/secondary/spp_worker_th/cmd_parser.h b/src/shared/secondary/spp_worker_th/cmd_parser.h index 04f9f75..669f199 100644 --- a/src/shared/secondary/spp_worker_th/cmd_parser.h +++ b/src/shared/secondary/spp_worker_th/cmd_parser.h @@ -87,7 +87,7 @@ struct sppwk_cmd_flush { }; /* `component` command parameters. */ -struct spp_command_component { +struct sppwk_cmd_comp { enum sppwk_action wk_action; /**< start or stop */ char name[SPPWK_NAME_BUFSZ]; /**< component name */ unsigned int core; /**< logical core number */ @@ -109,7 +109,7 @@ struct spp_command { union { /**< command descriptors */ struct sppwk_cls_cmd_attr cls_table; struct sppwk_cmd_flush flush; - struct spp_command_component component; + struct sppwk_cmd_comp comp; struct spp_command_port port; } spec; }; diff --git a/src/shared/secondary/spp_worker_th/command_dec.c b/src/shared/secondary/spp_worker_th/command_dec.c index 9904ad8..493d9cb 100644 --- a/src/shared/secondary/spp_worker_th/command_dec.c +++ b/src/shared/secondary/spp_worker_th/command_dec.c @@ -372,7 +372,7 @@ decode_component_name_value(void *output, const char *arg_val, int allow_override __attribute__ ((unused))) { int ret = SPP_RET_OK; - struct spp_command_component *component = output; + struct sppwk_cmd_comp *component = output; /* "stop" has no core ID parameter. */ if (component->wk_action == SPPWK_ACT_START) { @@ -393,7 +393,7 @@ static int decode_component_core_value(void *output, const char *arg_val, int allow_override __attribute__ ((unused))) { - struct spp_command_component *component = output; + struct sppwk_cmd_comp *component = output; /* "stop" has no core ID parameter. */ if (component->wk_action != SPPWK_ACT_START) @@ -408,7 +408,7 @@ decode_component_type_value(void *output, const char *arg_val, int allow_override __attribute__ ((unused))) { enum spp_component_type comp_type; - struct spp_command_component *component = output; + struct sppwk_cmd_comp *component = output; /* "stop" has no type parameter. */ if (component->wk_action != SPPWK_ACT_START) @@ -831,22 +831,22 @@ parameter_list[][SPPWK_MAX_PARAMS] = { { .name = "action", .offset = offsetof(struct spp_command, - spec.component.wk_action), + spec.comp.wk_action), .func = decode_component_action_value }, { .name = "component name", - .offset = offsetof(struct spp_command, spec.component), + .offset = offsetof(struct spp_command, spec.comp), .func = decode_component_name_value }, { .name = "core", - .offset = offsetof(struct spp_command, spec.component), + .offset = offsetof(struct spp_command, spec.comp), .func = decode_component_core_value }, { .name = "component type", - .offset = offsetof(struct spp_command, spec.component), + .offset = offsetof(struct spp_command, spec.comp), .func = decode_component_type_value }, DECODE_PARAMETER_LIST_EMPTY, diff --git a/src/shared/secondary/spp_worker_th/command_proc.c b/src/shared/secondary/spp_worker_th/command_proc.c index c5b1273..3e8c52a 100644 --- a/src/shared/secondary/spp_worker_th/command_proc.c +++ b/src/shared/secondary/spp_worker_th/command_proc.c @@ -760,10 +760,10 @@ execute_command(const struct spp_command *command) RTE_LOG(INFO, SPP_COMMAND_PROC, "Execute component command.\n"); ret = spp_update_component( - command->spec.component.wk_action, - command->spec.component.name, - command->spec.component.core, - command->spec.component.type); + command->spec.comp.wk_action, + command->spec.comp.name, + command->spec.comp.core, + command->spec.comp.type); if (ret == 0) { RTE_LOG(INFO, SPP_COMMAND_PROC, "Execute flush.\n"); -- 2.17.1