Radu

Can you enter a bug for the schedule component ?
https://bugs.linaro.org/enter_bug.cgi?product=OpenDataPlane

Thanks
Mike

On 17 February 2015 at 06:32, Ola Liljedahl <[email protected]>
wrote:

> On 17 February 2015 at 11:56, Radu-Andrei Bulie
> <[email protected]> wrote:
> > Hi,
> >
> >
> >
> > There is a test in schedule validaton : test_schedule_pause_resume in
> which
> > the following is performed:
> >
> > -          a number of events (buf type ) are enqueued
> >
> > -          a number of iteratons(NUM_BUFS_BEFORE_PAUSE) are performed
> and in
> > each iteration a schedule of type NO_WAIT is executed
> >
> >
> >
> > Looking at the code one can see that there is a strict assertion that for
> > each iteration, odp_schedule function must return a  valid event.
> >
> > From an implementation perspective there is no guarantee that when a “NO
> > WAIT schedule” is performed,  there will always be a valid event
> returned.
> Agree. The scheduler is executing asynchronously from the threads.
> Only in linux-generic (with a SW scheduler)
>
> >
> > The code snippet is :
> >
> >       for (i = 0; i < NUM_BUFS_BEFORE_PAUSE; i++) {
> >
> >             ev = odp_schedule(&from, ODP_SCHED_NO_WAIT);
> The code needs to check that 'ev' returns a valid event before it
> continues with the code below.
>
> >
> >             CU_ASSERT(from == queue);
> >
> >             buf = odp_buffer_from_event(ev);
> >
> >             odp_buffer_free(buf);
> >
> >       }
> >
> >
> >
> > So I think that the assertion should be made only if the schedule
> returns a
> > valid event.
> Correct.
> Probably the test needs to be slightly rewritten, we cannot have a
> fixed number of loop iterations since not all iterations will return
> an event. The test should loop until all expected events have been
> received through odp_schedule() and have some timeout to handle the
> situation where the ODP implementation doesn't actually return all
> expected events (I don't think we want the validation to hang, better
> to detect this situation and report a CU_FAIL).
>
>
> >
> >
> >
> >
> >
> > Regards,
> >
> >
> >
> > Radu
> >
> >
> > _______________________________________________
> > lng-odp mailing list
> > [email protected]
> > http://lists.linaro.org/mailman/listinfo/lng-odp
> >
>
> _______________________________________________
> lng-odp mailing list
> [email protected]
> http://lists.linaro.org/mailman/listinfo/lng-odp
>



-- 
*Mike Holmes*
Linaro  Sr Technical Manager
LNG - ODP
_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to