Re: [PATCH v8] hash: add XOR32 hash function

2023-07-10 Thread Bili Dong
Thanks for the suggestion! It's fixed in the latest version. On Thu, Jul 6, 2023 at 1:08 PM Stephen Hemminger wrote: > On Thu, 29 Jun 2023 17:33:00 +0000 > Bili Dong wrote: > > > + > > +/** > > + * The following bytes access helper functions are expected to wor

[PATCH v9] hash: add XOR32 hash function

2023-07-10 Thread Bili Dong
An XOR32 hash is needed in the Software Switch (SWX) Pipeline for its use case in P4. We implement it in this patch so it could be easily registered in the pipeline later. Signed-off-by: Bili Dong --- v9: * Marked internl helper functions as @internal. (re Stephen Hemminger ) v8: * Removed

[PATCH v8] hash: add XOR32 hash function

2023-06-29 Thread Bili Dong
An XOR32 hash is needed in the Software Switch (SWX) Pipeline for its use case in P4. We implement it in this patch so it could be easily registered in the pipeline later. Signed-off-by: Bili Dong --- v8: * Removed unnecessary helper function. (re Vladimir Medvedkin ) v7: * Simplified byte

Re: [PATCH] hash: add XOR32 hash function

2023-06-20 Thread Bili Dong
tep...@networkplumber.org> wrote: > Does it generate same hash as NIC than do it in HW? > > On Wed, Feb 15, 2023, 3:31 AM Bili Dong wrote: > >> An XOR32 hash is needed in the Software Switch (SWX) Pipeline for its >> use case in P4. We implement it in this patch so it could be easily

[PATCH v7 1/1] hash: add XOR32 hash function

2023-06-20 Thread Bili Dong
An XOR32 hash is needed in the Software Switch (SWX) Pipeline for its use case in P4. We implement it in this patch so it could be easily registered in the pipeline later. Signed-off-by: Bili Dong --- v7: * Simplified byte ordering conversion logic. (re Vladimir Medvedkin ) * Added test cases

Re: [PATCH v6] hash: add XOR32 hash function

2023-06-16 Thread Bili Dong
64; > > return rte_be_to_cpu_32(hash32) ^ init_val; > } > > What do you think? > > Also, consider to check in hash_functions_autotest keys with length equal > to 3 (or eq 3 mod 4, for example 7 or 11) > > вт, 21 февр. 2023 г. в 19:37, Bili Dong : > >&

Re: [PATCH v6] hash: add XOR32 hash function

2023-02-21 Thread Bili Dong
The reported performance issue <http://mails.dpdk.org/archives/test-report/2023-February/357697.html> is a mystery to me. Does anyone have an idea what's going on? Thanks, Bili On Tue, Feb 21, 2023 at 11:37 AM Bili Dong wrote: > An XOR32 hash is needed in the Software Switch (SWX

[PATCH v6] hash: add XOR32 hash function

2023-02-21 Thread Bili Dong
An XOR32 hash is needed in the Software Switch (SWX) Pipeline for its use case in P4. We implement it in this patch so it could be easily registered in the pipeline later. Signed-off-by: Bili Dong --- .mailmap | 1 + app/test/test_hash_functions.c | 33 +++-- lib

[PATCH v5] hash: add XOR32 hash function

2023-02-21 Thread Bili Dong
An XOR32 hash is needed in the Software Switch (SWX) Pipeline for its use case in P4. We implement it in this patch so it could be easily registered in the pipeline later. Signed-off-by: Bili Dong --- .mailmap | 1 + app/test/test_hash_functions.c | 33

[PATCH v4] hash: add XOR32 hash function

2023-02-21 Thread Bili Dong
An XOR32 hash is needed in the Software Switch (SWX) Pipeline for its use case in P4. We implement it in this patch so it could be easily registered in the pipeline later. Signed-off-by: Bili Dong --- .mailmap | 1 + app/test/test_hash_functions.c | 33

Re: [PATCH v3] hash: add XOR32 hash function

