patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH] compressdev: fix size of socket ID in device data struct
@ 2022-03-01 14:15 Raja Zidane
  2022-03-04 10:02 ` [EXT] " Akhil Goyal
  0 siblings, 1 reply; 2+ messages in thread
From: Raja Zidane @ 2022-03-01 14:15 UTC (permalink / raw)
  To: dev; +Cc: matan, fiona.trahe, stable

Socket ID is used and interpreted as integer, one of the possible
values for socket id is -1 (SOCKET_ID_ANY).
here socket_id is defined as unsigned 8 bit integer, so when putting
-1, it is interpreted as 255, which causes allocation errors when
trying to allocate from socket_id (255).

change socket_id from unsigned 8 bit integer to integer.

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>
---
 lib/compressdev/rte_compressdev_internal.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/compressdev/rte_compressdev_internal.h b/lib/compressdev/rte_compressdev_internal.h
index 888c8f5c5c..25d8afbfb9 100644
--- a/lib/compressdev/rte_compressdev_internal.h
+++ b/lib/compressdev/rte_compressdev_internal.h
@@ -98,7 +98,7 @@ struct rte_compressdev {
 struct rte_compressdev_data {
 	uint8_t dev_id;
 	/**< Compress device identifier */
-	uint8_t socket_id;
+	int socket_id;
 	/**< Socket identifier where memory is allocated */
 	char name[RTE_COMPRESSDEV_NAME_MAX_LEN];
 	/**< Unique identifier name */
-- 
2.21.0


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

* RE: [EXT] [PATCH] compressdev: fix size of socket ID in device data struct
  2022-03-01 14:15 [PATCH] compressdev: fix size of socket ID in device data struct Raja Zidane
@ 2022-03-04 10:02 ` Akhil Goyal
  0 siblings, 0 replies; 2+ messages in thread
From: Akhil Goyal @ 2022-03-04 10:02 UTC (permalink / raw)
  To: Raja Zidane, dev; +Cc: matan, fiona.trahe, stable

> Socket ID is used and interpreted as integer, one of the possible
> values for socket id is -1 (SOCKET_ID_ANY).
> here socket_id is defined as unsigned 8 bit integer, so when putting
> -1, it is interpreted as 255, which causes allocation errors when
> trying to allocate from socket_id (255).
> 
> change socket_id from unsigned 8 bit integer to integer.
> 
> 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

Thanks.

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

end of thread, other threads:[~2022-03-04 10:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-01 14:15 [PATCH] compressdev: fix size of socket ID in device data struct Raja Zidane
2022-03-04 10:02 ` [EXT] " Akhil Goyal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).