DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Wang, Yipeng1" <yipeng1.wang@intel.com>
To: Brijesh Singh <brijesh.s.singh@gmail.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	 "De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>
Cc: "stephen@networkplumber.org" <stephen@networkplumber.org>,
	"nd@arm.com" <nd@arm.com>,
	"Honnappa.Nagarahalli@arm.com" <Honnappa.Nagarahalli@arm.com>,
	"Ananyev, Konstantin" <konstantin.ananyev@intel.com>,
	"Tai, Charlie" <charlie.tai@intel.com>,
	"Gobriel, Sameh" <sameh.gobriel@intel.com>,
	"Wang, Ren" <ren.wang@intel.com>,
	"jmurphy@arista.com" <jmurphy@arista.com>
Subject: Re: [dpdk-dev] rte_hash thread safe
Date: Thu, 24 May 2018 17:35:33 +0000	[thread overview]
Message-ID: <D2C4A16CA39F7F4E8E384D204491D7A661408364@ORSMSX105.amr.corp.intel.com> (raw)
In-Reply-To: <CAAQ1jEGBzgdLG=2g=3nbMHNCUT4W09UChpXeTG4tNR1z+FFHCQ@mail.gmail.com>

Hi, Brijesh and all,

Thanks for bringing this up. We actually have a read-write concurrency support patch coming in a couple of weeks for rte_hash aiming this release.  More changes are on the way for future releases. :)

Thanks
Yipeng 

>-----Original Message-----
>From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Brijesh Singh
>Sent: Wednesday, April 11, 2018 9:12 PM
>To: dev@dpdk.org
>Subject: [dpdk-dev] rte_hash thread safe
>
>Hello,
>
>I  want to use DPDK's rte_hash library to keep track of tcp flows. The
>lookups will be done by multiple threads but inserts will be done only
>on one thread.
>
>As per the documentation rte_hash library has thread safe lookups. Key
>/data inserts should be done on single thread, since those operations
>are not thread safe. Is this documentation still correct?
>
>The lookup code compares the key and returns the data if the key
>matches, this doesn't look like thread safe. Am I missing something?
>
>_rte_hash_lookup_with_hash(const struct rte_hash *h, const void *key,
>
>                                        hash_sig_t sig, void **data)
>
>{
>
>
>
>…
>
>                        if (rte_hash_cmp_eq(key, k->key, h) == 0) {
>
>                                if (data != NULL)
>
>                                        *data = k->pdata;
>
>}
>
>Regards,
>Brijesh

      parent reply	other threads:[~2018-05-24 17:35 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-12  4:12 Brijesh Singh
2018-04-23 19:40 ` Brijesh Singh
2018-04-23 23:50   ` Stephen Hemminger
2018-04-24  0:21     ` Jim Murphy
2018-04-24  0:30       ` Stephen Hemminger
2018-04-24  0:48         ` Jim Murphy
2018-04-24  1:14           ` Stephen Hemminger
2018-04-24  2:13             ` Jim Murphy
2018-04-24  6:36               ` Honnappa Nagarahalli
2018-04-24 15:04             ` Brijesh Singh
2018-04-25  6:45               ` Shyam Shrivastav
2018-04-24  3:48           ` Jerin Jacob
2018-04-24  5:02             ` Stephen Hemminger
2018-04-24  6:12   ` Honnappa Nagarahalli
2018-04-24 11:03     ` Ananyev, Konstantin
2018-04-24 11:07       ` Bruce Richardson
2018-05-24 17:35 ` Wang, Yipeng1 [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=D2C4A16CA39F7F4E8E384D204491D7A661408364@ORSMSX105.amr.corp.intel.com \
    --to=yipeng1.wang@intel.com \
    --cc=Honnappa.Nagarahalli@arm.com \
    --cc=brijesh.s.singh@gmail.com \
    --cc=charlie.tai@intel.com \
    --cc=dev@dpdk.org \
    --cc=jmurphy@arista.com \
    --cc=konstantin.ananyev@intel.com \
    --cc=nd@arm.com \
    --cc=pablo.de.lara.guarch@intel.com \
    --cc=ren.wang@intel.com \
    --cc=sameh.gobriel@intel.com \
    --cc=stephen@networkplumber.org \
    /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).