All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] test/hash: fix coverity warning
@ 2022-11-03 18:12 Vladimir Medvedkin
  2022-11-09  8:55 ` Ruifeng Wang
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Vladimir Medvedkin @ 2022-11-03 18:12 UTC (permalink / raw)
  To: dev; +Cc: dharmik.thakkar, stable, Yipeng Wang, Sameh Gobriel, Bruce Richardson

Remove unnecessary variable assignment

Coverity issue: 336800
Fixes: 3f9aab961ed3 ("test/hash: check lock-free extendable bucket")
Cc: dharmik.thakkar@arm.com
Cc: stable@dpdk.org

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
 app/test/test_hash_readwrite_lf_perf.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/app/test/test_hash_readwrite_lf_perf.c b/app/test/test_hash_readwrite_lf_perf.c
index 32f9ec9250..cf86046a2f 100644
--- a/app/test/test_hash_readwrite_lf_perf.c
+++ b/app/test/test_hash_readwrite_lf_perf.c
@@ -1102,7 +1102,6 @@ test_hash_multi_add_lookup(struct rwc_perf *rwc_perf_results, int rwc_lf,
 					rte_eal_remote_launch(test_rwc_reader,
 						(void *)(uintptr_t)read_type,
 						enabled_core_ids[i]);
-				write_type = WRITE_KEY_SHIFT;
 				pos_core = 0;
 
 				/* Launch writers */
-- 
2.25.1


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

* RE: [PATCH 1/2] test/hash: fix coverity warning
  2022-11-03 18:12 [PATCH 1/2] test/hash: fix coverity warning Vladimir Medvedkin
@ 2022-11-09  8:55 ` Ruifeng Wang
  2022-11-10 15:13 ` [PATCH v3 " Vladimir Medvedkin
  2022-11-10 15:13 ` [PATCH v3 2/2] " Vladimir Medvedkin
  2 siblings, 0 replies; 6+ messages in thread
From: Ruifeng Wang @ 2022-11-09  8:55 UTC (permalink / raw)
  To: Vladimir Medvedkin, dev
  Cc: Dharmik Thakkar, stable, Yipeng Wang, Sameh Gobriel,
	Bruce Richardson, nd

