[dpdk-dev] [PATCH v2 3/4] hash: keep the list locked at creation

2016-04-05 Thread De Lara Guarch, Pablo
> -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Olivier Matz > Sent: Tuesday, April 05, 2016 8:36 AM > To: dev at dpdk.org > Cc: Richardson, Bruce > Subject: [dpdk-dev] [PATCH v2 3/4] hash: keep the list locked at creation > > T

[dpdk-dev] [PATCH v2 3/4] hash: keep the list locked at creation

2016-04-05 Thread Olivier Matz
To avoid a race condition while creating a new hash object, the list has to be locked before the lookup, and released only once the new object is added in the list. As the lock is held by the rte_ring_create(), move its creation at the beginning of the function and only take the lock after the