DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] app/testpmd: fix flow tunnel create command
@ 2020-11-15 11:23 Gregory Etelson
  2020-11-17 12:51 ` Ferruh Yigit
  2020-11-19 11:10 ` [dpdk-dev] [PATCH v2] app/testpmd: fix flow tunnel commands Gregory Etelson
  0 siblings, 2 replies; 6+ messages in thread
From: Gregory Etelson @ 2020-11-15 11:23 UTC (permalink / raw)
  To: dev
  Cc: getelson, matan, rasland, Ori Kam, Wenzhuo Lu, Beilei Xing,
	Bernard Iremonger

testpmd provides commands to test tunnel offload rte_flow
capabilities. A command that creates a tunnel had a syntax bug that
allowed to spesify the 'create' command part several times.

Current patch fixed that fault. Correct syntax for tunnel cretion is:
testpmd> flow tunnel create <port> type <tunnel type>

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
 app/test-pmd/cmdline_flow.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 457f74078d..bf00ba0acb 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -812,8 +812,7 @@ static const enum index next_vc_attr[] = {
 	ZERO,
 };
 
-static const enum index tunnel_create_attr[] = {
-	TUNNEL_CREATE,
+static const enum index tunnel_create_type_attr[] = {
 	TUNNEL_CREATE_TYPE,
 	END,
 	ZERO,
@@ -2009,14 +2008,15 @@ static const struct token token_list[] = {
 	[TUNNEL_CREATE] = {
 		.name = "create",
 		.help = "create new tunnel object",
-		.next = NEXT(tunnel_create_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(TUNNEL_CREATE_TYPE),
+			     NEXT_ENTRY(PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_CREATE_TYPE] = {
 		.name = "type",
 		.help = "create new tunnel",
-		.next = NEXT(tunnel_create_attr, NEXT_ENTRY(FILE_PATH)),
+		.next = NEXT(tunnel_create_type_attr, NEXT_ENTRY(FILE_PATH)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, type)),
 		.call = parse_tunnel,
 	},
-- 
2.29.2


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

end of thread, other threads:[~2020-11-19 17:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-15 11:23 [dpdk-dev] [PATCH] app/testpmd: fix flow tunnel create command Gregory Etelson
2020-11-17 12:51 ` Ferruh Yigit
2020-11-17 13:46   ` Gregory Etelson
2020-11-19 11:10 ` [dpdk-dev] [PATCH v2] app/testpmd: fix flow tunnel commands Gregory Etelson
2020-11-19 16:50   ` Ori Kam
2020-11-19 17:29     ` Ferruh Yigit

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).