From: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
To: Michel Machado <michel@digirati.com.br>,
"Fu, Qiaobin" <qiaobinf@bu.edu>,
"Richardson, Bruce" <bruce.richardson@intel.com>,
"De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
"Doucette, Cody, Joseph" <doucette@bu.edu>,
"Wang, Yipeng1" <yipeng1.wang@intel.com>,
"Wiles, Keith" <keith.wiles@intel.com>,
"Gobriel, Sameh" <sameh.gobriel@intel.com>,
"Tai, Charlie" <charlie.tai@intel.com>,
Stephen Hemminger <stephen@networkplumber.org>, nd <nd@arm.com>
Subject: Re: [dpdk-dev] [PATCH v2] hash table: add an iterator over conflicting entries
Date: Tue, 21 Aug 2018 05:10:21 +0000 [thread overview]
Message-ID: <AM6PR08MB36725774B43A6767157E139298310@AM6PR08MB3672.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <12e971e0-41bd-2cd6-d80c-a7a486fd1046@digirati.com.br>
-----Original Message-----
From: Michel Machado <michel@digirati.com.br>
Sent: Saturday, August 18, 2018 6:08 PM
To: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>; Fu, Qiaobin <qiaobinf@bu.edu>; Richardson, Bruce <bruce.richardson@intel.com>; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
Cc: dev@dpdk.org; Doucette, Cody, Joseph <doucette@bu.edu>; Wang, Yipeng1 <yipeng1.wang@intel.com>; Wiles, Keith <keith.wiles@intel.com>; Gobriel, Sameh <sameh.gobriel@intel.com>; Tai, Charlie <charlie.tai@intel.com>; Stephen Hemminger <stephen@networkplumber.org>; nd <nd@arm.com>
Subject: Re: [dpdk-dev] [PATCH v2] hash table: add an iterator over conflicting entries
On 08/17/2018 03:41 PM, Honnappa Nagarahalli wrote:
> Can you elaborate more on using ' struct rte_conflict_iterator_state' as the argument for the API?
>
> If the API signature is changed to: rte_hash_iterate_conflict_entries (const struct rte_hash *h, void **key, void **data, const hash_sig_t sig, struct rte_conflict_iterator_state *state) - it will be inline with the existing APIs. Contents of 'state' must be initialized to 0 for the first call. This will also avoid creating 'rte_hash_iterator_conflict_entries_init' API.
Testing `state' every time rte_hash_iterate_conflict_entries() is called to find out if it's the first call of the iterator will possibly add some small, but unnecessary, overhead on
rte_hash_iterate_conflict_entries() and constraints on struct rte_conflict_iterator_state. Moreover,
rte_hash_iterator_conflict_entries_init() enables one to easily add variations of the init function to initialize the state (e.g. using a key instead of a sig) and still use the exactly same iterator.
IMO, I think, this over-head will be trivial. Looking at the function 'rte_hash_iterate_conflict_entries' the check for '(__state->vnext < RTE_HASH_BUCKET_ENTRIES * 2)' already exists. If the primary/secondary bucket indices are calculated as well in 'rte_hash_iterate_conflict_entries' API ('rte_hash_iterate' API does such calculations), storing them in the state can be avoided. I am wondering if it makes sense to benchmark with these changes and then take a decision?
[ ]'s
Michel Machado
next prev parent reply other threads:[~2018-08-21 5:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-16 7:30 Fu, Qiaobin
2018-08-17 2:33 ` Honnappa Nagarahalli
2018-08-17 13:34 ` Michel Machado
2018-08-17 19:41 ` Honnappa Nagarahalli
2018-08-18 22:45 ` Michel Machado
2018-08-18 23:08 ` Michel Machado
2018-08-21 5:10 ` Honnappa Nagarahalli [this message]
2018-08-21 12:41 ` Michel Machado
2018-08-21 23:42 ` Honnappa Nagarahalli
2018-08-24 0:33 ` Wang, Yipeng1
2018-08-24 12:34 ` Michel Machado
2018-08-27 3:12 ` Honnappa Nagarahalli
2018-08-27 18:27 ` Michel Machado
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=AM6PR08MB36725774B43A6767157E139298310@AM6PR08MB3672.eurprd08.prod.outlook.com \
--to=honnappa.nagarahalli@arm.com \
--cc=bruce.richardson@intel.com \
--cc=charlie.tai@intel.com \
--cc=dev@dpdk.org \
--cc=doucette@bu.edu \
--cc=keith.wiles@intel.com \
--cc=michel@digirati.com.br \
--cc=nd@arm.com \
--cc=pablo.de.lara.guarch@intel.com \
--cc=qiaobinf@bu.edu \
--cc=sameh.gobriel@intel.com \
--cc=stephen@networkplumber.org \
--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).