diff mbox series

[v1,1/2] linux-gen: queue: fix ordered queue issue

Message ID 1534856407-17971-2-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [v1,1/2] linux-gen: queue: fix ordered queue issue | expand

Commit Message

Github ODP bot Aug. 21, 2018, 1 p.m. UTC
From: Petri Savolainen <petri.savolainen@linaro.org>


Also plain queue enqueue needs to call scheduler ordered enqueue
function, so that scheduler can check re-ordering needs.

Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>

---
/** Email created from pull request 676 (psavol:master-queue-fix-ordered)
 ** https://github.com/Linaro/odp/pull/676
 ** Patch: https://github.com/Linaro/odp/pull/676.patch
 ** Base sha: 912e026c108d7a496ac7467e953dea77dadaaa57
 ** Merge commit sha: a997e012a8edc13ce577c8aa49683fc9d722c2ec
 **/
 platform/linux-generic/odp_queue_basic.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/platform/linux-generic/odp_queue_basic.c b/platform/linux-generic/odp_queue_basic.c
index 22a76b935..e5d915643 100644
--- a/platform/linux-generic/odp_queue_basic.c
+++ b/platform/linux-generic/odp_queue_basic.c
@@ -489,13 +489,16 @@  static inline int _plain_queue_enq_multi(odp_queue_t handle,
 					 odp_buffer_hdr_t *buf_hdr[], int num)
 {
 	queue_entry_t *queue;
-	int num_enq;
+	int ret, num_enq;
 	ring_st_t *ring_st;
 	uint32_t buf_idx[num];
 
 	queue = qentry_from_handle(handle);
 	ring_st = &queue->s.ring_st;
 
+	if (sched_fn->ord_enq_multi(handle, (void **)buf_hdr, num, &ret))
+		return ret;
+
 	buffer_index_from_buf(buf_idx, buf_hdr, num);
 
 	LOCK(queue);