DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH v1 1/2] mailmap: add contributor to list
@ 2022-12-16  7:39 Mohammad Iqbal Ahmad
  2022-12-16  7:39 ` [PATCH v1 2/2] app/test-flow-perf: fix division or module by zero Mohammad Iqbal Ahmad
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Mohammad Iqbal Ahmad @ 2022-12-16  7:39 UTC (permalink / raw)
  To: dev, Thomas Monjalon
  Cc: jerinj, skori, skoteshwar, pbhagavatula, kirankumark, psatheesh,
	asekhar, anoobj, gakhil, hkalra, ndabilpuram,
	Mohammad Iqbal Ahmad

Add contributer to mailmap.

Signed-off-by: Mohammad Iqbal Ahmad <mahmad@marvell.com>
---
 .mailmap | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.mailmap b/.mailmap
index 75884b6fe2..464164765f 100644
--- a/.mailmap
+++ b/.mailmap
@@ -911,6 +911,7 @@ Mitch Williams <mitch.a.williams@intel.com>
 Mit Matelske <mit@pt.net>
 Mohamad Noor Alim Hussin <mohamad.noor.alim.hussin@intel.com>
 Mohammad Abdul Awal <mohammad.abdul.awal@intel.com>
+Mohammad Iqbal Ahmad <mahmad@marvell.com>
 Mohammed Gamal <mgamal@redhat.com>
 Mohsin Kazmi <mohsin.kazmi14@gmail.com>
 Mohsin Mazhar Shaikh <mohsinmazhar_shaikh@trendmicro.com>
-- 
2.25.1


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

* [PATCH v1 2/2] app/test-flow-perf: fix division or module by zero
  2022-12-16  7:39 [PATCH v1 1/2] mailmap: add contributor to list Mohammad Iqbal Ahmad
@ 2022-12-16  7:39 ` Mohammad Iqbal Ahmad
  2022-12-19  8:34 ` [PATCH v2 1/2] mailmap: add contributor to list Mohammad Iqbal Ahmad
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 17+ messages in thread
From: Mohammad Iqbal Ahmad @ 2022-12-16  7:39 UTC (permalink / raw)
  To: dev, Wisam Jaddo, Xiaoyu Min
  Cc: jerinj, skori, skoteshwar, pbhagavatula, kirankumark, psatheesh,
	asekhar, anoobj, gakhil, hkalra, ndabilpuram,
	Mohammad Iqbal Ahmad

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@marvell.com>
---
 app/test-flow-perf/main.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/app/test-flow-perf/main.c b/app/test-flow-perf/main.c
index 4a9206803a..0a542b0d87 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


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

* [PATCH v2 1/2] mailmap: add contributor to list
  2022-12-16  7:39 [PATCH v1 1/2] mailmap: add contributor to list Mohammad Iqbal Ahmad
  2022-12-16  7:39 ` [PATCH v1 2/2] app/test-flow-perf: fix division or module by zero Mohammad Iqbal Ahmad
@ 2022-12-19  8:34 ` Mohammad Iqbal Ahmad
  2022-12-19  8:34   ` [PATCH v2 2/2] app/test-flow-perf: fix division or module by zero Mohammad Iqbal Ahmad
                     ` (2 more replies)
  2023-01-09 10:57 ` [PATCH v1 1/2] mailmap: add contributor to list Mohammad Iqbal Ahmad
  2023-01-10 14:56 ` [PATCH v1] examples/l3fwd: fix for coverity scan Mohammad Iqbal Ahmad
  3 siblings, 3 replies; 17+ messages in thread
From: Mohammad Iqbal Ahmad @ 2022-12-19  8:34 UTC (permalink / raw)
  To: dev, Thomas Monjalon
  Cc: jerinj, skori, skoteshwar, pbhagavatula, kirankumark, psatheesh,
	asekhar, anoobj, gakhil, hkalra, ndabilpuram,
	Mohammad Iqbal Ahmad

Add contributor to mailmap.

Signed-off-by: Mohammad Iqbal Ahmad <mahmad@marvell.com>
---
 .mailmap | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.mailmap b/.mailmap
index 75884b6fe2..464164765f 100644
--- a/.mailmap
+++ b/.mailmap
@@ -911,6 +911,7 @@ Mitch Williams <mitch.a.williams@intel.com>
 Mit Matelske <mit@pt.net>
 Mohamad Noor Alim Hussin <mohamad.noor.alim.hussin@intel.com>
 Mohammad Abdul Awal <mohammad.abdul.awal@intel.com>
+Mohammad Iqbal Ahmad <mahmad@marvell.com>
 Mohammed Gamal <mgamal@redhat.com>
 Mohsin Kazmi <mohsin.kazmi14@gmail.com>
 Mohsin Mazhar Shaikh <mohsinmazhar_shaikh@trendmicro.com>
-- 
2.25.1


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

* [PATCH v2 2/2] app/test-flow-perf: fix division or module by zero
  2022-12-19  8:34 ` [PATCH v2 1/2] mailmap: add contributor to list Mohammad Iqbal Ahmad
