[PATCH v2 1/2] app/test-crypto-perf: fix invalid memcmp results

Power, Ciara ciara.power at intel.com
Fri Jan 12 17:21:23 CET 2024



> -----Original Message-----
> From: Suanming Mou <suanmingm at nvidia.com>
> Sent: Friday, January 5, 2024 12:03 AM
> To: anoobj at marvell.com; Power, Ciara <ciara.power at intel.com>
> Cc: dev at dpdk.org
> Subject: [PATCH v2 1/2] app/test-crypto-perf: fix invalid memcmp results
> 
> The function memcmp() returns an integer less than, equal to, or greater than
> zero. In current code, if the first memcmp() returns less than zero and the
> second memcmp() returns greater than zero, the sum of results may still be 0
> and indicates verify succussed.
> 
> This commit converts the return value to be zero or greater than zero. That will
> make sure the sum of results be correct.
> 
> Fixes: df52cb3b6e13 ("app/crypto-perf: move verify as single test type")
> 
> Signed-off-by: Suanming Mou <suanmingm at nvidia.com>
> Acked-by: Anoob Joseph <anoobj at marvell.com>
> ---
>  app/test-crypto-perf/cperf_test_verify.c | 6 +++---

Acked-by: Ciara Power <ciara.power at intel.com>


More information about the dev mailing list