2023-02-20 Thread Bili Dong
Thanks, I'll check it out. On Mon, Feb 20, 2023 at 3:04 PM Stephen Hemminger < step...@networkplumber.org> wrote: > On Mon, 20 Feb 2023 12:44:06 -0800 > Bili Dong wrote: > > > Hi Cristian, > > > > I agree the 64-bit version could enable better perform

Re: [PATCH v3] hash: add XOR32 hash function

2023-02-20 Thread Bili Dong
Hi Cristian, I agree the 64-bit version could enable better performance, and I will do it in the next version. For endianness, see my comments below (inline): On Mon, Feb 20, 2023 at 12:19 PM Dumitrescu, Cristian < cristian.dumitre...@intel.com> wrote: > HI Bili, > > Comments inline below: > >

Re: [PATCH v3] hash: add XOR32 hash function

2023-02-20 Thread Bili Dong
Got it. Will fix. Thanks! On Mon, Feb 20, 2023 at 12:10 PM Medvedkin, Vladimir < vladimir.medved...@intel.com> wrote: > Hi Bill, > > On 15/02/2023 11:06, Bili Dong wrote: > > An XOR32 hash is needed in the Software Switch (SWX) Pipeline for its > > use case in P4. We

Re: [PATCH v3] hash: add XOR32 hash function

2023-02-20 Thread Bili Dong
I think the endianness conversions are necessary, otherwise, the hash function return value will be host endianness dependent. 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 0x0001020

Re: [PATCH v3] hash: add XOR32 hash function

2023-02-20 Thread Bili Dong
Got it. I’ll update the patch. On Mon, Feb 20, 2023 at 9:52 AM Bruce Richardson wrote: > On Mon, Feb 20, 2023 at 06:38:23PM +0100, Thomas Monjalon wrote: > > 20/02/2023 18:21, Bili Dong: > > > The naming is following the existing CRC32 hash: > > > > https://el

Re: [PATCH v3] hash: add XOR32 hash function

2023-02-20 Thread Bili Dong
obably should also rename rte_hash_crc(). I'm fine with either option. On Mon, Feb 20, 2023 at 5:49 AM Thomas Monjalon wrote: > 15/02/2023 12:06, Bili Dong: > > An XOR32 hash is needed in the Software Switch (SWX) Pipeline for its > > use case in P4. We implement it in this patc

Re: [PATCH v3] hash: add XOR32 hash function

2023-02-15 Thread Bili Dong
be someone more familiar with lib/hash/ could provide some context on this? Thanks, Bili On Wed, Feb 15, 2023 at 3:39 AM Morten Brørup wrote: > > From: Bili Dong [mailto:qobili...@gmail.com] > > Sent: Wednesday, 15 February 2023 12.07 > > > > An XOR32 hash is needed in the

[PATCH v3] hash: add XOR32 hash function

2023-02-15 Thread Bili Dong
An XOR32 hash is needed in the Software Switch (SWX) Pipeline for its use case in P4. We implement it in this patch so it could be easily registered in the pipeline later. Signed-off-by: Bili Dong --- .mailmap | 1 + app/test/test_hash_functions.c | 33

[PATCH v2] hash: add XOR32 hash function

2023-02-15 Thread Bili Dong
An XOR32 hash is needed in the Software Switch (SWX) Pipeline for its use case in P4. We implement it in this patch so it could be easily registered in the pipeline later. Signed-off-by: Bili Dong --- .mailmap | 1 + app/test/test_hash_functions.c | 33

[PATCH] hash: add XOR32 hash function

2023-02-15 Thread Bili Dong
An XOR32 hash is needed in the Software Switch (SWX) Pipeline for its use case in P4. We implement it in this patch so it could be easily registered in the pipeline later. Signed-off-by: Bili Dong --- .mailmap | 1 + app/test/test_hash_functions.c | 33

Re: Question about naive XOR hash in DPDK

2022-11-11 Thread Bili Dong
. 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 wrote: > On 2022-11-07 19:57, Bili Dong wrote: > > Dear DPDK devs, > > > > We are using DPDK as the b

Question about naive XOR hash in DPDK

2022-11-07 Thread Bili Dong
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