DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ciara Power <ciara.power@intel.com>
To: dev@dpdk.org
Cc: kai.ji@intel.com, Ciara Power <ciara.power@intel.com>,
	olivier.matz@6wind.com, Akhil Goyal <gakhil@marvell.com>,
	Fan Zhang <fanzhang.oss@gmail.com>
Subject: [PATCH] cryptodev: fix device socket ID type
Date: Thu, 29 Jun 2023 13:21:55 +0000	[thread overview]
Message-ID: <20230629132155.75075-1-ciara.power@intel.com> (raw)

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@6wind.com

Signed-off-by: Ciara Power <ciara.power@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


             reply	other threads:[~2023-06-29 13:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-29 13:21 Ciara Power [this message]
2023-07-04 22:30 ` Ji, Kai
2023-07-05  9:44   ` Morten Brørup
2023-07-05 10:36 ` [PATCH v2] " Ciara Power
2023-07-05 11:29   ` Konstantin Ananyev
2023-07-05 18:23     ` [EXT] " Akhil Goyal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230629132155.75075-1-ciara.power@intel.com \
    --to=ciara.power@intel.com \
    --cc=dev@dpdk.org \
    --cc=fanzhang.oss@gmail.com \
    --cc=gakhil@marvell.com \
    --cc=kai.ji@intel.com \
    --cc=olivier.matz@6wind.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).