> -----Original Message-----
> From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
> Sent: Friday, November 4, 2022 2:13 AM
> To: dev@dpdk.org
> Cc: Dharmik Thakkar <Dharmik.Thakkar@arm.com>; stable@dpdk.org; Yipeng Wang
> <yipeng1.wang@intel.com>; Sameh Gobriel <sameh.gobriel@intel.com>; Bruce Richardson
> <bruce.richardson@intel.com>
> Subject: [PATCH 1/2] test/hash: fix coverity warning
> 
> Remove unnecessary variable assignment
> 
> Coverity issue: 336800
> Fixes: 3f9aab961ed3 ("test/hash: check lock-free extendable bucket")
> Cc: dharmik.thakkar@arm.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
> ---
>  app/test/test_hash_readwrite_lf_perf.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/app/test/test_hash_readwrite_lf_perf.c
> b/app/test/test_hash_readwrite_lf_perf.c
> index 32f9ec9250..cf86046a2f 100644
> --- a/app/test/test_hash_readwrite_lf_perf.c
> +++ b/app/test/test_hash_readwrite_lf_perf.c
> @@ -1102,7 +1102,6 @@ test_hash_multi_add_lookup(struct rwc_perf *rwc_perf_results, int
> rwc_lf,
>  					rte_eal_remote_launch(test_rwc_reader,
>  						(void *)(uintptr_t)read_type,
>  						enabled_core_ids[i]);
> -				write_type = WRITE_KEY_SHIFT;
>  				pos_core = 0;
> 
>  				/* Launch writers */
> --
> 2.25.1
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>


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

* [PATCH v3 1/2] test/hash: fix coverity warning
  2022-11-03 18:12 [PATCH 1/2] test/hash: fix coverity warning Vladimir Medvedkin
  2022-11-09  8:55 ` Ruifeng Wang
@ 2022-11-10 15:13 ` Vladimir Medvedkin
  2022-11-14 10:08   ` David Marchand
  2022-11-10 15:13 ` [PATCH v3 2/2] " Vladimir Medvedkin
  2 siblings, 1 reply; 6+ messages in thread
From: Vladimir Medvedkin @ 2022-11-10 15:13 UTC (permalink / raw)
  To: dev
  Cc: stephen, dharmik.thakkar, stable, Ruifeng Wang, Yipeng Wang,
	Sameh Gobriel, Bruce Richardson

Remove unnecessary variable assignment

Coverity issue: 336800
Fixes: 3f9aab961ed3 ("test/hash: check lock-free extendable bucket")
Cc: dharmik.thakkar@arm.com
Cc: stable@dpdk.org

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 app/test/test_hash_readwrite_lf_perf.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/app/test/test_hash_readwrite_lf_perf.c b/app/test/test_hash_readwrite_lf_perf.c
index 32f9ec9250..cf86046a2f 100644
--- a/app/test/test_hash_readwrite_lf_perf.c
+++ b/app/test/test_hash_readwrite_lf_perf.c
@@ -1102,7 +1102,6 @@ test_hash_multi_add_lookup(struct rwc_perf *rwc_perf_results, int rwc_lf,
 					rte_eal_remote_launch(test_rwc_reader,
 						(void *)(uintptr_t)read_type,
 						enabled_core_ids[i]);
-				write_type = WRITE_KEY_SHIFT;
 				pos_core = 0;
 
 				/* Launch writers */
-- 
2.25.1


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

* [PATCH v3 2/2] test/hash: fix coverity warning
  2022-11-03 18:12 [PATCH 1/2] test/hash: fix coverity warning Vladimir Medvedkin
  2022-11-09  8:55 ` Ruifeng Wang
  2022-11-10 15:13 ` [PATCH v3 " Vladimir Medvedkin
@ 2022-11-10 15:13 ` Vladimir Medvedkin
  2022-11-10 15:21   ` Bruce Richardson
  2 siblings, 1 reply; 6+ messages in thread
From: Vladimir Medvedkin @ 2022-11-10 15:13 UTC (permalink / raw)
  To: dev; +Cc: stephen, stable, Yipeng Wang, Sameh Gobriel, Bruce Richardson

Check return value after bulk lookup

Coverity issue: 357746
Fixes: 14b8ab576235 ("hash: add bulk lookup with signatures array")
Cc: stable@dpdk.org

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
 app/test/test_hash_perf.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/app/test/test_hash_perf.c b/app/test/test_hash_perf.c
index 5d36c0f454..1a90acd1ba 100644
--- a/app/test/test_hash_perf.c
+++ b/app/test/test_hash_perf.c
@@ -475,6 +475,10 @@ timed_lookups_multi(unsigned int with_hash, unsigned int with_data,
 					(const void **)keys_burst,
 					&signatures[j * BURST_SIZE],
 					BURST_SIZE, positions_burst);
+				if (ret != 0) {
+					printf("rte_hash_lookup_with_hash_bulk failed with %d\n", ret);
+					return -1;
+				}
 				for (k = 0; k < BURST_SIZE; k++) {
 					if (positions_burst[k] !=
 							positions[j *
@@ -487,10 +491,14 @@ timed_lookups_multi(unsigned int with_hash, unsigned int with_data,
 					}
 				}
 			} else {
-				rte_hash_lookup_bulk(h[table_index],
+				ret = rte_hash_lookup_bulk(h[table_index],
 						(const void **) keys_burst,
 						BURST_SIZE,
 						positions_burst);
+				if (ret != 0) {
+					printf("rte_hash_lookup_bulk failed with %d\n", ret);
+					return -1;
+				}
 				for (k = 0; k < BURST_SIZE; k++) {
 					if (positions_burst[k] != positions[j * BURST_SIZE + k]) {
 						printf("Key looked up in %d, should be in %d\n",
-- 
2.25.1


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

* Re: [PATCH v3 2/2] test/hash: fix coverity warning
  2022-11-10 15:13 ` [PATCH v3 2/2] " Vladimir Medvedkin
@ 2022-11-10 15:21   ` Bruce Richardson
  0 siblings, 0 replies; 6+ messages in thread
From: Bruce Richardson @ 2022-11-10 15:21 UTC (permalink / raw)
  To: Vladimir Medvedkin; +Cc: dev, stephen, stable, Yipeng Wang, Sameh Gobriel

On Thu, Nov 10, 2022 at 03:13:34PM +0000, Vladimir Medvedkin wrote:
> Check return value after bulk lookup
> 
> Coverity issue: 357746
> Fixes: 14b8ab576235 ("hash: add bulk lookup with signatures array")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
> ---

Acked-by: Bruce Richardson <bruce.richardson@intel.com>

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

* Re: [PATCH v3 1/2] test/hash: fix coverity warning
  2022-11-10 15:13 ` [PATCH v3 " Vladimir Medvedkin
@ 2022-11-14 10:08   ` David Marchand
  0 siblings, 0 replies; 6+ messages in thread
From: David Marchand @ 2022-11-14 10:08 UTC (permalink / raw)
  To: Vladimir Medvedkin
  Cc: dev, stephen, dharmik.thakkar, stable, Ruifeng Wang, Yipeng Wang,
	Sameh Gobriel, Bruce Richardson

On Thu, Nov 10, 2022 at 4:14 PM Vladimir Medvedkin
<vladimir.medvedkin@intel.com> wrote:
>
> Remove unnecessary variable assignment
>
> Coverity issue: 336800
> Fixes: 3f9aab961ed3 ("test/hash: check lock-free extendable bucket")
> Cc: stable@dpdk.org
>
> Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
> Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>

Series applied, thanks.

-- 
David Marchand


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

end of thread, other threads:[~2022-11-14 10:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-03 18:12 [PATCH 1/2] test/hash: fix coverity warning Vladimir Medvedkin
2022-11-09  8:55 ` Ruifeng Wang
2022-11-10 15:13 ` [PATCH v3 " Vladimir Medvedkin
2022-11-14 10:08   ` David Marchand
2022-11-10 15:13 ` [PATCH v3 2/2] " Vladimir Medvedkin
2022-11-10 15:21   ` Bruce Richardson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.