[v3,2/3] app/testpmd: add host port parameter into flow config

Message ID 20230210151709.1619-3-viacheslavo@nvidia.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series *ethdev: sharing indirect actions between port* |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Slava Ovsiienko Feb. 10, 2023, 3:17 p.m. UTC
  Host port id parameter is added to "flow configure" command.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
 app/test-pmd/cmdline_flow.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
  

Patch

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 3b846ae73f..7778828919 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -230,6 +230,7 @@  enum index {
 	CONFIG_METERS_NUMBER,
 	CONFIG_CONN_TRACK_NUMBER,
 	CONFIG_FLAGS,
+	CONFIG_HOST_PORT,
 
 	/* Indirect action arguments */
 	INDIRECT_ACTION_CREATE,
@@ -1114,6 +1115,7 @@  static const enum index next_config_attr[] = {
 	CONFIG_METERS_NUMBER,
 	CONFIG_CONN_TRACK_NUMBER,
 	CONFIG_FLAGS,
+	CONFIG_HOST_PORT,
 	END,
 	ZERO,
 };
@@ -2767,6 +2769,14 @@  static const struct token token_list[] = {
 		.args = ARGS(ARGS_ENTRY(struct buffer,
 					args.configure.port_attr.flags)),
 	},
+	[CONFIG_HOST_PORT] = {
+		.name = "host_port",
+		.help = "host port for shared objects",
+		.next = NEXT(next_config_attr,
+			     NEXT_ENTRY(COMMON_UNSIGNED)),
+		.args = ARGS(ARGS_ENTRY(struct buffer,
+					args.configure.port_attr.host_port_id)),
+	},
 	/* Top-level command. */
 	[PATTERN_TEMPLATE] = {
 		.name = "pattern_template",