From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail04.ics.ntt-tx.co.jp (mail05.ics.ntt-tx.co.jp [210.232.35.69]) by dpdk.org (Postfix) with ESMTP id EF13610A3 for ; Wed, 18 Jul 2018 10:21:06 +0200 (CEST) Received: from gwchk03.silk.ntt-tx.co.jp (gwchk03.silk.ntt-tx.co.jp [10.107.0.111]) by mail04.ics.ntt-tx.co.jp (unknown) with ESMTP id w6I8L2wc021087; Wed, 18 Jul 2018 17:21:02 +0900 Received: (from root@localhost) by gwchk03.silk.ntt-tx.co.jp (unknown) id w6I8L1eG002572; Wed, 18 Jul 2018 17:21:01 +0900 Received: from gwchk.silk.ntt-tx.co.jp [10.107.0.110] by gwchk03.silk.ntt-tx.co.jp with ESMTP id TAA02571; Wed, 18 Jul 2018 17:21:01 +0900 Received: from imss06.silk.ntt-tx.co.jp (localhost [127.0.0.1]) by ccmail04.silk.ntt-tx.co.jp (unknown) with ESMTP id w6I8L1LT018350; Wed, 18 Jul 2018 17:21:01 +0900 Received: from imss06.silk.ntt-tx.co.jp (localhost [127.0.0.1]) by imss06.silk.ntt-tx.co.jp (unknown) with ESMTP id w6I8L1fF001711; Wed, 18 Jul 2018 17:21:01 +0900 Received: from ccmail04 (smtp03.silk.ntt-tx.co.jp [10.107.0.135]) by imss06.silk.ntt-tx.co.jp (unknown) with SMTP id w6I8L1xn001708; Wed, 18 Jul 2018 17:21:01 +0900 Date: Wed, 18 Jul 2018 17:19:54 +0900 From: Hideyuki Yamashita In-Reply-To: References: <201807162343.w6GNhNud014054@imss03.silk.ntt-tx.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Becky! ver. 2.74 [ja] X-CCMail7: CC-Mail-V7.0.2-Client-Relayed Message-Id: <201807180820.w6I8KfLp018215@ccmail04.silk.ntt-tx.co.jp> X-TM-AS-MML: No X-CC-Mail-RelayStamp: CC-Mail-V5.14-Server To: Yasufumi Ogawa Cc: x-fn-spp@sl.ntt-tx.co.jp, ferruh.yigit@intel.com, spp@dpdk.org Subject: Re: [spp] [spp 03037] Re: [PATCH 1/2] spp_vf: remove flush command and cancel 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: , X-List-Received-Date: Wed, 18 Jul 2018 08:21:07 -0000 Hello Yasufumi-san, Thanks for your comments. Please see inline. > On 2018/07/17 8:43, x-fn-spp@sl.ntt-tx.co.jp wrote: > > From: Hideyuki Yamashita > > > > This patch removes flush command and cancel command. > > * call spp_flush() internally when component/port/classifier_mac > > command is accepted > Hi Hideyuki, > > I think this update is a little confusing because the meaning of "removes flush command" is unclear. spp_flush() is not removed but executed if ret is 0. I assume that you are going to remove flush command from SPP controller and spp_flush() is still remained in spp_vf. I think you had better to describe exactly what is your change, and why you remove flush and cancel command in this case. What you are saying is absolutely correct. Flush function itself still remains even after this change applied. What I changed is stop accepting flush command from user. My intention of deleting flush command from SPP controller is to increase usability. Currently, user have to type flush each time he/she wants to reflect change to SPP. But it is kind of bother. After this change, user does not have to type "flush" because flush function is called internally at the end of classifier/component/port command procedure. > Log message "Execute flush command.\n" is also not appropriate because this command is removed in this change. I will change Log message "Execute flush.\n" instead of "Execute flush command \n" following your instruction. > > * send error when receive flush/cancel command > No error is sent in this update. Sorry for my poor explanation. But by deleting flush/cancel related functions from command_proc.c, when spp_vf receive those command, it assumes it received "Unknown command" and it returns error(this route is existing one). I will send revised patch set later (maybe tommorrow). BR, Hideyuki NTT TechnoCross > Thanks > > * remove cancel related functions > > > Signed-off-by: Hideyuki Yamashita > > Signed-off-by: Naoki Takada > > --- > > src/vf/command_dec.c | 4 ---- > > src/vf/command_dec.h | 6 ------ > > src/vf/command_proc.c | 25 +++++++++++++++---------- > > src/vf/spp_vf.c | 20 -------------------- > > src/vf/spp_vf.h | 5 ----- > > 5 files changed, 15 insertions(+), 45 deletions(-) > > > > diff --git a/src/vf/command_dec.c b/src/vf/command_dec.c > > index 2c7debc..74b0c1d 100644 > > --- a/src/vf/command_dec.c > > +++ b/src/vf/command_dec.c > > @@ -642,7 +642,6 @@ static struct decode_parameter_list parameter_list[][SPP_CMD_MAX_PARAMETERS] = { > > }, > > DECODE_PARAMETER_LIST_EMPTY, > > }, > > - { DECODE_PARAMETER_LIST_EMPTY }, /* flush */ > > { DECODE_PARAMETER_LIST_EMPTY }, /* _get_client_id */ > > { DECODE_PARAMETER_LIST_EMPTY }, /* status */ > > { DECODE_PARAMETER_LIST_EMPTY }, /* exit */ > > @@ -709,7 +708,6 @@ static struct decode_parameter_list parameter_list[][SPP_CMD_MAX_PARAMETERS] = { > > }, > > DECODE_PARAMETER_LIST_EMPTY, > > }, > > - { DECODE_PARAMETER_LIST_EMPTY }, /* cancel */ > > { DECODE_PARAMETER_LIST_EMPTY }, /* termination */ > > }; > > > @@ -755,7 +753,6 @@ static struct decode_command_list command_list[] = { > > /* classifier_table(mac) */ > > { "classifier_table", 6, 6, decode_command_parameter_in_list }, > > /* classifier_table(vlan) */ > > - { "flush", 1, 1, NULL }, /* flush */ > > { "_get_client_id", 1, 1, NULL }, /* _get_client_id */ > > { "status", 1, 1, NULL }, /* status */ > > { "exit", 1, 1, NULL }, /* exit */ > > @@ -763,7 +760,6 @@ static struct decode_command_list command_list[] = { > > /* component */ > > { "port", 5, 8, decode_command_parameter_in_list }, > > /* port */ > > - { "cancel", 1, 1, NULL }, /* cancel */ > > { "", 0, 0, NULL } /* termination */ > > }; > > > diff --git a/src/vf/command_dec.h b/src/vf/command_dec.h > > index e7cbc8b..93444cb 100644 > > --- a/src/vf/command_dec.h > > +++ b/src/vf/command_dec.h > > @@ -50,9 +50,6 @@ enum spp_command_type { > > /** classifier_table command(VLAN) */ > > SPP_CMDTYPE_CLASSIFIER_TABLE_VLAN, > > > - /** flush command */ > > - SPP_CMDTYPE_FLUSH, > > - > > /** get_client_id command */ > > SPP_CMDTYPE_CLIENT_ID, > > > @@ -67,9 +64,6 @@ enum spp_command_type { > > > /** port command */ > > SPP_CMDTYPE_PORT, > > - > > - /** cancel command */ > > - SPP_CMDTYPE_CANCEL, > > }; > > > /** "classifier_table" command specific parameters */ > > diff --git a/src/vf/command_proc.c b/src/vf/command_proc.c > > index e13ae2c..398d9f9 100644 > > --- a/src/vf/command_proc.c > > +++ b/src/vf/command_proc.c > > @@ -218,11 +218,11 @@ execute_command(const struct spp_command *command) > > command->spec.classifier_table.vid, > > command->spec.classifier_table.mac, > > &command->spec.classifier_table.port); > > - break; > > - > > - case SPP_CMDTYPE_FLUSH: > > - RTE_LOG(INFO, SPP_COMMAND_PROC, "Execute flush command.\n"); > > - ret = spp_flush(); > > + if (ret == 0) { > > + RTE_LOG(INFO, SPP_COMMAND_PROC, > > + "Execute flush command.\n"); > > + ret = spp_flush(); > > + } > > break; > > > case SPP_CMDTYPE_COMPONENT: > > @@ -232,6 +232,11 @@ execute_command(const struct spp_command *command) > > command->spec.component.name, > > command->spec.component.core, > > command->spec.component.type); > > + if (ret == 0) { > > + RTE_LOG(INFO, SPP_COMMAND_PROC, > > + "Execute flush command.\n"); > > + ret = spp_flush(); > > + } > > break; > > > case SPP_CMDTYPE_PORT: > > @@ -244,11 +249,11 @@ execute_command(const struct spp_command *command) > > command->spec.port.rxtx, > > command->spec.port.name, > > &command->spec.port.ability); > > - break; > > - > > - case SPP_CMDTYPE_CANCEL: > > - RTE_LOG(INFO, SPP_COMMAND_PROC, "Execute cancel command.\n"); > > - spp_cancel(); > > + if (ret == 0) { > > + RTE_LOG(INFO, SPP_COMMAND_PROC, > > + "Execute flush command.\n"); > > + ret = spp_flush(); > > + } > > break; > > > default: > > diff --git a/src/vf/spp_vf.c b/src/vf/spp_vf.c > > index 4d0d278..2a77ec6 100644 > > --- a/src/vf/spp_vf.c > > +++ b/src/vf/spp_vf.c > > @@ -664,19 +664,6 @@ backup_mng_info(struct cancel_backup_info *backup) > > memset(g_change_component, 0x00, sizeof(g_change_component)); > > } > > > -/* Cancel update of management information */ > > -static void > > -cancel_mng_info(struct cancel_backup_info *backup) > > -{ > > - dump_all_mng_info(backup->core, backup->component, &backup->interface); > > - copy_mng_info(g_core_info, g_component_info, &g_iface_info, > > - backup->core, backup->component, &backup->interface, > > - COPY_MNG_FLG_ALLCOPY); > > - dump_all_mng_info(g_core_info, g_component_info, &g_iface_info); > > - memset(g_change_core, 0x00, sizeof(g_change_core)); > > - memset(g_change_component, 0x00, sizeof(g_change_component)); > > -} > > - > > /** > > * Initialize g_iface_info > > * > > @@ -1635,13 +1622,6 @@ spp_flush(void) > > return ret; > > } > > > -/* Cancel data that is not flushing */ > > -void > > -spp_cancel(void) > > -{ > > - cancel_mng_info(&g_backup_info); > > -} > > - > > /* Iterate core information */ > > int > > spp_iterate_core_info(struct spp_iterate_core_params *params) > > diff --git a/src/vf/spp_vf.h b/src/vf/spp_vf.h > > index adcfafe..3491879 100644 > > --- a/src/vf/spp_vf.h > > +++ b/src/vf/spp_vf.h > > @@ -267,11 +267,6 @@ int spp_update_port( > > */ > > int spp_flush(void); > > > -/** > > - * Cancel data that is not flushing > > - */ > > -void spp_cancel(void); > > - > > struct spp_iterate_core_params; > > /** definition of iterated core element procedure function */ > > typedef int (*spp_iterate_core_element_proc)( > > > > -- Yasufumi Ogawa > NTT Network Service Systems Labs >