@ 2022-12-19  8:34   ` Mohammad Iqbal Ahmad
  2023-01-23 11:41   ` [PATCH v2 1/2] mailmap: add contributor to list Mohammad Iqbal Ahmad
  2023-01-24 10:38   ` [PATCH v3 1/1] app/test-flow-perf: fix division or module by zero Mohammad Iqbal Ahmad
  2 siblings, 0 replies; 17+ messages in thread
From: Mohammad Iqbal Ahmad @ 2022-12-19  8:34 UTC (permalink / raw)
  To: dev, Wisam Jaddo, Xiaoyu Min
  Cc: jerinj, skori, skoteshwar, pbhagavatula, kirankumark, psatheesh,
	asekhar, anoobj, gakhil, hkalra, ndabilpuram,
	Mohammad Iqbal Ahmad

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@marvell.com>
---
 app/test-flow-perf/main.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/app/test-flow-perf/main.c b/app/test-flow-perf/main.c
index 4a9206803a..0a542b0d87 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


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

* RE: [PATCH v1 1/2] mailmap: add contributor to list
  2022-12-16  7:39 [PATCH v1 1/2] mailmap: add contributor to list Mohammad Iqbal Ahmad
  2022-12-16  7:39 ` [PATCH v1 2/2] app/test-flow-perf: fix division or module by zero Mohammad Iqbal Ahmad
  2022-12-19  8:34 ` [PATCH v2 1/2] mailmap: add contributor to list Mohammad Iqbal Ahmad
@ 2023-01-09 10:57 ` Mohammad Iqbal Ahmad
  2023-01-10 14:56 ` [PATCH v1] examples/l3fwd: fix for coverity scan Mohammad Iqbal Ahmad
  3 siblings, 0 replies; 17+ messages in thread
From: Mohammad Iqbal Ahmad @ 2023-01-09 10:57 UTC (permalink / raw)
  To: Mohammad Iqbal Ahmad, dev, Thomas Monjalon
  Cc: Jerin Jacob Kollanukkaran, Sunil Kumar Kori,
	Satha Koteswara Rao Kottidi, Pavan Nikhilesh Bhagavatula,
	Kiran Kumar Kokkilagadda, Satheesh Paul Antonysamy,
	Ashwin Sekhar T K, Anoob Joseph, Akhil Goyal, Harman Kalra,
	Nithin Kumar Dabilpuram

Ping.

-----Original Message-----
From: Mohammad Iqbal Ahmad <mahmad@marvell.com> 
Sent: Friday, December 16, 2022 1:10 PM
To: dev@dpdk.org; Thomas Monjalon <thomas@monjalon.net>
Cc: Jerin Jacob Kollanukkaran <jerinj@marvell.com>; Sunil Kumar Kori <skori@marvell.com>; Satha Koteswara Rao Kottidi <skoteshwar@marvell.com>; Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>; Kiran Kumar Kokkilagadda <kirankumark@marvell.com>; Satheesh Paul Antonysamy <psatheesh@marvell.com>; Ashwin Sekhar T K <asekhar@marvell.com>; Anoob Joseph <anoobj@marvell.com>; Akhil Goyal <gakhil@marvell.com>; Harman Kalra <hkalra@marvell.com>; Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>; Mohammad Iqbal Ahmad <mahmad@marvell.com>
Subject: [PATCH v1 1/2] mailmap: add contributor to list

Add contributer to mailmap.

Signed-off-by: Mohammad Iqbal Ahmad <mahmad@marvell.com>
---
 .mailmap | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.mailmap b/.mailmap
index 75884b6fe2..464164765f 100644
--- a/.mailmap
+++ b/.mailmap
@@ -911,6 +911,7 @@ Mitch Williams <mitch.a.williams@intel.com>  Mit Matelske <mit@pt.net>  Mohamad Noor Alim Hussin <mohamad.noor.alim.hussin@intel.com>
 Mohammad Abdul Awal <mohammad.abdul.awal@intel.com>
+Mohammad Iqbal Ahmad <mahmad@marvell.com>
 Mohammed Gamal <mgamal@redhat.com>
 Mohsin Kazmi <mohsin.kazmi14@gmail.com>  Mohsin Mazhar Shaikh <mohsinmazhar_shaikh@trendmicro.com>
--
2.25.1


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

* [PATCH v1] examples/l3fwd: fix for coverity scan
  2022-12-16  7:39 [PATCH v1 1/2] mailmap: add contributor to list Mohammad Iqbal Ahmad
                   ` (2 preceding siblings ...)
  2023-01-09 10:57 ` [PATCH v1 1/2] mailmap: add contributor to list Mohammad Iqbal Ahmad
@ 2023-01-10 14:56 ` Mohammad Iqbal Ahmad
  2023-01-18 11:24   ` Walsh, Conor
  2023-02-01 17:28   ` Thomas Monjalon
  3 siblings, 2 replies; 17+ messages in thread
