[v3,1/5] test/ring: fix the memory dump size

Message ID 20201023044343.13462-2-honnappa.nagarahalli@arm.com
State Superseded
Headers show
Series
  • lib/ring: add zero copy APIs
Related show

Commit Message

Honnappa Nagarahalli Oct. 23, 2020, 4:43 a.m.
Pass the correct number of bytes to dump the memory.

Fixes: bf28df24e915 ("test/ring: add contention stress test"
Cc: konstantin.ananyev@intel.com
Cc: stable@dpdk.org

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>

Reviewed-by: Dharmik Thakkar <dharmik.thakkar@arm.com>

---
 app/test/test_ring_stress_impl.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.17.1

Comments

Ananyev, Konstantin Oct. 23, 2020, 1:24 p.m. | #1
> Pass the correct number of bytes to dump the memory.

> 

> Fixes: bf28df24e915 ("test/ring: add contention stress test"

> Cc: konstantin.ananyev@intel.com

> Cc: stable@dpdk.org

> 

> Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>

> Reviewed-by: Dharmik Thakkar <dharmik.thakkar@arm.com>

> ---

>  app/test/test_ring_stress_impl.h | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

> 

> diff --git a/app/test/test_ring_stress_impl.h b/app/test/test_ring_stress_impl.h

> index 3b9a480eb..f9ca63b90 100644

> --- a/app/test/test_ring_stress_impl.h

> +++ b/app/test/test_ring_stress_impl.h

> @@ -159,7 +159,7 @@ check_updt_elem(struct ring_elem *elm[], uint32_t num,

>  				"offending object: %p\n",

>  				__func__, rte_lcore_id(), num, i, elm[i]);

>  			rte_memdump(stdout, "expected", check, sizeof(*check));

> -			rte_memdump(stdout, "result", elm[i], sizeof(elm[i]));

> +			rte_memdump(stdout, "result", elm[i], sizeof(*elm[i]));

>  			rte_spinlock_unlock(&dump_lock);

>  			return -EINVAL;

>  		}

> --


Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>


> 2.17.1

Patch

diff --git a/app/test/test_ring_stress_impl.h b/app/test/test_ring_stress_impl.h
index 3b9a480eb..f9ca63b90 100644
--- a/app/test/test_ring_stress_impl.h
+++ b/app/test/test_ring_stress_impl.h
@@ -159,7 +159,7 @@  check_updt_elem(struct ring_elem *elm[], uint32_t num,
 				"offending object: %p\n",
 				__func__, rte_lcore_id(), num, i, elm[i]);
 			rte_memdump(stdout, "expected", check, sizeof(*check));
-			rte_memdump(stdout, "result", elm[i], sizeof(elm[i]));
+			rte_memdump(stdout, "result", elm[i], sizeof(*elm[i]));
 			rte_spinlock_unlock(&dump_lock);
 			return -EINVAL;
 		}