Skip to content

Commit

Permalink
cryptodev: fix device socket ID type
Browse files Browse the repository at this point in the history
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: 7dcd73e ("drivers/bus: set device NUMA node to unknown by default")
Cc: olivier.matz@6wind.com

Signed-off-by: Ciara Power <ciara.power@intel.com>
Signed-off-by: 0-day Robot <robot@bytheb.org>
  • Loading branch information
ciarapow authored and ovsrobot committed Jun 29, 2023
1 parent 93a4b3b commit e845ecd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cryptodev/cryptodev_pmd.h
Original file line number Diff line number Diff line change
Expand Up @@ -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];

Expand Down

0 comments on commit e845ecd

Please sign in to comment.