app/compress-perf: fix socket ID type during init

Message ID 20220302083927.9176-1-rzidane@nvidia.com (mailing list archive)
State Accepted, archived
Delegated to: akhil goyal
Headers
Series app/compress-perf: fix socket ID type during init |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/github-robot: build success github build: passed
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-abi-testing success Testing PASS

Commit Message

Raja Zidane March 2, 2022, 8:39 a.m. UTC
  Socket ID is obtained by function rte_compressdev_socket_id, which
returns it as integer, but is interpreted as unsigned byte integer.

change type from uint8_t to int.

Fixes: ed7dd94f7f66 ("compressdev: add basic device management")
Cc: fiona.trahe@intel.com
Cc: stable@dpdk.org

Signed-off-by: Raja Zidane <rzidane@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 app/test-compress-perf/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Akhil Goyal March 4, 2022, 9:51 a.m. UTC | #1
> Socket ID is obtained by function rte_compressdev_socket_id, which
> returns it as integer, but is interpreted as unsigned byte integer.
> 
> change type from uint8_t to int.
> 
> Fixes: ed7dd94f7f66 ("compressdev: add basic device management")
> Cc: fiona.trahe@intel.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Raja Zidane <rzidane@nvidia.com>
> Acked-by: Matan Azrad <matan@nvidia.com>
Applied to dpdk-next-crypto
  

Patch

diff --git a/app/test-compress-perf/main.c b/app/test-compress-perf/main.c
index 6ff6a2f04a..3402b65c63 100644
--- a/app/test-compress-perf/main.c
+++ b/app/test-compress-perf/main.c
@@ -168,7 +168,7 @@  comp_perf_initialize_compressdev(struct comp_test_data *test_data,
 		cdev_id = enabled_cdevs[i];
 
 		struct rte_compressdev_info cdev_info;
-		uint8_t socket_id = rte_compressdev_socket_id(cdev_id);
+		int socket_id = rte_compressdev_socket_id(cdev_id);
 
 		rte_compressdev_info_get(cdev_id, &cdev_info);
 		if (cdev_info.max_nb_queue_pairs &&