[dpdk-dev] [PATCH v2] app/test-crypto-perf: fix incorrect size of expression

Jacek Piasecki jacekx.piasecki at intel.com
Fri Feb 10 14:26:15 CET 2017


Fix problem of passing a pointer to sizeof() function. Now the size
of enabled_cdevs structure is passed by RTE_CRYPTO_MAX_DEVS.

Coverity issue: 141068
Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application")

Signed-off-by: Jacek Piasecki <jacekx.piasecki at intel.com>
---
v2:
* RTE_CRYPTO_MAX_DEVS is passed to rte_cryptodev_devices_get() directly

 app/test-crypto-perf/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c
index 634ea5f..ac4f484 100644
--- a/app/test-crypto-perf/main.c
+++ b/app/test-crypto-perf/main.c
@@ -45,7 +45,7 @@
 	int ret;
 
 	enabled_cdev_count = rte_cryptodev_devices_get(opts->device_type,
-			enabled_cdevs, RTE_DIM(enabled_cdevs));
+			enabled_cdevs, RTE_CRYPTO_MAX_DEVS);
 	if (enabled_cdev_count == 0) {
 		printf("No crypto devices type %s available\n",
 				opts->device_type);
-- 
1.9.1



More information about the dev mailing list