[v2,2/2] linux-dpdk: queue: remove unnecessary locking from plain_queue_deq()

Message ID 1533538815-25409-3-git-send-email-odpbot@yandex.ru
State New
Headers show
Series
  • Implement queues using multi-producer/consumer rings
Related show

Commit Message

Github ODP bot Aug. 6, 2018, 7 a.m.
From: Matias Elo <matias.elo@nokia.com>

Queue is implemented using multi-consumer ring.

Signed-off-by: Matias Elo <matias.elo@nokia.com>
---
/** Email created from pull request 55 (matiaselo:dev/queue_opt)
 ** https://github.com/Linaro/odp-dpdk/pull/55
 ** Patch: https://github.com/Linaro/odp-dpdk/pull/55.patch
 ** Base sha: d0bd42aa817eb79dffeab77cbe3ea2ea6f5e3db4
 ** Merge commit sha: bcca17023e693975a61eaecfc99d90fe63e8970b
 **/
 platform/linux-dpdk/odp_queue_basic.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/platform/linux-dpdk/odp_queue_basic.c b/platform/linux-dpdk/odp_queue_basic.c
index 2bc6688d..3134b1bf 100644
--- a/platform/linux-dpdk/odp_queue_basic.c
+++ b/platform/linux-dpdk/odp_queue_basic.c
@@ -552,11 +552,11 @@  static inline int plain_queue_deq(queue_entry_t *queue,
 		return -1;
 	}
 
+	UNLOCK(queue);
+
 	num_deq = ring_mpmc_deq_multi(queue->s.ring_mpmc, (void **)buf_hdr,
 				      num);
 
-	UNLOCK(queue);
-
 	return num_deq;
 }