[PATCH] cryptodev: fix device socket ID type
Ji, Kai
kai.ji at intel.com
Wed Jul 5 00:30:41 CEST 2023
Acked-by: Kai Ji <kai.ji at intel.com<mailto:kai.ji at intel.com>>
________________________________
From: Power, Ciara <ciara.power at intel.com>
Sent: 29 June 2023 14:21
To: dev at dpdk.org <dev at dpdk.org>
Cc: Ji, Kai <kai.ji at intel.com>; Power, Ciara <ciara.power at intel.com>; Matz, Olivier <olivier.matz at 6wind.com>; Akhil Goyal <gakhil at marvell.com>; Fan Zhang <fanzhang.oss at gmail.com>
Subject: [PATCH] cryptodev: fix device socket ID type
The socket ID field for a cryptodev device data was unsigned int.
Due to recent changes to the default device socket ID,
this caused an issue when the socket ID was unknown and set to -1.
The device socket ID wrapped around to 255,
and caused errors when allocating memory.
Changing this field type to int fixes the issue, as it now takes the
correct -1 value.
Fixes: 7dcd73e37965 ("drivers/bus: set device NUMA node to unknown by default")
Cc: olivier.matz at 6wind.com
Signed-off-by: Ciara Power <ciara.power at intel.com>
---
lib/cryptodev/cryptodev_pmd.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/cryptodev/cryptodev_pmd.h b/lib/cryptodev/cryptodev_pmd.h
index 8710ed7558..4c98cedca6 100644
--- a/lib/cryptodev/cryptodev_pmd.h
+++ b/lib/cryptodev/cryptodev_pmd.h
@@ -65,7 +65,7 @@ struct rte_cryptodev_data {
/** Device ID for this instance */
uint8_t dev_id;
/** Socket ID where memory is allocated */
- uint8_t socket_id;
+ int socket_id;
/** Unique identifier name */
char name[RTE_CRYPTODEV_NAME_MAX_LEN];
--
2.25.1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/dev/attachments/20230704/6370cd02/attachment.htm>
More information about the dev
mailing list