DPDK patches and discussions
 help / color / mirror / Atom feed
From: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
To: Vladimir Medvedkin <vladimir.medvedkin@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "thomas@monjalon.net" <thomas@monjalon.net>,
	Yipeng Wang <yipeng1.wang@intel.com>,
	Sameh Gobriel <sameh.gobriel@intel.com>,
	Bruce Richardson <bruce.richardson@intel.com>, nd <nd@arm.com>
Subject: RE: [PATCH v2] hash: clarify comments for RTE_HASH_BUCKET_ENTRIES
Date: Wed, 10 Nov 2021 19:16:05 +0000	[thread overview]
Message-ID: <DBAPR08MB5814D87DE1A564D13A463EE398939@DBAPR08MB5814.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <20211110183614.218540-1-vladimir.medvedkin@intel.com>

<snip>

> 
> This patch adds a comment for RTE_HASH_BUCKET_ENTRIES explaining why a
> particular value was chosen.
> 
> Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Looks good
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>

> ---
>  lib/hash/rte_cuckoo_hash.h | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/hash/rte_cuckoo_hash.h b/lib/hash/rte_cuckoo_hash.h index
> 85be49d3bb..eb2644f74b 100644
> --- a/lib/hash/rte_cuckoo_hash.h
> +++ b/lib/hash/rte_cuckoo_hash.h
> @@ -101,7 +101,13 @@ const rte_hash_cmp_eq_t
> cmp_jump_table[NUM_KEY_CMP_CASES] = {  #endif
> 
> 
> -/** Number of items per bucket. */
> +/**
> + * Number of items per bucket.
> + * 8 is a tradeoff between performance and memory consumption.
> + * When it is equal to 8, multiple 'struct rte_hash_bucket' can be fit
> + * on a single cache line (64 or 128 bytes long) without any gaps
> + * in memory between them due to alignment.
> + */
>  #define RTE_HASH_BUCKET_ENTRIES		8
> 
>  #if !RTE_IS_POWER_OF_2(RTE_HASH_BUCKET_ENTRIES)
> --
> 2.25.1


  reply	other threads:[~2021-11-10 19:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-08 17:39 [dpdk-dev] [PATCH] " Vladimir Medvedkin
2021-11-08 22:04 ` Honnappa Nagarahalli
2021-11-09 19:11   ` Medvedkin, Vladimir
2021-11-09 19:46     ` Honnappa Nagarahalli
2021-11-10 18:26       ` Wang, Yipeng1
2021-11-10 18:36 ` [PATCH v2] " Vladimir Medvedkin
2021-11-10 19:16   ` Honnappa Nagarahalli [this message]
2021-11-17 17:34     ` Thomas Monjalon

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=DBAPR08MB5814D87DE1A564D13A463EE398939@DBAPR08MB5814.eurprd08.prod.outlook.com \
    --to=honnappa.nagarahalli@arm.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=nd@arm.com \
    --cc=sameh.gobriel@intel.com \
    --cc=thomas@monjalon.net \
    --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
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).