Hi,

I'm currently reworking the scheduler and fixing this issue as part of that. 
Optimally, we'd get rid of the PKTIN type queues, and just use POLL or SCHED 
type to indicate if user is going to poll or use scheduler. Now PKTIN allows 
both polling and scheduling, which is wrong.

-Petri

> -----Original Message-----
> From: [email protected] [mailto:lng-odp-
> [email protected]] On Behalf Of ext Maxim Uvarov
> Sent: Friday, March 20, 2015 2:15 PM
> To: [email protected]; Stuart Haslam
> Subject: Re: [lng-odp] odp_pktio validation test
> 
> Hello Raru-Andrei,  thanks for finding this.  Feel free to send patch
> for that issue.
> 
> Stuart, please review that change.
> 
> Best regards,
> Maxim.
> 
> On 03/20/15 12:43, Radu-Andrei Bulie wrote:
> >
> > Hi,
> >
> > In the odp_pktio validation - a pktio is created and it is configured
> > with a PKTIN queue.
> >
> > Packets are then enqueued to the out queue of the device.
> >
> > In the function *wait_for_packet***I think is an issue when an event
> > is received.
> >
> > There is  the following condition :
> >
> > *if*(queue != ODP_QUEUE_INVALID)
> >
> >                   ev = queue_deq_wait_time(queue, ns);
> >
> > *else*
> >
> >                   ev  = odp_schedule(NULL, ns);
> >
> > The *queue* that comes as input param, is the PKTIN queue which is a
> > scheduled queue.
> >
> > As it can be noticed the queue_deq_wait_time will be called (PKTN
> > queue is valid) and there,
> >
> > *an explicit dequeue operation will be performed on a scheduled queue
> > *which is not OK.
> >
> > So a schedule would be proper instead of explicit dequeue.
> >
> > A possible fix is to check for *queue type instead of validity*, and
> > if the queue is POLL  then take the corresponding branch:
> >
> > *if*(*odp_queue_type(*queue) == ODP_QUEUE_TYPE_POLL)
> >
> >                   ev = queue_deq_wait_time(queue, ns);
> >
> > *else*
> >
> >                   ev  = odp_schedule(NULL, ns);
> >
> > 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

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

Reply via email to