Soft Patch Panel
 help / color / mirror / Atom feed
* [spp] [PATCH 0/2] remove flush command and cancel command from vf
@ 2018-07-16 23:43 x-fn-spp
  2018-07-19  2:23 ` [spp] [PATCH v2 " x-fn-spp
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: x-fn-spp @ 2018-07-16 23:43 UTC (permalink / raw)
  To: ferruh.yigit, ogawa.yasufumi; +Cc: spp

From: Hideyuki Yamashita <yamashita.hideyuki@po.ntt-tx.co.jp>

This patch set removes flush command and cancel command from vf.
One patch is changing src and the other is changing documents.


Hideyuki Yamashita (2):
  spp_vf: remove flush command and cancel command
  docs: remove description related to flush and cancel

 docs/guides/spp_vf/commands/secondary.rst | 31 -------------------------------
 docs/guides/spp_vf/use_cases/usecase1.rst | 27 ++++-----------------------
 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 -----
 7 files changed, 19 insertions(+), 99 deletions(-)

-- 
1.9.1

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

* [spp] [PATCH v2 0/2] remove flush command and cancel command from vf
  2018-07-16 23:43 [spp] [PATCH 0/2] remove flush command and cancel command from vf x-fn-spp
@ 2018-07-19  2:23 ` x-fn-spp
  2018-07-27  0:32   ` [spp] [PATCH v3 0/2] change to not use flush and cancel commnad x-fn-spp
                     ` (2 more replies)
  2018-07-19  2:23 ` [spp] [PATCH v2 1/2] docs: remove description related to flush and cancel x-fn-spp
  2018-07-19  2:23 ` [spp] [PATCH v2 2/2] spp_vf: remove flush command and cancel command x-fn-spp
  2 siblings, 3 replies; 9+ messages in thread
From: x-fn-spp @ 2018-07-19  2:23 UTC (permalink / raw)
  To: ferruh.yigit, ogawa.yasufumi; +Cc: spp

From: Hideyuki Yamashita <yamashita.hideyuki@po.ntt-tx.co.jp>

This patch set removes flush command and cancel command from vf.
One patch is changing src and the other is changing documents.

The motivation to remove flush command and cancel
command is as following:

Currently, user have to type flush each time
he/she wants to reflect change to spp_vf.
But it is kind of bothering.
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.
By doing this, usability will be increased.


Hideyuki Yamashita (2):
  docs: remove description related to flush and cancel
  spp_vf: remove flush command and cancel command

 docs/guides/spp_vf/commands/secondary.rst | 31 -------------------------------
 docs/guides/spp_vf/use_cases/usecase1.rst | 27 ++++-----------------------
 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 -----
 7 files changed, 19 insertions(+), 99 deletions(-)

-- 
1.9.1

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

