DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bili Dong <qobilidop@gmail.com>
To: "Dumitrescu, Cristian" <cristian.dumitrescu@intel.com>
Cc: "Richardson, Bruce" <bruce.richardson@intel.com>,
	"Gobriel, Sameh" <sameh.gobriel@intel.com>,
	 Thomas Monjalon <thomas@monjalon.net>,
	"dev@dpdk.org" <dev@dpdk.org>,
	 "Wang, Yipeng1" <yipeng1.wang@intel.com>
Subject: Re: [PATCH v3] hash: add XOR32 hash function
Date: Mon, 20 Feb 2023 10:50:38 -0800	[thread overview]
Message-ID: <CAFnY8dF8tq2foRiBjvePDrQ45TXfQYS4MZuVgCryoD+RkLmRMA@mail.gmail.com> (raw)
In-Reply-To: <CH0PR11MB572410D06CC54D68B155C044EBA49@CH0PR11MB5724.namprd11.prod.outlook.com>

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

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

On Mon, Feb 20, 2023 at 10:19 AM Dumitrescu, Cristian <
cristian.dumitrescu@intel.com> wrote:

> Hi Bili,
>
>
>
> 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?
>
>
>
> Thanks,
>
> Cristian
>
>

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

  reply	other threads:[~2023-02-20 18:51 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-15 10:30 [PATCH] " Bili Dong
2023-02-15 10:54 ` [PATCH v2] " Bili Dong
2023-02-15 11:06   ` [PATCH v3] " Bili Dong
2023-02-15 11:39     ` Morten Brørup
2023-02-15 21:39       ` Bili Dong
2023-02-16  9:49         ` Morten Brørup
2023-02-20 13:49     ` Thomas Monjalon
2023-02-20 17:21       ` Bili Dong
2023-02-20 17:38         ` Thomas Monjalon
2023-02-20 17:51           ` Bruce Richardson
2023-02-20 17:54             ` Bili Dong
2023-02-20 18:19               ` Dumitrescu, Cristian
2023-02-20 18:50                 ` Bili Dong [this message]
2023-02-20 20:10     ` Medvedkin, Vladimir
2023-02-20 20:17       ` Bili Dong
2023-02-20 20:19     ` Dumitrescu, Cristian
2023-02-20 20:44       ` Bili Dong
2023-02-20 23:04         ` Stephen Hemminger
2023-02-21  1:38           ` Bili Dong
2023-02-21 16:47     ` [PATCH v4] " Bili Dong
2023-02-21 17:55       ` [PATCH v5] " Bili Dong
2023-02-21 19:37         ` [PATCH v6] " Bili Dong
2023-02-21 21:35           ` Bili Dong
2023-06-12 14:56           ` Thomas Monjalon
2023-06-15 17:14           ` Vladimir Medvedkin
2023-06-16 17:15             ` Bili Dong
2023-06-17 20:34               ` Mattias Rönnblom
2023-06-20 19:12           ` [PATCH v7 1/1] " Bili Dong
2023-06-28 19:19             ` Medvedkin, Vladimir
2023-06-29 17:33             ` [PATCH v8] " Bili Dong
2023-07-06 20:08               ` Stephen Hemminger
2023-07-10 22:01                 ` Bili Dong
2023-07-10 21:59               ` [PATCH v9] " Bili Dong
2023-09-29 15:38                 ` David Marchand
2023-10-03 16:51                 ` Medvedkin, Vladimir
2023-10-06  8:06                 ` David Marchand
2023-06-17 20:59 ` [PATCH] " Stephen Hemminger
2023-06-20 19:27   ` Bili Dong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFnY8dF8tq2foRiBjvePDrQ45TXfQYS4MZuVgCryoD+RkLmRMA@mail.gmail.com \
    --to=qobilidop@gmail.com \
    --cc=bruce.richardson@intel.com \
    --cc=cristian.dumitrescu@intel.com \
    --cc=dev@dpdk.org \
    --cc=sameh.gobriel@intel.com \
    --cc=thomas@monjalon.net \
    --cc=yipeng1.wang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).