DPDK usage discussions
 help / color / mirror / Atom feed
From: Syam Prasad N Pearson <syam.pearson@gadgeon.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: "Medvedkin, Vladimir" <vladimir.medvedkin@intel.com>,
	"Kinsella, Ray" <ray.kinsella@intel.com>,
	 "users@dpdk.org" <users@dpdk.org>, "dev@dpdk.org" <dev@dpdk.org>,
	"Wang, Yipeng1" <yipeng1.wang@intel.com>,
	 "Gobriel, Sameh" <sameh.gobriel@intel.com>,
	"Richardson, Bruce" <bruce.richardson@intel.com>
Subject: Re: [dpdk-dev] Doubt regarding DPDK hash Library implementation
Date: Sun, 7 Nov 2021 04:53:02 +0530
Message-ID: <CAA2VcQiTG1oRKnHveBb4_oD=pLycWY3zd=5QFK4kXHB7Fr4DEw@mail.gmail.com> (raw)
In-Reply-To: <3060108.LiUVKm96O0@thomas>

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

Thank you all.

On Thu, Nov 4, 2021 at 10:19 PM Thomas Monjalon <thomas@monjalon.net> wrote:

> 04/11/2021 17:39, Medvedkin, Vladimir:
> > >> 01/11/2021 11:55, Syam Prasad N Pearson:
> > >>> /** Number of items per bucket. */
> > >>> *#define RTE_HASH_BUCKET_ENTRIES 8*
> > >>>
> > >>> defined inside:
> > >>> dpdk-20.11.3/dpdk-stable-20.11.3/lib/librte_hash /rte_cuckoo_hash.h
> > >>>
> > >>> Why does the library take this value as *8*, is there any particular
> > >>> reason for this? what if it is 16,32... etc.
> >
> > Yes, RTE_HASH_BUCKET_ENTRIES can be any power of 2.
> > The reason for choosing 8 is a tradeoff between performance and memory.
> > When it is equal to 8, the sizeof(struct rte_hash_bucket) equal to
> > RTE_CACHE_LINE_SIZE, thus, there are no gaps in memory between the hash
> > buckets due to their alignment.
>
> That's a good comment to add in the code.
>
>
>

-- 
Regards,
Syam Pearson
Syam Pearson
Gadgeon Smart Systems
m: +91-97460-44420 (India)
w: www.gadgeon.com
<https://link.aeusercontent.com/mt/lt/D78C05ADDA56BE856A051569556899538/1?targetURL=https%3A%2F%2Fwww.gadgeon.com%2F>
www.delpheon.io
<https://link.aeusercontent.com/mt/lt/D78C05ADDA56BE856A051569556899538/2?targetURL=https%3A%2F%2Fdelpheon.io%2F>

<https://twitter.com/gadgeon>  [image:
www.linkedin.com/in/kirankumar-c-32349964]
<http://www.linkedin.com/in/syam-prasad-n-pearson-4903b5a8>

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

      reply	other threads:[~2021-11-07 15:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-01 10:55 Syam Prasad N Pearson
2021-11-04 14:11 ` [dpdk-dev] " Thomas Monjalon
2021-11-04 14:46   ` Kinsella, Ray
2021-11-04 16:39     ` Medvedkin, Vladimir
2021-11-04 16:49       ` Thomas Monjalon
2021-11-06 23:23         ` Syam Prasad N Pearson [this message]

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='CAA2VcQiTG1oRKnHveBb4_oD=pLycWY3zd=5QFK4kXHB7Fr4DEw@mail.gmail.com' \
    --to=syam.pearson@gadgeon.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=ray.kinsella@intel.com \
    --cc=sameh.gobriel@intel.com \
    --cc=thomas@monjalon.net \
    --cc=users@dpdk.org \
    --cc=vladimir.medvedkin@intel.com \
    --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

DPDK usage discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.dpdk.org/users/0 users/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 users users/ http://inbox.dpdk.org/users \
		users@dpdk.org
	public-inbox-index users

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.users


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git