From: Mohammad Iqbal Ahmad @ 2023-01-10 14:56 UTC (permalink / raw)
  To: dev, Vladimir Medvedkin, Konstantin Ananyev, Conor Walsh
  Cc: jerinj, skori, skoteshwar, pbhagavatula, kirankumark, psatheesh,
	asekhar, anoobj, gakhil, hkalra, ndabilpuram,
	Mohammad Iqbal Ahmad

This patch fixes (Logically dead code) coverity issue.
This patch also fixes (Uninitialized scalar variable) coverity issue.

Coverity issue: 381687
Coverity issue: 381686
Fixes: 6a094e328598 ("examples/l3fwd: implement FIB lookup method")

Signed-off-by: Mohammad Iqbal Ahmad <mahmad@marvell.com>
---
 examples/l3fwd/l3fwd_fib.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/examples/l3fwd/l3fwd_fib.c b/examples/l3fwd/l3fwd_fib.c
index edc0dd69b9..18398492ae 100644
--- a/examples/l3fwd/l3fwd_fib.c
+++ b/examples/l3fwd/l3fwd_fib.c
@@ -359,10 +359,10 @@ fib_event_loop(struct l3fwd_event_resources *evt_rsrc,
 				nh = (uint16_t)hopsv4[ipv4_arr_assem++];
 			else
 				nh = (uint16_t)hopsv6[ipv6_arr_assem++];
-			if (nh != FIB_DEFAULT_HOP)
-				hops[i] = nh != FIB_DEFAULT_HOP ?
-						  nh :
-						  events[i].mbuf->port;
+
+			hops[i] = nh != FIB_DEFAULT_HOP ?
+				  nh :
+				  events[i].mbuf->port;
 			process_packet(events[i].mbuf, &hops[i]);
 			events[i].mbuf->port = hops[i] != BAD_PORT ?
 						       hops[i] :
-- 
2.25.1


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

* RE: [PATCH v1] examples/l3fwd: fix for coverity scan
  2023-01-10 14:56 ` [PATCH v1] examples/l3fwd: fix for coverity scan Mohammad Iqbal Ahmad
@ 2023-01-18 11:24   ` Walsh, Conor
  2023-02-01 17:28   ` Thomas Monjalon
  1 sibling, 0 replies; 17+ messages in thread
From: Walsh, Conor @ 2023-01-18 11:24 UTC (permalink / raw)
  To: Mohammad Iqbal Ahmad, dev, Medvedkin, Vladimir, Konstantin Ananyev
  Cc: jerinj, skori, skoteshwar, pbhagavatula, kirankumark, psatheesh,
	asekhar, anoobj, gakhil, hkalra, ndabilpuram

> This patch fixes (Logically dead code) coverity issue.
> This patch also fixes (Uninitialized scalar variable) coverity issue.
> 
> Coverity issue: 381687
> Coverity issue: 381686
> Fixes: 6a094e328598 ("examples/l3fwd: implement FIB lookup method")
> 
> Signed-off-by: Mohammad Iqbal Ahmad <mahmad@marvell.com>

Acked-by: Conor Walsh <conor.walsh@intel.com>

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

* RE: [PATCH v2 1/2] mailmap: add contributor to list
  2022-12-19  8:34 ` [PATCH v2 1/2] mailmap: add contributor to list Mohammad Iqbal Ahmad
  2022-12-19  8:34   ` [PATCH v2 2/2] app/test-flow-perf: fix division or module by zero Mohammad Iqbal Ahmad
@ 2023-01-23 11:41   ` Mohammad Iqbal Ahmad
  2023-01-23 15:32     ` Thomas Monjalon
  2023-01-24 10:38   ` [PATCH v3 1/1] app/test-flow-perf: fix division or module by zero Mohammad Iqbal Ahmad
  2 siblings, 1 reply; 17+ messages in thread
From: Mohammad Iqbal Ahmad @ 2023-01-23 11:41 UTC (permalink / raw)
  To: Mohammad Iqbal Ahmad, dev, Thomas Monjalon
  Cc: Jerin Jacob Kollanukkaran, Sunil Kumar Kori,
	Satha Koteswara Rao Kottidi, Pavan Nikhilesh Bhagavatula,
	Kiran Kumar Kokkilagadda, Satheesh Paul Antonysamy,
	Ashwin Sekhar T K, Anoob Joseph, Akhil Goyal, Harman Kalra,
	Nithin Kumar Dabilpuram

Hi,

Please provide comment for this patch.

Regards,
Mohammad Iqbal Ahmad

-----Original Message-----
From: Mohammad Iqbal Ahmad <mahmad@marvell.com> 
Sent: Monday, December 19, 2022 2:04 PM
To: dev@dpdk.org; Thomas Monjalon <thomas@monjalon.net>
Cc: Jerin Jacob Kollanukkaran <jerinj@marvell.com>; Sunil Kumar Kori <skori@marvell.com>; Satha Koteswara Rao Kottidi <skoteshwar@marvell.com>; Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>; Kiran Kumar Kokkilagadda <kirankumark@marvell.com>; Satheesh Paul Antonysamy <psatheesh@marvell.com>; Ashwin Sekhar T K <asekhar@marvell.com>; Anoob Joseph <anoobj@marvell.com>; Akhil Goyal <gakhil@marvell.com>; Harman Kalra <hkalra@marvell.com>; Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>; Mohammad Iqbal Ahmad <mahmad@marvell.com>
Subject: [PATCH v2 1/2] mailmap: add contributor to list

Add contributor to mailmap.

Signed-off-by: Mohammad Iqbal Ahmad <mahmad@marvell.com>
---
 .mailmap | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.mailmap b/.mailmap
index 75884b6fe2..464164765f 100644
--- a/.mailmap
+++ b/.mailmap
@@ -911,6 +911,7 @@ Mitch Williams <mitch.a.williams@intel.com>  Mit Matelske <mit@pt.net>  Mohamad Noor Alim Hussin <mohamad.noor.alim.hussin@intel.com>
 Mohammad Abdul Awal <mohammad.abdul.awal@intel.com>
+Mohammad Iqbal Ahmad <mahmad@marvell.com>
 Mohammed Gamal <mgamal@redhat.com>
 Mohsin Kazmi <mohsin.kazmi14@gmail.com>  Mohsin Mazhar Shaikh <mohsinmazhar_shaikh@trendmicro.com>
--
2.25.1


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

* Re: [PATCH v2 1/2] mailmap: add contributor to list
  2023-01-23 11:41   ` [PATCH v2 1/2] mailmap: add contributor to list Mohammad Iqbal Ahmad
@ 2023-01-23 15:32     ` Thomas Monjalon
  0 siblings, 0 replies; 17+ messages in thread
From: Thomas Monjalon @ 2023-01-23 15:32 UTC (permalink / raw)
  To: Mohammad Iqbal Ahmad, Mohammad Iqbal Ahmad
  Cc: dev, Jerin Jacob Kollanukkaran, Sunil Kumar Kori,
	Satha Koteswara Rao Kottidi, Pavan Nikhilesh Bhagavatula,
	Kiran Kumar Kokkilagadda, Satheesh Paul Antonysamy,
	Ashwin Sekhar T K, Anoob Joseph, Akhil Goyal, Harman Kalra,
	Nithin Kumar Dabilpuram

23/01/2023 12:41, Mohammad Iqbal Ahmad:
> Hi,
> 
> Please provide comment for this patch.

There is no comment except it should not be alone in a patch.
The preference is to update .mailmap with the first real changes in the same patch.


> From: Mohammad Iqbal Ahmad <mahmad@marvell.com> 
> Sent: Monday, December 19, 2022 2:04 PM
> To: dev@dpdk.org; Thomas Monjalon <thomas@monjalon.net>
> Cc: Jerin Jacob Kollanukkaran <jerinj@marvell.com>; Sunil Kumar Kori <skori@marvell.com>; Satha Koteswara Rao Kottidi <skoteshwar@marvell.com>; Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>; Kiran Kumar Kokkilagadda <kirankumark@marvell.com>; Satheesh Paul Antonysamy <psatheesh@marvell.com>; Ashwin Sekhar T K <asekhar@marvell.com>; Anoob Joseph <anoobj@marvell.com>; Akhil Goyal <gakhil@marvell.com>; Harman Kalra <hkalra@marvell.com>; Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>; Mohammad Iqbal Ahmad <mahmad@marvell.com>
> Subject: [PATCH v2 1/2] mailmap: add contributor to list
> 
> Add contributor to mailmap.
> 
> Signed-off-by: Mohammad Iqbal Ahmad <mahmad@marvell.com>
> ---
>  .mailmap | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/.mailmap b/.mailmap
> index 75884b6fe2..464164765f 100644
> --- a/.mailmap
> +++ b/.mailmap
> @@ -911,6 +911,7 @@ Mitch Williams <mitch.a.williams@intel.com>  Mit Matelske <mit@pt.net>  Mohamad Noor Alim Hussin <mohamad.noor.alim.hussin@intel.com>
>  Mohammad Abdul Awal <mohammad.abdul.awal@intel.com>
> +Mohammad Iqbal Ahmad <mahmad@marvell.com>
>  Mohammed Gamal <mgamal@redhat.com>
>  Mohsin Kazmi <mohsin.kazmi14@gmail.com>  Mohsin Mazhar Shaikh <mohsinmazhar_shaikh@trendmicro.com>
> --
> 2.25.1
> 
> 






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

* [PATCH v3 1/1] app/test-flow-perf: fix division or module by zero
  2022-12-19  8:34 ` [PATCH v2 1/2] mailmap: add contributor to list Mohammad Iqbal Ahmad
  2022-12-19  8:34   ` [PATCH v2 2/2] app/test-flow-perf: fix division or module by zero Mohammad Iqbal Ahmad
  2023-01-23 11:41   ` [PATCH v2 1/2] mailmap: add contributor to list Mohammad Iqbal Ahmad
@ 2023-01-24 10:38   ` Mohammad Iqbal Ahmad
  2023-02-20 12:46     ` Wisam Monther
  2023-03-12 14:05     ` Thomas Monjalon
  2 siblings, 2 replies; 17+ messages in thread
From: Mohammad Iqbal Ahmad @ 2023-01-24 10:38 UTC (permalink / raw)
  To: dev, Thomas Monjalon, Wisam Jaddo, Xiaoyu Min
  Cc: jerinj, skori, skoteshwar, pbhagavatula, kirankumark, psatheesh,
	asekhar, anoobj, gakhil, hkalra, ndabilpuram,
	Mohammad Iqbal Ahmad

Fix division or module by zero reported by coverity scan.
Updated .mailmap

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

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

diff --git a/.mailmap b/.mailmap
index a153c9ab93..ec9f419f53 100644
--- a/.mailmap
+++ b/.mailmap
@@ -912,6 +912,7 @@ Mitch Williams <mitch.a.williams@intel.com>
 Mit Matelske <mit@pt.net>
 Mohamad Noor Alim Hussin <mohamad.noor.alim.hussin@intel.com>
 Mohammad Abdul Awal <mohammad.abdul.awal@intel.com>
+Mohammad Iqbal Ahmad <mahmad@marvell.com>
 Mohammed Gamal <mgamal@redhat.com>
 Mohsin Kazmi <mohsin.kazmi14@gmail.com>
 Mohsin Mazhar Shaikh <mohsinmazhar_shaikh@trendmicro.com>
diff --git a/app/test-flow-perf/main.c b/app/test-flow-perf/main.c
index 4a9206803a..0a542b0d87 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


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

* Re: [PATCH v1] examples/l3fwd: fix for coverity scan
  2023-01-10 14:56 ` [PATCH v1] examples/l3fwd: fix for coverity scan Mohammad Iqbal Ahmad
  2023-01-18 11:24   ` Walsh, Conor
@ 2023-02-01 17:28   ` Thomas Monjalon
  2023-07-06 18:09     ` Stephen Hemminger
  1 sibling, 1 reply; 17+ messages in thread
From: Thomas Monjalon @ 2023-02-01 17:28 UTC (permalink / raw)
  To: Mohammad Iqbal Ahmad
  Cc: dev, Vladimir Medvedkin, Konstantin Ananyev, Conor Walsh, jerinj,
	skori, skoteshwar, pbhagavatula, kirankumark, psatheesh, asekhar,
	anoobj, gakhil, hkalra, ndabilpuram

10/01/2023 15:56, Mohammad Iqbal Ahmad:
> This patch fixes (Logically dead code) coverity issue.
> This patch also fixes (Uninitialized scalar variable) coverity issue.
> 
> Coverity issue: 381687
> Coverity issue: 381686
> Fixes: 6a094e328598 ("examples/l3fwd: implement FIB lookup method")
> 
> Signed-off-by: Mohammad Iqbal Ahmad <mahmad@marvell.com>

It seems you removed "if (nh != FIB_DEFAULT_HOP)"

Please could you explain what was the issue
inside the commit message.
It could help to find a better title as well.




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

* RE: [PATCH v3 1/1] app/test-flow-perf: fix division or module by zero
  2023-01-24 10:38   ` [PATCH v3 1/1] app/test-flow-perf: fix division or module by zero Mohammad Iqbal Ahmad
@ 2023-02-20 12:46     ` Wisam Monther
  2023-02-20 12:51       ` Thomas Monjalon
  2023-03-12 14:05     ` Thomas Monjalon
  1 sibling, 1 reply; 17+ messages in thread
From: Wisam Monther @ 2023-02-20 12:46 UTC (permalink / raw)
  To: Mohammad Iqbal Ahmad, dev, NBU-Contact-Thomas Monjalon (EXTERNAL),
	Jack Min
  Cc: jerinj, skori, skoteshwar, pbhagavatula, kirankumark, psatheesh,
	asekhar, anoobj, gakhil, hkalra, ndabilpuram

Hi,


> -----Original Message-----
> From: Mohammad Iqbal Ahmad <mahmad@marvell.com>
> Sent: Tuesday, January 24, 2023 12:38 PM
> To: dev@dpdk.org; NBU-Contact-Thomas Monjalon (EXTERNAL)
> <thomas@monjalon.net>; Wisam Monther <wisamm@nvidia.com>; Jack
> Min <jackmin@nvidia.com>
> Cc: jerinj@marvell.com; skori@marvell.com; skoteshwar@marvell.com;
> pbhagavatula@marvell.com; kirankumark@marvell.com;
> psatheesh@marvell.com; asekhar@marvell.com; anoobj@marvell.com;
> gakhil@marvell.com; hkalra@marvell.com; ndabilpuram@marvell.com;
> Mohammad Iqbal Ahmad <mahmad@marvell.com>
> Subject: [PATCH v3 1/1] app/test-flow-perf: fix division or module by zero
> 
> Fix division or module by zero reported by coverity scan.
> Updated .mailmap
> 
> Coverity issue: 373870
> Fixes: bf3688f1e816 ("app/flow-perf: add insertion rate calculation")
> 
> Signed-off-by: Mohammad Iqbal Ahmad <mahmad@marvell.com>
> ---
>  .mailmap                  | 1 +
>  app/test-flow-perf/main.c | 7 ++++++-
>  2 files changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/.mailmap b/.mailmap
> index a153c9ab93..ec9f419f53 100644
> --- a/.mailmap
> +++ b/.mailmap
> @@ -912,6 +912,7 @@ Mitch Williams <mitch.a.williams@intel.com>  Mit
> Matelske <mit@pt.net>  Mohamad Noor Alim Hussin
> <mohamad.noor.alim.hussin@intel.com>
>  Mohammad Abdul Awal <mohammad.abdul.awal@intel.com>
> +Mohammad Iqbal Ahmad <mahmad@marvell.com>

Why you added such change in flow-perf related patch?

>  Mohammed Gamal <mgamal@redhat.com>
>  Mohsin Kazmi <mohsin.kazmi14@gmail.com>  Mohsin Mazhar Shaikh
> <mohsinmazhar_shaikh@trendmicro.com>
> diff --git a/app/test-flow-perf/main.c b/app/test-flow-perf/main.c index
> 4a9206803a..0a542b0d87 100644
> --- a/app/test-flow-perf/main.c
> +++ b/app/test-flow-perf/main.c

BRs,
Wisam Jaddo

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

* Re: [PATCH v3 1/1] app/test-flow-perf: fix division or module by zero
  2023-02-20 12:46     ` Wisam Monther
@ 2023-02-20 12:51       ` Thomas Monjalon
  2023-03-06 10:21         ` Wisam Monther
  0 siblings, 1 reply; 17+ messages in thread
From: Thomas Monjalon @ 2023-02-20 12:51 UTC (permalink / raw)
  To: Mohammad Iqbal Ahmad, dev, Jack Min, Wisam Monther
  Cc: jerinj, skori, skoteshwar, pbhagavatula, kirankumark, psatheesh,
	asekhar, anoobj, gakhil, hkalra, ndabilpuram

20/02/2023 13:46, Wisam Monther:
> > --- a/.mailmap
> > +++ b/.mailmap
> > @@ -912,6 +912,7 @@ Mitch Williams <mitch.a.williams@intel.com>  Mit
> > Matelske <mit@pt.net>  Mohamad Noor Alim Hussin
> > <mohamad.noor.alim.hussin@intel.com>
> >  Mohammad Abdul Awal <mohammad.abdul.awal@intel.com>
> > +Mohammad Iqbal Ahmad <mahmad@marvell.com>
> 
> Why you added such change in flow-perf related patch?

That's because when it is your first patch, your name must be added.
It is a new file. New rule :)




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

* RE: [PATCH v3 1/1] app/test-flow-perf: fix division or module by zero
  2023-02-20 12:51       ` Thomas Monjalon
@ 2023-03-06 10:21         ` Wisam Monther
  0 siblings, 0 replies; 17+ messages in thread
From: Wisam Monther @ 2023-03-06 10:21 UTC (permalink / raw)
  To: NBU-Contact-Thomas Monjalon (EXTERNAL),
	Mohammad Iqbal Ahmad, dev, Jack Min
  Cc: jerinj, skori, skoteshwar, pbhagavatula, kirankumark, psatheesh,
	asekhar, anoobj, gakhil, hkalra, ndabilpuram



> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Monday, February 20, 2023 2:52 PM
> To: Mohammad Iqbal Ahmad <mahmad@marvell.com>; dev@dpdk.org; Jack
> Min <jackmin@nvidia.com>; Wisam Monther <wisamm@nvidia.com>
> Cc: jerinj@marvell.com; skori@marvell.com; skoteshwar@marvell.com;
> pbhagavatula@marvell.com; kirankumark@marvell.com;
> psatheesh@marvell.com; asekhar@marvell.com; anoobj@marvell.com;
> gakhil@marvell.com; hkalra@marvell.com; ndabilpuram@marvell.com
> Subject: Re: [PATCH v3 1/1] app/test-flow-perf: fix division or module by
> zero
> 
> 20/02/2023 13:46, Wisam Monther:
> > > --- a/.mailmap
> > > +++ b/.mailmap
> > > @@ -912,6 +912,7 @@ Mitch Williams <mitch.a.williams@intel.com>  Mit
> > > Matelske <mit@pt.net>  Mohamad Noor Alim Hussin
> > > <mohamad.noor.alim.hussin@intel.com>
> > >  Mohammad Abdul Awal <mohammad.abdul.awal@intel.com>
> > > +Mohammad Iqbal Ahmad <mahmad@marvell.com>
> >
> > Why you added such change in flow-perf related patch?
> 
> That's because when it is your first patch, your name must be added.
> It is a new file. New rule :)

Sorry, first time hearing this 😊

> Subject: [PATCH v3 1/1] app/test-flow-perf: fix division or module by zero
> 
> Fix division or module by zero reported by coverity scan.
> Updated .mailmap
> 
> Coverity issue: 373870
> Fixes: bf3688f1e816 ("app/flow-perf: add insertion rate calculation")
> 
> Signed-off-by: Mohammad Iqbal Ahmad <mahmad@marvell.com>

Acked-by: Wisam Jaddo <wisamm@nvidia.com>

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

* Re: [PATCH v3 1/1] app/test-flow-perf: fix division or module by zero
  2023-01-24 10:38   ` [PATCH v3 1/1] app/test-flow-perf: fix division or module by zero Mohammad Iqbal Ahmad
  2023-02-20 12:46     ` Wisam Monther
@ 2023-03-12 14:05     ` Thomas Monjalon
  1 sibling, 0 replies; 17+ messages in thread
From: Thomas Monjalon @ 2023-03-12 14:05 UTC (permalink / raw)
  To: Mohammad Iqbal Ahmad
  Cc: dev, Wisam Jaddo, Xiaoyu Min, jerinj, skori, skoteshwar,
	pbhagavatula, kirankumark, psatheesh, asekhar, anoobj, gakhil,
	hkalra, ndabilpuram

24/01/2023 11:38, Mohammad Iqbal Ahmad:
> Fix division or module by zero reported by coverity scan.
> Updated .mailmap
> 
> Coverity issue: 373870
> Fixes: bf3688f1e816 ("app/flow-perf: add insertion rate calculation")
> 
> Signed-off-by: Mohammad Iqbal Ahmad <mahmad@marvell.com>
> ---
>  			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");

The option name is rules-batch (with a hyphen). Will fix while merging.

Applied, thanks.




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

* Re: [PATCH v1] examples/l3fwd: fix for coverity scan
  2023-02-01 17:28   ` Thomas Monjalon
@ 2023-07-06 18:09     ` Stephen Hemminger
  2023-07-12 14:39       ` Thomas Monjalon
  0 siblings, 1 reply; 17+ messages in thread
From: Stephen Hemminger @ 2023-07-06 18:09 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: Mohammad Iqbal Ahmad, dev, Vladimir Medvedkin,
	Konstantin Ananyev, Conor Walsh, jerinj, skori, skoteshwar,
	pbhagavatula, kirankumark, psatheesh, asekhar, anoobj, gakhil,
	hkalra, ndabilpuram

On Wed, 01 Feb 2023 18:28:44 +0100
Thomas Monjalon <thomas@monjalon.net> wrote:

> 10/01/2023 15:56, Mohammad Iqbal Ahmad:
> > This patch fixes (Logically dead code) coverity issue.
> > This patch also fixes (Uninitialized scalar variable) coverity issue.
> > 
> > Coverity issue: 381687
> > Coverity issue: 381686
> > Fixes: 6a094e328598 ("examples/l3fwd: implement FIB lookup method")
> > 
> > Signed-off-by: Mohammad Iqbal Ahmad <mahmad@marvell.com>  
> 
> It seems you removed "if (nh != FIB_DEFAULT_HOP)"
> 
> Please could you explain what was the issue
> inside the commit message.
> It could help to find a better title as well.

Coverity is spotting that the same condition is evaluated first
in the if() then in the conditional expression. So yes it is a bug.

Would prefer the title of
   examples/l3fwd: fix duplicate expression for default nexthop

Don't think the default nexthop was ever tested. If it was then
hops[i] would have never been updated. Probably would just get previous
value so it worked.

Acked-by: Stephen Hemminger <stephen@networkplumber.org>

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

* Re: [PATCH v1] examples/l3fwd: fix for coverity scan
  2023-07-06 18:09     ` Stephen Hemminger
@ 2023-07-12 14:39       ` Thomas Monjalon
  0 siblings, 0 replies; 17+ messages in thread
From: Thomas Monjalon @ 2023-07-12 14:39 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: Mohammad Iqbal Ahmad, dev, Vladimir Medvedkin,
	Konstantin Ananyev, Conor Walsh, jerinj, skori, skoteshwar,
	pbhagavatula, kirankumark, psatheesh, asekhar, anoobj, gakhil,
	hkalra, ndabilpuram

06/07/2023 20:09, Stephen Hemminger:
> On Wed, 01 Feb 2023 18:28:44 +0100
> Thomas Monjalon <thomas@monjalon.net> wrote:
> 
> > 10/01/2023 15:56, Mohammad Iqbal Ahmad:
> > > This patch fixes (Logically dead code) coverity issue.
> > > This patch also fixes (Uninitialized scalar variable) coverity issue.
> > > 
> > > Coverity issue: 381687
> > > Coverity issue: 381686
> > > Fixes: 6a094e328598 ("examples/l3fwd: implement FIB lookup method")
> > > 
> > > Signed-off-by: Mohammad Iqbal Ahmad <mahmad@marvell.com>  
> > 
> > It seems you removed "if (nh != FIB_DEFAULT_HOP)"
> > 
> > Please could you explain what was the issue
> > inside the commit message.
> > It could help to find a better title as well.
> 
> Coverity is spotting that the same condition is evaluated first
> in the if() then in the conditional expression. So yes it is a bug.
> 
> Would prefer the title of
>    examples/l3fwd: fix duplicate expression for default nexthop
> 
> Don't think the default nexthop was ever tested. If it was then
> hops[i] would have never been updated. Probably would just get previous
> value so it worked.
> 
> Acked-by: Stephen Hemminger <stephen@networkplumber.org>

Applied, thanks.




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

end of thread, other threads:[~2023-07-12 14:39 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-16  7:39 [PATCH v1 1/2] mailmap: add contributor to list Mohammad Iqbal Ahmad
2022-12-16  7:39 ` [PATCH v1 2/2] app/test-flow-perf: fix division or module by zero Mohammad Iqbal Ahmad
2022-12-19  8:34 ` [PATCH v2 1/2] mailmap: add contributor to list Mohammad Iqbal Ahmad
2022-12-19  8:34   ` [PATCH v2 2/2] app/test-flow-perf: fix division or module by zero Mohammad Iqbal Ahmad
2023-01-23 11:41   ` [PATCH v2 1/2] mailmap: add contributor to list Mohammad Iqbal Ahmad
2023-01-23 15:32     ` Thomas Monjalon
2023-01-24 10:38   ` [PATCH v3 1/1] app/test-flow-perf: fix division or module by zero Mohammad Iqbal Ahmad
2023-02-20 12:46     ` Wisam Monther
2023-02-20 12:51       ` Thomas Monjalon
2023-03-06 10:21         ` Wisam Monther
2023-03-12 14:05     ` Thomas Monjalon
2023-01-09 10:57 ` [PATCH v1 1/2] mailmap: add contributor to list Mohammad Iqbal Ahmad
2023-01-10 14:56 ` [PATCH v1] examples/l3fwd: fix for coverity scan Mohammad Iqbal Ahmad
2023-01-18 11:24   ` Walsh, Conor
2023-02-01 17:28   ` Thomas Monjalon
2023-07-06 18:09     ` Stephen Hemminger
2023-07-12 14:39       ` Thomas Monjalon

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