<div dir="ltr">Hi Mattias,<div><br></div><div>Maybe an example helps explain this. Here is an example where the CRC hash function is registered in the DPDK pipeline: <a href="http://git.dpdk.org/dpdk/tree/lib/pipeline/rte_swx_pipeline.c?id=203dcc9cfe4151518bb5a5c59ee22a754e649e35#n10115">http://git.dpdk.org/dpdk/tree/lib/pipeline/rte_swx_pipeline.c?id=203dcc9cfe4151518bb5a5c59ee22a754e649e35#n10115</a>. We need something similar to this for the XOR hash. This means we need to have the XOR hash function implemented somewhere first before we could register it.</div><div><br></div><div>Thanks,</div><div>Bili</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Nov 9, 2022 at 2:08 PM Mattias Rönnblom <<a href="mailto:hofors@lysator.liu.se">hofors@lysator.liu.se</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">On 2022-11-07 19:57, Bili Dong wrote:<br>
> Dear DPDK devs,<br>
> <br>
> We are using DPDK as the backend target of a P4 pipeline <br>
> (<a href="https://github.com/p4lang/p4-dpdk-target" rel="noreferrer" target="_blank">https://github.com/p4lang/p4-dpdk-target</a> <br>
> <<a href="https://github.com/p4lang/p4-dpdk-target" rel="noreferrer" target="_blank">https://github.com/p4lang/p4-dpdk-target</a>>). A recent issue we are <br>
> trying to solve is to support a naive XOR hash (something like this <br>
> <<a href="https://github.com/p4lang/behavioral-model/blob/b7a5c105e5c21414ac07f7f2879b45c000ab2aa4/src/bm_sim/calculations.cpp#L380-L399" rel="noreferrer" target="_blank">https://github.com/p4lang/behavioral-model/blob/b7a5c105e5c21414ac07f7f2879b45c000ab2aa4/src/bm_sim/calculations.cpp#L380-L399</a>>) in this pipeline. This requires an XOR hash implementation in DPDK.I have the following questions:<br>
<br>
<br>
Why would it *require* an xor hash function in DPDK?<br>
<br>
> <br>
> 1. Is there already an XOR hash implementation in DPDK? I haven't found<br>
> it myself, but I could have missed it.<br>
> 2. If it doesn't exist, I'm willing to contribute one, as the<br>
> implementation is quite straightforward. But I might need your help<br>
> on where to put the code, as I'm not that familiar with the code<br>
> organization.<br>
> <br>
> Any help would be appreciated!<br>
> <br>
> Thanks,<br>
> Bili<br>
> <br>
</blockquote></div>