DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] rte_hash thread safe
@ 2018-04-12  4:12 Brijesh Singh
  2018-04-23 19:40 ` Brijesh Singh
  2018-05-24 17:35 ` Wang, Yipeng1
  0 siblings, 2 replies; 17+ messages in thread
From: Brijesh Singh @ 2018-04-12  4:12 UTC (permalink / raw)
  To: dev

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2018-05-24 17:35 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-12  4:12 [dpdk-dev] rte_hash thread safe 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 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).