patch 'app/flow-perf: fix parsing of invalid option' has been queued to stable release 20.11.4

Xueming Li xuemingl at nvidia.com
Sun Nov 28 15:53:45 CET 2021


Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/7b247102a4157359d341bfa2b6df094fb5f607dc

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 7b247102a4157359d341bfa2b6df094fb5f607dc Mon Sep 17 00:00:00 2001
From: Raslan Darawsheh <rasland at nvidia.com>
Date: Tue, 16 Nov 2021 16:12:26 +0200
Subject: [PATCH] app/flow-perf: fix parsing of invalid option
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 22ffcce31b9489705bca6eaf87f4714437cc16da ]

Currently, if an invalid parameter is passed to the application
it will cause a crash due to missing default in options.

For example:
        ./dpdk-test-flow-perf -a 01:00.0 -- --invalid

This adds missing default for options, and prints the
invalid option.

Fixes: 3344cf2e3001 ("app/flow-perf: add flow performance skeleton")

Signed-off-by: Raslan Darawsheh <rasland at nvidia.com>
Acked-by: Wisam Jaddo <wisamm at nvidia.com>
---
 app/test-flow-perf/main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/test-flow-perf/main.c b/app/test-flow-perf/main.c
index f525bc913a..3b3ecdc75e 100644
--- a/app/test-flow-perf/main.c
+++ b/app/test-flow-perf/main.c
@@ -591,6 +591,7 @@ args_parse(int argc, char **argv)
 		{ "raw-decap",                  1, 0, 0 },
 		{ "vxlan-encap",                0, 0, 0 },
 		{ "vxlan-decap",                0, 0, 0 },
+		{ 0, 0, 0, 0 },
 	};
 
 	RTE_ETH_FOREACH_DEV(i)
@@ -751,7 +752,7 @@ args_parse(int argc, char **argv)
 		default:
 			usage(argv[0]);
 			rte_exit(EXIT_FAILURE, "Invalid option: %s\n",
-					argv[optind]);
+					argv[optind - 1]);
 			break;
 		}
 	}
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:05.485167594 +0800
+++ 0041-app-flow-perf-fix-parsing-of-invalid-option.patch	2021-11-28 22:41:03.323540920 +0800
@@ -1 +1 @@
-From 22ffcce31b9489705bca6eaf87f4714437cc16da Mon Sep 17 00:00:00 2001
+From 7b247102a4157359d341bfa2b6df094fb5f607dc Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 22ffcce31b9489705bca6eaf87f4714437cc16da ]
@@ -16 +18,0 @@
-Cc: stable at dpdk.org
@@ -25 +27 @@
-index 2b612aa32c..11f1ee0e1e 100644
+index f525bc913a..3b3ecdc75e 100644
@@ -28,4 +30,4 @@
-@@ -715,6 +715,7 @@ args_parse(int argc, char **argv)
- 		{ "policy-mtr",                 1, 0, 0 },
- 		{ "meter-profile",              1, 0, 0 },
- 		{ "packet-mode",                0, 0, 0 },
+@@ -591,6 +591,7 @@ args_parse(int argc, char **argv)
+ 		{ "raw-decap",                  1, 0, 0 },
+ 		{ "vxlan-encap",                0, 0, 0 },
+ 		{ "vxlan-decap",                0, 0, 0 },
@@ -36 +38 @@
-@@ -951,7 +952,7 @@ args_parse(int argc, char **argv)
+@@ -751,7 +752,7 @@ args_parse(int argc, char **argv)


More information about the stable mailing list