<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta name=Generator content="Microsoft Word 12 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Sitka Text";
        panose-1:2 0 5 5 0 0 0 2 0 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><a name="_MailEndCompose"><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>In my opinion, changing the type to the conventional type used for socket_id seems like a much better solution than just changing the signedness, as proposed in  another RFC [1]. (If we used more specialized types, like socket_id_t, we wouldn’t even have this discussion. It is the DPDK convention to avoid specialized types, and I’m not against this convention; I’m only mentioning it to support changing the type here to int.)<o:p></o:p></span></a></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>And SOCKET_ID_ANY (-1) being used for multiple purposes, as discussed in the RFC, is another issue, to be discussed separately.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>[1]: </span><a href="https://patches.dpdk.org/project/dpdk/patch/20230117101646.2521875-1-didier.pallard@6wind.com/"><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>https://patches.dpdk.org/project/dpdk/patch/20230117101646.2521875-1-didier.pallard@6wind.com/</span></a><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Acked-by: Morten Brørup <mb@smartsharesystems.com><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Sitka Text";color:black'>Acked-by: Kai Ji <<a href="mailto:kai.ji@intel.com">kai.ji@intel.com</a>><o:p></o:p></span></p></div><div class=MsoNormal align=center style='text-align:center'><hr size=3 width="98%" align=center></div><div id=divRplyFwdMsg><p class=MsoNormal><b><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'>From:</span></b><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'> Power, Ciara <ciara.power@intel.com><br><b>Sent:</b> 29 June 2023 14:21<br><b>To:</b> dev@dpdk.org <dev@dpdk.org><br><b>Cc:</b> 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><br><b>Subject:</b> [PATCH] cryptodev: fix device socket ID type</span> <o:p></o:p></p><div><p class=MsoNormal> <o:p></o:p></p></div></div><div><div><p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-size:11.0pt'>The socket ID field for a cryptodev device data was unsigned int.<br>Due to recent changes to the default device socket ID,<br>this caused an issue when the socket ID was unknown and set to -1.<br>The device socket ID wrapped around to 255,<br>and caused errors when allocating memory.<br><br>Changing this field type to int fixes the issue, as it now takes the<br>correct -1 value.<br><br>Fixes: 7dcd73e37965 ("drivers/bus: set device NUMA node to unknown by default")<br>Cc: olivier.matz@6wind.com<br><br>Signed-off-by: Ciara Power <ciara.power@intel.com><br>---<br> lib/cryptodev/cryptodev_pmd.h | 2 +-<br> 1 file changed, 1 insertion(+), 1 deletion(-)<br><br>diff --git a/lib/cryptodev/cryptodev_pmd.h b/lib/cryptodev/cryptodev_pmd.h<br>index 8710ed7558..4c98cedca6 100644<br>--- a/lib/cryptodev/cryptodev_pmd.h<br>+++ b/lib/cryptodev/cryptodev_pmd.h<br>@@ -65,7 +65,7 @@ struct rte_cryptodev_data {<br>         /** Device ID for this instance */<br>         uint8_t dev_id;<br>         /** Socket ID where memory is allocated */<br>-       uint8_t socket_id;<br>+       int socket_id;<br>         /** Unique identifier name */<br>         char name[RTE_CRYPTODEV_NAME_MAX_LEN];<br> <br>-- <br>2.25.1<o:p></o:p></span></p></div></div></div></div></body></html>