[dpdk-dev] rte_hash thread safe
Bruce Richardson
bruce.richardson at intel.com
Tue Apr 24 13:07:09 CEST 2018
On Tue, Apr 24, 2018 at 11:03:42AM +0000, 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 lookup and add/delete simultaneously from different threads.
> Some extra synchronization would be needed.
> Konstantin
>
This notice may be a left-over from older versions. I believe in the past,
the hash library used to be safe to have add/delete and lookup in parallel,
but it certainly appears to be no longer the case.
/Bruce
More information about the dev
mailing list