DPDK patches and discussions
 help / color / mirror / Atom feed
* Question about naive XOR hash in DPDK
@ 2022-11-07 18:57 Bili Dong
  2022-11-09 22:08 ` Mattias Rönnblom
  0 siblings, 1 reply; 3+ messages in thread
From: Bili Dong @ 2022-11-07 18:57 UTC (permalink / raw)
  To: dev; +Cc: cristian.dumitrescu

[-- Attachment #1: Type: text/plain, Size: 821 bytes --]

Dear DPDK devs,

We are using DPDK as the backend target of a P4 pipeline (
https://github.com/p4lang/p4-dpdk-target). A recent issue we are trying to
solve is to support a naive XOR hash (something like this
<https://github.com/p4lang/behavioral-model/blob/b7a5c105e5c21414ac07f7f2879b45c000ab2aa4/src/bm_sim/calculations.cpp#L380-L399>)
in this pipeline. This requires an XOR hash implementation in DPDK. I have
the following questions:

   1. Is there already an XOR hash implementation in DPDK? I haven't found
   it myself, but I could have missed it.
   2. If it doesn't exist, I'm willing to contribute one, as the
   implementation is quite straightforward. But I might need your help on
   where to put the code, as I'm not that familiar with the code organization.

Any help would be appreciated!

Thanks,
Bili

[-- Attachment #2: Type: text/html, Size: 1022 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Question about naive XOR hash in DPDK
  2022-11-07 18:57 Question about naive XOR hash in DPDK Bili Dong
@ 2022-11-09 22:08 ` Mattias Rönnblom
  2022-11-11 17:59   ` Bili Dong
  0 siblings, 1 reply; 3+ messages in thread
From: Mattias Rönnblom @ 2022-11-09 22:08 UTC (permalink / raw)
  To: Bili Dong, dev; +Cc: cristian.dumitrescu

On 2022-11-07 19:57, Bili Dong wrote:
> Dear DPDK devs,
> 
> We are using DPDK as the backend target of a P4 pipeline 
> (https://github.com/p4lang/p4-dpdk-target 
> <https://github.com/p4lang/p4-dpdk-target>). A recent issue we are 
> trying to solve is to support a naive XOR hash (something like this 
> <https://github.com/p4lang/behavioral-model/blob/b7a5c105e5c21414ac07f7f2879b45c000ab2aa4/src/bm_sim/calculations.cpp#L380-L399>) in this pipeline. This requires an XOR hash implementation in DPDK.I have the following questions:


Why would it *require* an xor hash function in DPDK?

> 
>  1. Is there already an XOR hash implementation in DPDK? I haven't found
>     it myself, but I could have missed it.
>  2. If it doesn't exist, I'm willing to contribute one, as the
>     implementation is quite straightforward. But I might need your help
>     on where to put the code, as I'm not that familiar with the code
>     organization.
> 
> Any help would be appreciated!
> 
> Thanks,
> Bili
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Question about naive XOR hash in DPDK
  2022-11-09 22:08 ` Mattias Rönnblom
@ 2022-11-11 17:59   ` Bili Dong
  0 siblings, 0 replies; 3+ messages in thread
From: Bili Dong @ 2022-11-11 17:59 UTC (permalink / raw)
  To: Mattias Rönnblom; +Cc: dev, cristian.dumitrescu

[-- Attachment #1: Type: text/plain, Size: 1596 bytes --]

Hi Mattias,

Maybe an example helps explain this. Here is an example where the CRC hash
function is registered in the DPDK pipeline:
http://git.dpdk.org/dpdk/tree/lib/pipeline/rte_swx_pipeline.c?id=203dcc9cfe4151518bb5a5c59ee22a754e649e35#n10115.
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.

Thanks,
Bili

On Wed, Nov 9, 2022 at 2:08 PM Mattias Rönnblom <hofors@lysator.liu.se>
wrote:

> On 2022-11-07 19:57, Bili Dong wrote:
> > Dear DPDK devs,
> >
> > We are using DPDK as the backend target of a P4 pipeline
> > (https://github.com/p4lang/p4-dpdk-target
> > <https://github.com/p4lang/p4-dpdk-target>). A recent issue we are
> > trying to solve is to support a naive XOR hash (something like this
> > <
> https://github.com/p4lang/behavioral-model/blob/b7a5c105e5c21414ac07f7f2879b45c000ab2aa4/src/bm_sim/calculations.cpp#L380-L399>)
> in this pipeline. This requires an XOR hash implementation in DPDK.I have
> the following questions:
>
>
> Why would it *require* an xor hash function in DPDK?
>
> >
> >  1. Is there already an XOR hash implementation in DPDK? I haven't found
> >     it myself, but I could have missed it.
> >  2. If it doesn't exist, I'm willing to contribute one, as the
> >     implementation is quite straightforward. But I might need your help
> >     on where to put the code, as I'm not that familiar with the code
> >     organization.
> >
> > Any help would be appreciated!
> >
> > Thanks,
> > Bili
> >
>

[-- Attachment #2: Type: text/html, Size: 2550 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-11-11 18:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-07 18:57 Question about naive XOR hash in DPDK Bili Dong
2022-11-09 22:08 ` Mattias Rönnblom
2022-11-11 17:59   ` Bili Dong

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).