<div dir="ltr">I think the endianness conversions are necessary, otherwise, the hash function return value will be host endianness dependent.<div><br></div><div>For example, what should rte_hash_xor32(/*data*/ &{0x00, 0x01, 0x02, 0x03}, /*data_len*/ 4, /*init_val*/ 0x0) return? With the current implementation, it returns 0x00010203 consistently. If we remove the endianness conversions, it will return 0x00010203 on big-endian hosts and 0x03020100 on little-endian hosts. Please correct me but I don't think that's the expected behavior.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Feb 20, 2023 at 10:19 AM Dumitrescu, Cristian <<a href="mailto:cristian.dumitrescu@intel.com">cristian.dumitrescu@intel.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg-225043470737410829">





<div lang="EN-IE" style="overflow-wrap: break-word;">
<div class="m_-225043470737410829WordSection1">
<div style="border-top:none;border-right:none;border-bottom:none;border-left:1.5pt solid blue;padding:0cm 0cm 0cm 4pt">
<div>
<div>
<blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0cm 0cm 0cm 6pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal">Hi Bili,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Would it be possible to also remove the endianness conversion from this hash function? What would be the impact if the rte_cpu_to_be() functions are removed?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thanks,<u></u><u></u></p>
<p class="MsoNormal">Cristian<u></u><u></u></p>
</blockquote>
</div>
</div>
</div>
</div>
</div>

</div></blockquote></div>