* [spp] [PATCH v2 1/2] docs: remove description related to flush and cancel
  2018-07-16 23:43 [spp] [PATCH 0/2] remove flush command and cancel command from vf x-fn-spp
  2018-07-19  2:23 ` [spp] [PATCH v2 " x-fn-spp
@ 2018-07-19  2:23 ` x-fn-spp
  2018-07-19  2:23 ` [spp] [PATCH v2 2/2] spp_vf: remove flush command and cancel command x-fn-spp
  2 siblings, 0 replies; 9+ messages in thread
From: x-fn-spp @ 2018-07-19  2:23 UTC (permalink / raw)
  To: ferruh.yigit, ogawa.yasufumi; +Cc: spp

From: Hideyuki Yamashita <yamashita.hideyuki@po.ntt-tx.co.jp>

This patche removes descriptions related to flush and cancel.
- remove from Use Cases(4.1.2,4.1.5)
- remove from SPP VF Commands(5.2.5,5.2.6)
- typo fix in Use Cases

Signed-off-by: Hideyuki Yamashita <yamashita.hideyuki@po.ntt-tx.co.jp>
Signed-off-by: Naoki Takada <takada.naoki@lab.ntt.co.jp>
---
 docs/guides/spp_vf/commands/secondary.rst | 31 -------------------------------
 docs/guides/spp_vf/use_cases/usecase1.rst | 27 ++++-----------------------
 2 files changed, 4 insertions(+), 54 deletions(-)

diff --git a/docs/guides/spp_vf/commands/secondary.rst b/docs/guides/spp_vf/commands/secondary.rst
index 19e594c..58ccec5 100644
--- a/docs/guides/spp_vf/commands/secondary.rst
+++ b/docs/guides/spp_vf/commands/secondary.rst
@@ -251,34 +251,3 @@ This is an example to delete an entry with VLAN ID 101.
 .. code-block:: console
 
     spp > sec 0;classifier_table del vlan 101 52:54:00:01:00:01 ring:0
-
-
-flush
------
-
-.. note::
-    This command is only supported for spp_vf.
-
-Activate series of commands for a SPP VF secondary process
-(``component``, ``port`` or ``classifier`` command).
-
-You can cancel commands any time until
-before running ``cancel`` command.
-
-.. code-block:: console
-
-    spp > sec 1;flush
-
-
-cancel
-------
-
-.. note::
-    This command is only supported for spp_vf.
-
-Cancel all of commands for a SPP VF secondary process
-before running ``flush`` command.
-
-.. code-block:: console
-
-    spp > sec 1;cancel
diff --git a/docs/guides/spp_vf/use_cases/usecase1.rst b/docs/guides/spp_vf/use_cases/usecase1.rst
index 6a4f62f..5109518 100644
--- a/docs/guides/spp_vf/use_cases/usecase1.rst
+++ b/docs/guides/spp_vf/use_cases/usecase1.rst
@@ -243,19 +243,6 @@ Register entries to classifier_table for classifier2.
     Please verify that MAC address of target VM is specified in
     [MACADDRESS] parameter.
 
-Finally, activate all of settings by doign `flush` subcommand.
-
-.. code-block:: console
-
-    spp > sec 1;flush
-
-.. note::
-
-    Commands for SPP VF Controller are accepted but not activated until
-    user inputs ``flush`` subcommand.
-    You can cancel all of commands before doing ``flush``.
-
-
 Setup for VMs
 ~~~~~~~~~~~~~
 
@@ -337,8 +324,8 @@ for the first SSH login path.
 .. code-block:: console
 
     # Delete MAC address from Classifier
-    spp > sec 1;classifier_table del mac 51:54:00:12:34:56 ring:0
-    spp > sec 1;classifier_table del mac 51:54:00:12:34:58 ring:1
+    spp > sec 1;classifier_table del mac 52:54:00:12:34:56 ring:0
+    spp > sec 1;classifier_table del mac 52:54:00:12:34:58 ring:1
 
 .. code-block:: console
 
@@ -382,8 +369,8 @@ components.
 .. code-block:: console
 
     # Delete MAC address from Classifier
-    spp > sec 1;classifier_table del mac 51:54:00:12:34:57 ring:4
-    spp > sec 1;classifier_table del mac 51:54:00:12:34:59 ring:5
+    spp > sec 1;classifier_table del mac 52:54:00:12:34:57 ring:4
+    spp > sec 1;classifier_table del mac 52:54:00:12:34:59 ring:5
 
 .. code-block:: console
 
@@ -419,9 +406,3 @@ Then, stop components.
     spp > sec 1;component stop forwarder7
     spp > sec 1;component stop forwarder8
     spp > sec 1;component stop merger2
-
-Finally, run ``flush`` subcommand.
-
-.. code-block:: console
-
-    spp > sec 1;flush
-- 
1.9.1

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

* [spp] [PATCH v2 2/2] spp_vf: remove flush command and cancel command
  2018-07-16 23:43 [spp] [PATCH 0/2] remove flush command and cancel command from vf x-fn-spp
  2018-07-19  2:23 ` [spp] [PATCH v2 " x-fn-spp
  2018-07-19  2:23 ` [spp] [PATCH v2 1/2] docs: remove description related to flush and cancel x-fn-spp
@ 2018-07-19  2:23 ` x-fn-spp
  2 siblings, 0 replies; 9+ messages in thread
From: x-fn-spp @ 2018-07-19  2:23 UTC (permalink / raw)
  To: ferruh.yigit, ogawa.yasufumi; +Cc: spp

From: Hideyuki Yamashita <yamashita.hideyuki@po.ntt-tx.co.jp>

This patch removes flush command and cancel command.
* stop accepting flush/cancel command
* send error when receive flush/cancel command
* call spp_flush() internally when component/port/classifier_mac
  command is accepted
* remove cancel related functions
  (Note that flush functions still remains even
  after this change)

The motivation to remove flush command and cancel
command is as following:

Currently, user have to type flush each time
he/she wants to reflect change to spp_vf.
But it is kind of bothering.
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.
By doing this, usability will be increased.

Signed-off-by: Hideyuki Yamashita <yamashita.hideyuki@po.ntt-tx.co.jp>
Signed-off-by: Naoki Takada <takada.naoki@lab.ntt.co.jp>
---
 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..0cda68e 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.\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.\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.\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)(
-- 
1.9.1

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

* [spp] [PATCH v3 0/2] change to not use flush and cancel commnad
  2018-07-19  2:23 ` [spp] [PATCH v2 " x-fn-spp
@ 2018-07-27  0:32   ` x-fn-spp
  2018-07-29 23:15     ` Yasufumi Ogawa
  2018-07-27  0:32   ` [spp] [PATCH v3 1/2] docs: remove description related to flush and cancel x-fn-spp
  2018-07-27  0:32   ` [spp] [PATCH v3 2/2] spp_vf: change to not use flush and cancel commnad x-fn-spp
  2 siblings, 1 reply; 9+ messages in thread
From: x-fn-spp @ 2018-07-27  0:32 UTC (permalink / raw)
  To: ferruh.yigit, ogawa.yasufumi; +Cc: spp

From: Hideyuki Yamashita <yamashita.hideyuki@po.ntt-tx.co.jp>

Hello Yasufumi-san,

I made commit message more simple compared with the previous
versions.
The original intention still the same.


Hideyuki Yamashita (2):
  docs: remove description related to flush and cancel
  spp_vf: change to not use flush and cancel commnad

 docs/guides/spp_vf/commands/secondary.rst | 31 -----------------------
 docs/guides/spp_vf/use_cases/usecase1.rst | 27 +++-----------------
 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 ----
 7 files changed, 19 insertions(+), 99 deletions(-)

-- 
2.18.0

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

* [spp] [PATCH v3 1/2] docs: remove description related to flush and cancel
  2018-07-19  2:23 ` [spp] [PATCH v2 " x-fn-spp
  2018-07-27  0:32   ` [spp] [PATCH v3 0/2] change to not use flush and cancel commnad x-fn-spp
@ 2018-07-27  0:32   ` x-fn-spp
  2018-07-27  0:32   ` [spp] [PATCH v3 2/2] spp_vf: change to not use flush and cancel commnad x-fn-spp
  2 siblings, 0 replies; 9+ messages in thread
From: x-fn-spp @ 2018-07-27  0:32 UTC (permalink / raw)
  To: ferruh.yigit, ogawa.yasufumi; +Cc: spp

From: Hideyuki Yamashita <yamashita.hideyuki@po.ntt-tx.co.jp>

This patche removes descriptions related to flush and cancel.
- remove from Use Cases(4.1.2,4.1.5)
- remove from SPP VF Commands(5.2.5,5.2.6)
- typo fix in Use Cases

Signed-off-by: Hideyuki Yamashita <yamashita.hideyuki@po.ntt-tx.co.jp>
Signed-off-by: Naoki Takada <takada.naoki@lab.ntt.co.jp>
---
 docs/guides/spp_vf/commands/secondary.rst | 31 -----------------------
 docs/guides/spp_vf/use_cases/usecase1.rst | 27 +++-----------------
 2 files changed, 4 insertions(+), 54 deletions(-)

diff --git a/docs/guides/spp_vf/commands/secondary.rst b/docs/guides/spp_vf/commands/secondary.rst
index 19e594c..58ccec5 100644
--- a/docs/guides/spp_vf/commands/secondary.rst
+++ b/docs/guides/spp_vf/commands/secondary.rst
@@ -251,34 +251,3 @@ This is an example to delete an entry with VLAN ID 101.
 .. code-block:: console
 
     spp > sec 0;classifier_table del vlan 101 52:54:00:01:00:01 ring:0
-
-
-flush
------
-
-.. note::
-    This command is only supported for spp_vf.
-
-Activate series of commands for a SPP VF secondary process
-(``component``, ``port`` or ``classifier`` command).
-
-You can cancel commands any time until
-before running ``cancel`` command.
-
-.. code-block:: console
-
-    spp > sec 1;flush
-
-
-cancel
-------
-
-.. note::
-    This command is only supported for spp_vf.
-
-Cancel all of commands for a SPP VF secondary process
-before running ``flush`` command.
-
-.. code-block:: console
-
-    spp > sec 1;cancel
diff --git a/docs/guides/spp_vf/use_cases/usecase1.rst b/docs/guides/spp_vf/use_cases/usecase1.rst
index 6a4f62f..5109518 100644
--- a/docs/guides/spp_vf/use_cases/usecase1.rst
+++ b/docs/guides/spp_vf/use_cases/usecase1.rst
@@ -243,19 +243,6 @@ Register entries to classifier_table for classifier2.
     Please verify that MAC address of target VM is specified in
     [MACADDRESS] parameter.
 
-Finally, activate all of settings by doign `flush` subcommand.
-
-.. code-block:: console
-
-    spp > sec 1;flush
-
-.. note::
-
-    Commands for SPP VF Controller are accepted but not activated until
-    user inputs ``flush`` subcommand.
-    You can cancel all of commands before doing ``flush``.
-
-
 Setup for VMs
 ~~~~~~~~~~~~~
 
@@ -337,8 +324,8 @@ for the first SSH login path.
 .. code-block:: console
 
     # Delete MAC address from Classifier
-    spp > sec 1;classifier_table del mac 51:54:00:12:34:56 ring:0
-    spp > sec 1;classifier_table del mac 51:54:00:12:34:58 ring:1
+    spp > sec 1;classifier_table del mac 52:54:00:12:34:56 ring:0
+    spp > sec 1;classifier_table del mac 52:54:00:12:34:58 ring:1
 
 .. code-block:: console
 
@@ -382,8 +369,8 @@ components.
 .. code-block:: console
 
     # Delete MAC address from Classifier
-    spp > sec 1;classifier_table del mac 51:54:00:12:34:57 ring:4
-    spp > sec 1;classifier_table del mac 51:54:00:12:34:59 ring:5
+    spp > sec 1;classifier_table del mac 52:54:00:12:34:57 ring:4
+    spp > sec 1;classifier_table del mac 52:54:00:12:34:59 ring:5
 
 .. code-block:: console
 
@@ -419,9 +406,3 @@ Then, stop components.
     spp > sec 1;component stop forwarder7
     spp > sec 1;component stop forwarder8
     spp > sec 1;component stop merger2
-
-Finally, run ``flush`` subcommand.
-
-.. code-block:: console
-
-    spp > sec 1;flush
-- 
2.18.0

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

* [spp] [PATCH v3 2/2] spp_vf: change to not use flush and cancel commnad
  2018-07-19  2:23 ` [spp] [PATCH v2 " x-fn-spp
  2018-07-27  0:32   ` [spp] [PATCH v3 0/2] change to not use flush and cancel commnad x-fn-spp
  2018-07-27  0:32   ` [spp] [PATCH v3 1/2] docs: remove description related to flush and cancel x-fn-spp
@ 2018-07-27  0:32   ` x-fn-spp
  2 siblings, 0 replies; 9+ messages in thread
From: x-fn-spp @ 2018-07-27  0:32 UTC (permalink / raw)
  To: ferruh.yigit, ogawa.yasufumi; +Cc: spp

From: Hideyuki Yamashita <yamashita.hideyuki@po.ntt-tx.co.jp>

It is bothering to run flush every time after changing configrations.
User does not need to run flush if spp_vf executes it for accepting
command by itself. Cancel command is also not needed for this change.

This patch is to stop support for flush and cancel command by following
changes.
- Send an error if it receives flush or cancel command.
- Call spp_flush() if it receives component, port or classifier_mac
  command.
- Remove functions for cancel command.

Signed-off-by: Hideyuki Yamashita <yamashita.hideyuki@po.ntt-tx.co.jp>
Signed-off-by: Naoki Takada <takada.naoki@lab.ntt.co.jp>
---
 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..0cda68e 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.\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.\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.\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)(
-- 
2.18.0

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

* Re: [spp] [PATCH v3 0/2] change to not use flush and cancel commnad
  2018-07-27  0:32   ` [spp] [PATCH v3 0/2] change to not use flush and cancel commnad x-fn-spp
@ 2018-07-29 23:15     ` Yasufumi Ogawa
  2018-08-22  9:34       ` Ferruh Yigit
  0 siblings, 1 reply; 9+ messages in thread
From: Yasufumi Ogawa @ 2018-07-29 23:15 UTC (permalink / raw)
  To: x-fn-spp, ferruh.yigit; +Cc: spp

On 2018/07/27 9:32, x-fn-spp@sl.ntt-tx.co.jp wrote:
> From: Hideyuki Yamashita <yamashita.hideyuki@po.ntt-tx.co.jp>
> 
> Hello Yasufumi-san,
> 
> I made commit message more simple compared with the previous
> versions.
> The original intention still the same.
Thanks for your update!

Acked-by: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
> 
> 
> Hideyuki Yamashita (2):
>    docs: remove description related to flush and cancel
>    spp_vf: change to not use flush and cancel commnad
> 
>   docs/guides/spp_vf/commands/secondary.rst | 31 -----------------------
>   docs/guides/spp_vf/use_cases/usecase1.rst | 27 +++-----------------
>   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 ----
>   7 files changed, 19 insertions(+), 99 deletions(-)
> 


-- 
Yasufumi Ogawa
NTT Network Service Systems Labs

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

* Re: [spp] [PATCH v3 0/2] change to not use flush and cancel commnad
  2018-07-29 23:15     ` Yasufumi Ogawa
@ 2018-08-22  9:34       ` Ferruh Yigit
  0 siblings, 0 replies; 9+ messages in thread
From: Ferruh Yigit @ 2018-08-22  9:34 UTC (permalink / raw)
  To: Yasufumi Ogawa, x-fn-spp; +Cc: spp

On 7/30/2018 12:15 AM, Yasufumi Ogawa wrote:
> On 2018/07/27 9:32, x-fn-spp@sl.ntt-tx.co.jp wrote:
>> From: Hideyuki Yamashita <yamashita.hideyuki@po.ntt-tx.co.jp>
>>
>> Hello Yasufumi-san,
>>
>> I made commit message more simple compared with the previous
>> versions.
>> The original intention still the same.
> Thanks for your update!
> 
> Acked-by: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>

Series applied, thanks.

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

end of thread, other threads:[~2018-08-22  9:34 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-16 23:43 [spp] [PATCH 0/2] remove flush command and cancel command from vf x-fn-spp
2018-07-19  2:23 ` [spp] [PATCH v2 " x-fn-spp
2018-07-27  0:32   ` [spp] [PATCH v3 0/2] change to not use flush and cancel commnad x-fn-spp
2018-07-29 23:15     ` Yasufumi Ogawa
2018-08-22  9:34       ` Ferruh Yigit
2018-07-27  0:32   ` [spp] [PATCH v3 1/2] docs: remove description related to flush and cancel x-fn-spp
2018-07-27  0:32   ` [spp] [PATCH v3 2/2] spp_vf: change to not use flush and cancel commnad x-fn-spp
2018-07-19  2:23 ` [spp] [PATCH v2 1/2] docs: remove description related to flush and cancel x-fn-spp
2018-07-19  2:23 ` [spp] [PATCH v2 2/2] spp_vf: remove flush command and cancel command x-fn-spp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).