Re: [dpdk-dev] rte_hash thread safe

2018-05-24 Thread Wang, Yipeng1
v-boun...@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 thread

Re: [dpdk-dev] rte_hash thread safe

2018-04-24 Thread Shyam Shrivastav
You can look at hash table support under librte_table, we are using it for tcp stateful and syncache table (16 bytes key), supports optimized burst look ups, pretty good performance at line rate with up to half a billion entries in syn cache lru table and 33 million in flows ext table. However the

Re: [dpdk-dev] rte_hash thread safe

2018-04-24 Thread Brijesh Singh
Thank you all for explaining. My updates are uncommon; Adding concept of quiescent threads should be worst case loss of 1 full burst cpu cycles on the threads. This should be acceptable infrequent delay in packet processing. I need data on performance of librcu lookups under infrequent updates,

Re: [dpdk-dev] rte_hash thread safe

2018-04-24 Thread Bruce Richardson
On Tue, Apr 24, 2018 at 11:03:42AM +, Ananyev, Konstantin wrote: > > > > > > A gentle reminder, > > > > I am curious to know if/how rte_hash is thread safe for lookups.It is not > > obvious to me how following code is thread safe: > > I don't think it is really thread-safe: you can't do l

Re: [dpdk-dev] rte_hash thread safe

2018-04-24 Thread Ananyev, Konstantin
> > A gentle reminder, > > I am curious to know if/how rte_hash is thread safe for lookups.It is not > obvious to me how following code is thread safe: I don't think it is really thread-safe: you can't do lookup and add/delete simultaneously from different threads. Some extra synchronization

Re: [dpdk-dev] rte_hash thread safe

2018-04-23 Thread Honnappa Nagarahalli
Behalf Of Jim Murphy Sent: Monday, April 23, 2018 9:13 PM To: Stephen Hemminger Cc: Brijesh Singh ; dev@dpdk.org Subject: Re: [dpdk-dev] rte_hash thread safe Right, the threads using the DPDK libraries must do the right RCU stuff, declare quiescent, etc. I mentioned hooks to address the

Re: [dpdk-dev] rte_hash thread safe

2018-04-23 Thread Honnappa Nagarahalli
A gentle reminder, I am curious to know if/how rte_hash is thread safe for lookups.It is not obvious to me how following code is thread safe: _rte_hash_lookup_with_hash(const struct rte_hash *h, const void *key, hash_sig_t sig, void **data) { …

Re: [dpdk-dev] rte_hash thread safe

2018-04-23 Thread Stephen Hemminger
On Tue, 24 Apr 2018 09:18:54 +0530 Jerin Jacob wrote: > -Original Message- > > Date: Mon, 23 Apr 2018 17:48:50 -0700 > > From: Jim Murphy > > To: Stephen Hemminger > > Cc: Brijesh Singh , dev@dpdk.org > > Subject: Re: [dpdk-dev] rte_hash thread safe >

Re: [dpdk-dev] rte_hash thread safe

2018-04-23 Thread Jerin Jacob
-Original Message- > Date: Mon, 23 Apr 2018 17:48:50 -0700 > From: Jim Murphy > To: Stephen Hemminger > Cc: Brijesh Singh , dev@dpdk.org > Subject: Re: [dpdk-dev] rte_hash thread safe > > Anecdotally I've heard that the urcu hash implementation is slower tha

Re: [dpdk-dev] rte_hash thread safe

2018-04-23 Thread Jim Murphy
Right, the threads using the DPDK libraries must do the right RCU stuff, declare quiescent, etc. I mentioned hooks to address the licensing issue. So for places in rte_hash were synchronization must be done a no-op function could be called but users could replace that function with one of their ch

Re: [dpdk-dev] rte_hash thread safe

2018-04-23 Thread Stephen Hemminger
On Mon, 23 Apr 2018 17:48:50 -0700 Jim Murphy wrote: > Anecdotally I've heard that the urcu hash implementation is slower than > rte_hash based on pure lookup performance. Has anyone considered adding RCU > hooks into rte_hash? Not really possible with DPDK (as I said earlier) because DPDK does

Re: [dpdk-dev] rte_hash thread safe

2018-04-23 Thread Jim Murphy
Anecdotally I've heard that the urcu hash implementation is slower than rte_hash based on pure lookup performance. Has anyone considered adding RCU hooks into rte_hash? On Mon, Apr 23, 2018 at 5:30 PM, Stephen Hemminger < step...@networkplumber.org> wrote: > On Mon, 23 Apr 2018 17:21:15 -0700 >

Re: [dpdk-dev] rte_hash thread safe

2018-04-23 Thread Stephen Hemminger
On Mon, 23 Apr 2018 17:21:15 -0700 Jim Murphy wrote: > Has anyone seen performance data comparing rte_hash (perhaps with r/w > locks) versus URCU hash? > > > On Mon, Apr 23, 2018 at 4:50 PM, Stephen Hemminger < > step...@networkplumber.org> wrote: > > > On Mon, 23 Apr 2018 12:40:41 -0700 > >

Re: [dpdk-dev] rte_hash thread safe

2018-04-23 Thread Jim Murphy
Has anyone seen performance data comparing rte_hash (perhaps with r/w locks) versus URCU hash? On Mon, Apr 23, 2018 at 4:50 PM, Stephen Hemminger < step...@networkplumber.org> wrote: > On Mon, 23 Apr 2018 12:40:41 -0700 > Brijesh Singh wrote: > > > A gentle reminder, > > > > I am curious to kno

Re: [dpdk-dev] rte_hash thread safe

2018-04-23 Thread Stephen Hemminger
On Mon, 23 Apr 2018 12:40:41 -0700 Brijesh Singh wrote: > A gentle reminder, > > I am curious to know if/how rte_hash is thread safe for lookups.It is > not obvious to me how following code is thread safe: > > _rte_hash_lookup_with_hash(const struct rte_hash *h, const void *key, > >

Re: [dpdk-dev] rte_hash thread safe

2018-04-23 Thread Brijesh Singh
A gentle reminder, I am curious to know if/how rte_hash is thread safe for lookups.It is not obvious to me how following code is thread safe: _rte_hash_lookup_with_hash(const struct rte_hash *h, const void *key, hash_sig_t sig, void **data) { …

[dpdk-dev] rte_hash thread safe

2018-04-11 Thread Brijesh Singh
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 ope