patch 'app/flow-perf: fix division or module by zero' has been queued to stable release 22.11.2

Xueming Li xuemingl at nvidia.com
Sun Apr 9 17:24:41 CEST 2023


Hi,

FYI, your patch has been queued to stable release 22.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 04/11/23. 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://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging/commit/55f236de5c17c0bc591c9c647829197aa78cc61e

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 55f236de5c17c0bc591c9c647829197aa78cc61e Mon Sep 17 00:00:00 2001
From: Mohammad Iqbal Ahmad <mahmad at marvell.com>
Date: Tue, 24 Jan 2023 16:08:03 +0530
Subject: [PATCH] app/flow-perf: fix division or module by zero
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 132d39dcab370b2112e0a24ab1c94036b40b9557 ]

Fix division or module by zero reported by coverity scan.

Coverity issue: 373870
Fixes: bf3688f1e816 ("app/flow-perf: add insertion rate calculation")

Signed-off-by: Mohammad Iqbal Ahmad <mahmad at marvell.com>
Acked-by: Wisam Jaddo <wisamm at nvidia.com>
---
 .mailmap                  | 1 +
 app/test-flow-perf/main.c | 7 ++++++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/.mailmap b/.mailmap
index e9ecebafc1..89fdbe2542 100644
--- a/.mailmap
+++ b/.mailmap
@@ -917,6 +917,7 @@ Mitch Williams <mitch.a.williams at intel.com>
 Mit Matelske <mit at pt.net>
 Mohamad Noor Alim Hussin <mohamad.noor.alim.hussin at intel.com>
 Mohammad Abdul Awal <mohammad.abdul.awal at intel.com>
+Mohammad Iqbal Ahmad <mahmad at marvell.com>
 Mohammed Gamal <mgamal at redhat.com>
 Mohsin Kazmi <mohsin.kazmi14 at gmail.com>
 Mohsin Mazhar Shaikh <mohsinmazhar_shaikh at trendmicro.com>
diff --git a/app/test-flow-perf/main.c b/app/test-flow-perf/main.c
index 4a9206803a..e0ef78a840 100644
--- a/app/test-flow-perf/main.c
+++ b/app/test-flow-perf/main.c
@@ -848,7 +848,12 @@ args_parse(int argc, char **argv)
 			/* Control */
 			if (strcmp(lgopts[opt_idx].name,
 					"rules-batch") == 0) {
-				rules_batch = atoi(optarg);
+				n = atoi(optarg);
+				if (n > 0)
+					rules_batch = n;
+				else
+					rte_exit(EXIT_FAILURE,
+							"flow rules-batch should be > 0\n");
 			}
 			if (strcmp(lgopts[opt_idx].name,
 					"rules-count") == 0) {
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-04-09 21:45:41.146423000 +0800
+++ 0093-app-flow-perf-fix-division-or-module-by-zero.patch	2023-04-09 21:45:38.709042200 +0800
@@ -1 +1 @@
-From 132d39dcab370b2112e0a24ab1c94036b40b9557 Mon Sep 17 00:00:00 2001
+From 55f236de5c17c0bc591c9c647829197aa78cc61e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 132d39dcab370b2112e0a24ab1c94036b40b9557 ]
@@ -10 +12,0 @@
-Cc: stable at dpdk.org
@@ -20 +22 @@
-index aaa15deff9..4018f0fc47 100644
+index e9ecebafc1..89fdbe2542 100644
@@ -23 +25 @@
-@@ -924,6 +924,7 @@ Mitch Williams <mitch.a.williams at intel.com>
+@@ -917,6 +917,7 @@ Mitch Williams <mitch.a.williams at intel.com>


More information about the stable mailing list