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

luca.boccassi at gmail.com luca.boccassi at gmail.com
Wed Mar 15 23:46:30 CET 2023


Hi,

FYI, your patch has been queued to stable release 20.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/17/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://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/2e3d3e025d3f04065763e4c483b874c4da701e81

Thanks.

Luca Boccassi

---
>From 2e3d3e025d3f04065763e4c483b874c4da701e81 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

[ 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>
---
 app/test-flow-perf/main.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/app/test-flow-perf/main.c b/app/test-flow-perf/main.c
index 899f6c93b6..b05f70cfb6 100644
--- a/app/test-flow-perf/main.c
+++ b/app/test-flow-perf/main.c
@@ -709,13 +709,11 @@ args_parse(int argc, char **argv)
 			if (strcmp(lgopts[opt_idx].name,
 					"rules-batch") == 0) {
 				n = atoi(optarg);
-				if (n >= DEFAULT_RULES_BATCH)
+				if (n > 0)
 					rules_batch = n;
-				else {
+				else
 					rte_exit(EXIT_FAILURE,
-						"rules_batch should be >= %d\n",
-						DEFAULT_RULES_BATCH);
-				}
+							"flow rules-batch should be > 0\n");
 			}
 			if (strcmp(lgopts[opt_idx].name,
 					"rules-count") == 0) {
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-03-15 22:44:51.856028877 +0000
+++ 0039-app-flow-perf-fix-division-or-module-by-zero.patch	2023-03-15 22:44:49.667852022 +0000
@@ -1 +1 @@
-From 132d39dcab370b2112e0a24ab1c94036b40b9557 Mon Sep 17 00:00:00 2001
+From 2e3d3e025d3f04065763e4c483b874c4da701e81 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 132d39dcab370b2112e0a24ab1c94036b40b9557 ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -15,3 +16,2 @@
- .mailmap                  | 1 +
- app/test-flow-perf/main.c | 7 ++++++-
- 2 files changed, 7 insertions(+), 1 deletion(-)
+ app/test-flow-perf/main.c | 8 +++-----
+ 1 file changed, 3 insertions(+), 5 deletions(-)
@@ -19,12 +18,0 @@
-diff --git a/.mailmap b/.mailmap
-index aaa15deff9..4018f0fc47 100644
---- a/.mailmap
-+++ b/.mailmap
-@@ -924,6 +924,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>
@@ -32 +20 @@
-index 4a9206803a..e0ef78a840 100644
+index 899f6c93b6..b05f70cfb6 100644
@@ -35,2 +23 @@
-@@ -848,7 +848,12 @@ args_parse(int argc, char **argv)
- 			/* Control */
+@@ -709,13 +709,11 @@ args_parse(int argc, char **argv)
@@ -39,2 +26,2 @@
--				rules_batch = atoi(optarg);
-+				n = atoi(optarg);
+ 				n = atoi(optarg);
+-				if (n >= DEFAULT_RULES_BATCH)
@@ -42 +29,2 @@
-+					rules_batch = n;
+ 					rules_batch = n;
+-				else {
@@ -44 +32,4 @@
-+					rte_exit(EXIT_FAILURE,
+ 					rte_exit(EXIT_FAILURE,
+-						"rules_batch should be >= %d\n",
+-						DEFAULT_RULES_BATCH);
+-				}


More information about the stable mailing list