<div dir="ltr">The naming is following the existing CRC32 hash: <a href="https://elixir.bootlin.com/dpdk/v22.11.1/source/lib/hash/rte_hash_crc.h#L168">https://elixir.bootlin.com/dpdk/v22.11.1/source/lib/hash/rte_hash_crc.h#L168</a>. I believe all existing hash functions in DPDK are 32 bits, so "32" didn't appear in other hash function names. If we add "32" here, we probably should also rename rte_hash_crc(). I'm fine with either option.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Feb 20, 2023 at 5:49 AM Thomas Monjalon <<a href="mailto:thomas@monjalon.net">thomas@monjalon.net</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">15/02/2023 12:06, Bili Dong:<br>
> An XOR32 hash is needed in the Software Switch (SWX) Pipeline for its<br>
> use case in P4. We implement it in this patch so it could be easily<br>
> registered in the pipeline later.<br>
> <br>
> Signed-off-by: Bili Dong <<a href="mailto:qobilidop@gmail.com" target="_blank">qobilidop@gmail.com</a>><br>
> ---<br>
> +/**<br>
> + * Calculate XOR32 hash on user-supplied byte array.<br>
> + *<br>
> + * @param data<br>
> + *   Data to perform hash on.<br>
> + * @param data_len<br>
> + *   How many bytes to use to calculate hash value.<br>
> + * @param init_val<br>
> + *   Value to initialise hash generator.<br>
> + * @return<br>
> + *   32bit calculated hash value.<br>
> + */<br>
> +static inline uint32_t<br>
> +rte_hash_xor(const void *data, uint32_t data_len, uint32_t init_val)<br>
<br>
Should we add "32" in the function name?<br>
<br>
<br>
</blockquote></div>