Before this fix the scheduler would skip the current list of queues per priority
if it found an empty queue. An empty queue can get in the scheduling list if the
last dequeue popped all the buffers (MAX_DEQ).

Signed-off-by: Ciprian Barbu <[email protected]>
---
 platform/linux-generic/odp_schedule.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/platform/linux-generic/odp_schedule.c 
b/platform/linux-generic/odp_schedule.c
index aa11b7b..06e3889 100644
--- a/platform/linux-generic/odp_schedule.c
+++ b/platform/linux-generic/odp_schedule.c
@@ -264,7 +264,7 @@ static int schedule(odp_queue_t *out_queue, odp_buffer_t 
out_buf[],
 
                id = thr & (QUEUES_PER_PRIO-1);
 
-               for (j = 0; j < QUEUES_PER_PRIO; j++, id++) {
+               for (j = 0; j < QUEUES_PER_PRIO; ) {
                        odp_queue_t  pri_q;
                        odp_buffer_t desc_buf;
 
@@ -321,6 +321,9 @@ static int schedule(odp_queue_t *out_queue, odp_buffer_t 
out_buf[],
 
                                return ret;
                        }
+
+                       j++;
+                       id++;
                }
        }
 
-- 
1.8.3.2


_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to