From: "Ji, Kai" <kai.ji@intel.com>
To: "Power, Ciara" <ciara.power@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "Matz, Olivier" <olivier.matz@6wind.com>,
Akhil Goyal <gakhil@marvell.com>,
Fan Zhang <fanzhang.oss@gmail.com>
Subject: Re: [PATCH] cryptodev: fix device socket ID type
Date: Tue, 4 Jul 2023 22:30:41 +0000 [thread overview]
Message-ID: <SN6PR11MB34082127B1ABA0DD95C2E5CC812EA@SN6PR11MB3408.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20230629132155.75075-1-ciara.power@intel.com>
[-- Attachment #1: Type: text/plain, Size: 1580 bytes --]
Acked-by: Kai Ji <kai.ji@intel.com<mailto:kai.ji@intel.com>>
________________________________
From: Power, Ciara <ciara.power@intel.com>
Sent: 29 June 2023 14:21
To: dev@dpdk.org <dev@dpdk.org>
Cc: Ji, Kai <kai.ji@intel.com>; Power, Ciara <ciara.power@intel.com>; Matz, Olivier <olivier.matz@6wind.com>; Akhil Goyal <gakhil@marvell.com>; Fan Zhang <fanzhang.oss@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@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
[-- Attachment #2: Type: text/html, Size: 2864 bytes --]
next prev parent reply other threads:[~2023-07-04 22:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-29 13:21 Ciara Power
2023-07-04 22:30 ` Ji, Kai [this message]
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=SN6PR11MB34082127B1ABA0DD95C2E5CC812EA@SN6PR11MB3408.namprd11.prod.outlook.com \
--to=kai.ji@intel.com \
--cc=ciara.power@intel.com \
--cc=dev@dpdk.org \
--cc=fanzhang.oss@gmail.com \
--cc=gakhil@marvell.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).