Re: [dpdk-dev] [PATCH 3/4] hash: fix rw concurrency while moving keys

2018-10-04 Thread Wang, Yipeng1
Hu (Arm Technology China) >; Steve Capper ; Ola Liljedahl >; nd ; Gobriel, >Sameh >Subject: RE: [dpdk-dev] [PATCH 3/4] hash: fix rw concurrency while moving keys > >> >> > >-Original Message- >> > >From: Van Haaren, Harry >&

Re: [dpdk-dev] [PATCH 3/4] hash: fix rw concurrency while moving keys

2018-10-03 Thread Honnappa Nagarahalli
> > > >-Original Message- > > >From: Van Haaren, Harry > > >> > > > > /** > > >> > > > > * Add a key to an existing hash table. > > >> > > > >@@ -222,7 +222,7 @@ rte_hash_add_key(const struct rte_hash > > >> > > > >*h, const void > > >> > > *key); > > >> > > > > * array of user data.

Re: [dpdk-dev] [PATCH 3/4] hash: fix rw concurrency while moving keys

2018-10-03 Thread Honnappa Nagarahalli
> > > >> >-Original Message- > >> >From: Van Haaren, Harry > >> >> > > > > /** > >> >> > > > > * Add a key to an existing hash table. > >> >> > > > >@@ -222,7 +222,7 @@ rte_hash_add_key(const struct rte_hash > >> >> > > > >*h, const void > >> >> > > *key); > >> >> > > > > * array of u

Re: [dpdk-dev] [PATCH 3/4] hash: fix rw concurrency while moving keys

2018-10-03 Thread Ola Liljedahl
> >Cc: De Lara Guarch, Pablo ; dev@dpdk.org; Gavin Hu (Arm Technology China) >; Steve Capper ; Ola Liljedahl ; nd ; Gobriel, >Sameh >Subject: RE: [dpdk-dev] [PATCH 3/4] hash: fix rw concurrency while moving keys > >> >-Orig

Re: [dpdk-dev] [PATCH 3/4] hash: fix rw concurrency while moving keys

2018-10-03 Thread Wang, Yipeng1
y China) >; Steve Capper ; Ola Liljedahl >; nd ; Gobriel, >Sameh >Subject: RE: [dpdk-dev] [PATCH 3/4] hash: fix rw concurrency while moving keys > >> >-Original Message- >> >From: Van Haaren, Harry >> >> > > > > /** &g

Re: [dpdk-dev] [PATCH 3/4] hash: fix rw concurrency while moving keys

2018-10-03 Thread Honnappa Nagarahalli
> >-Original Message- > >[Wang, Yipeng] I was thinking about another corner case and wondering > >if the version counter needs to be done on key deletion as well. > >For example, a reader reads out the index and falsely matches a > >signature, before it reads out the data and the key, the k

Re: [dpdk-dev] [PATCH 3/4] hash: fix rw concurrency while moving keys

2018-10-03 Thread Honnappa Nagarahalli
> >-Original Message- > >From: Van Haaren, Harry > >> > > > > /** > >> > > > > * Add a key to an existing hash table. > >> > > > >@@ -222,7 +222,7 @@ rte_hash_add_key(const struct rte_hash *h, > >> > > > >const void > >> > > *key); > >> > > > > * array of user data. This value is uniq

Re: [dpdk-dev] [PATCH 3/4] hash: fix rw concurrency while moving keys

2018-10-02 Thread Wang, Yipeng1
>-Original Message- >[Wang, Yipeng] I was thinking about another corner case and wondering if the >version counter needs to be done on key deletion as >well. >For example, a reader reads out the index and falsely matches a signature, >before it reads out the data and the key, the key-data

Re: [dpdk-dev] [PATCH 3/4] hash: fix rw concurrency while moving keys

2018-10-02 Thread Wang, Yipeng1
>-Original Message- >From: Van Haaren, Harry >> > > > > /** >> > > > > * Add a key to an existing hash table. >> > > > >@@ -222,7 +222,7 @@ rte_hash_add_key(const struct rte_hash *h, >> > > > >const void >> > > *key); >> > > > > * array of user data. This value is unique for this k

Re: [dpdk-dev] [PATCH 3/4] hash: fix rw concurrency while moving keys

2018-10-02 Thread Van Haaren, Harry
China) ; Steve Capper > ; Ola Liljedahl ; nd > > Subject: RE: [dpdk-dev] [PATCH 3/4] hash: fix rw concurrency while moving > keys > > > > > > > > > > > >Reader-writer concurrency issue, caused by moving the keys to their > > > > >alterna

Re: [dpdk-dev] [PATCH 3/4] hash: fix rw concurrency while moving keys

2018-10-01 Thread Wang, Yipeng1
er ; Ola Liljedahl >; nd >Subject: RE: [dpdk-dev] [PATCH 3/4] hash: fix rw concurrency while moving keys > >> >+ __atomic_store_n(&h->tbl_chng_cnt, >> >+h->tbl_chng_cnt + 1, >> >+__ATOMIC_RELEASE); >> >+

Re: [dpdk-dev] [PATCH 3/4] hash: fix rw concurrency while moving keys

2018-09-30 Thread Honnappa Nagarahalli
> > > >Reader-writer concurrency issue, caused by moving the keys to their > >alternative locations during key insert, is solved by introducing a > >global counter(tbl_chng_cnt) indicating a change in table. > > > >@@ -662,6 +679,20 @@ rte_hash_cuckoo_move_insert_mw(const struct > rte_hash *h, > >

Re: [dpdk-dev] [PATCH 3/4] hash: fix rw concurrency while moving keys

2018-09-30 Thread Honnappa Nagarahalli
> > > > > > > >Reader-writer concurrency issue, caused by moving the keys to their > > > >alternative locations during key insert, is solved by introducing a > > > >global counter(tbl_chng_cnt) indicating a change in table. > > > > > > > /** > > > >@@ -200,7 +200,7 @@ rte_hash_add_key_with_has

Re: [dpdk-dev] [PATCH 3/4] hash: fix rw concurrency while moving keys

2018-09-28 Thread Van Haaren, Harry
ola.liljed...@arm.com; n...@arm.com > Subject: Re: [dpdk-dev] [PATCH 3/4] hash: fix rw concurrency while moving > keys > > On Fri, Sep 28, 2018 at 02:00:00AM +0100, Wang, Yipeng1 wrote: > > Reply inlined: > > > > >-Original Message- > > >From: dev

Re: [dpdk-dev] [PATCH 3/4] hash: fix rw concurrency while moving keys

2018-09-28 Thread Bruce Richardson
Lara Guarch, Pablo > > > >Cc: dev@dpdk.org; honnappa.nagaraha...@dpdk.org; gavin...@arm.com; > >steve.cap...@arm.com; ola.liljed...@arm.com; > >n...@arm.com; Honnappa Nagarahalli > >Subject: [dpdk-dev] [PATCH 3/4] hash: fix rw concurrency while moving keys > > &

Re: [dpdk-dev] [PATCH 3/4] hash: fix rw concurrency while moving keys

2018-09-27 Thread Wang, Yipeng1
m.com; >steve.cap...@arm.com; ola.liljed...@arm.com; >n...@arm.com; Honnappa Nagarahalli >Subject: [dpdk-dev] [PATCH 3/4] hash: fix rw concurrency while moving keys > >Reader-writer concurrency issue, caused by moving the keys >to their alternative locations during key insert, is sol

[dpdk-dev] [PATCH 3/4] hash: fix rw concurrency while moving keys

2018-09-06 Thread Honnappa Nagarahalli
Reader-writer concurrency issue, caused by moving the keys to their alternative locations during key insert, is solved by introducing a global counter(tbl_chng_cnt) indicating a change in table. Signed-off-by: Honnappa Nagarahalli Reviewed-by: Gavin Hu Reviewed-by: Ola Liljedahl Reviewed-by: St