Message ID | 1440678679-13134-1-git-send-email-ivan.khoronzhuk@linaro.org |
---|---|
State | Accepted |
Commit | 0bd245638dd047b98185d110cf89d80d757e6459 |
Headers | show |
On Thu, Aug 27, 2015 at 03:31:19PM +0300, Ivan Khoronzhuk wrote: > The odp_schduler() requires time value in it`s own ticks, so > path scheduler wait time instead of ns. path -> pass Maybe Maxim can fix that on merge. > > Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> Reviewed-by: Stuart Haslam <stuart.haslam@linaro.org> > --- > test/validation/pktio/pktio.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/test/validation/pktio/pktio.c b/test/validation/pktio/pktio.c > index cb2a9ed..7c0c812 100644 > --- a/test/validation/pktio/pktio.c > +++ b/test/validation/pktio/pktio.c > @@ -342,15 +342,17 @@ static odp_packet_t wait_for_packet(odp_queue_t queue, > uint64_t start, now, diff; > odp_event_t ev; > odp_packet_t pkt = ODP_PACKET_INVALID; > + uint64_t wait; > > start = odp_time_cycles(); > + wait = odp_schedule_wait_time(ns); > > do { > if (queue != ODP_QUEUE_INVALID && > odp_queue_type(queue) == ODP_QUEUE_TYPE_POLL) > ev = queue_deq_wait_time(queue, ns); > else > - ev = odp_schedule(NULL, ns); > + ev = odp_schedule(NULL, wait); > > if (ev != ODP_EVENT_INVALID) { > if (odp_event_type(ev) == ODP_EVENT_PACKET) { > @@ -566,6 +568,7 @@ void pktio_test_inq_remdef(void) > odp_pktio_t pktio = create_pktio(iface_name[0], 0); > odp_queue_t inq; > odp_event_t ev; > + uint64_t wait; > int i; > > CU_ASSERT(pktio != ODP_PKTIO_INVALID); > @@ -574,8 +577,9 @@ void pktio_test_inq_remdef(void) > CU_ASSERT(inq != ODP_QUEUE_INVALID); > CU_ASSERT(odp_pktio_inq_remdef(pktio) == 0); > > + wait = odp_schedule_wait_time(ODP_TIME_SEC); > for (i = 0; i < 100; i++) { > - ev = odp_schedule(NULL, ODP_TIME_MSEC); > + ev = odp_schedule(NULL, wait); > if (ev != ODP_EVENT_INVALID) { > odp_buffer_free(odp_buffer_from_event(ev)); > CU_FAIL("received unexpected event"); > -- > 1.9.1 >
Merged, Maxim. On 08/27/15 15:43, Stuart Haslam wrote: > On Thu, Aug 27, 2015 at 03:31:19PM +0300, Ivan Khoronzhuk wrote: >> The odp_schduler() requires time value in it`s own ticks, so >> path scheduler wait time instead of ns. > path -> pass > > Maybe Maxim can fix that on merge. > >> Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> > Reviewed-by: Stuart Haslam <stuart.haslam@linaro.org> > >> --- >> test/validation/pktio/pktio.c | 8 ++++++-- >> 1 file changed, 6 insertions(+), 2 deletions(-) >> >> diff --git a/test/validation/pktio/pktio.c b/test/validation/pktio/pktio.c >> index cb2a9ed..7c0c812 100644 >> --- a/test/validation/pktio/pktio.c >> +++ b/test/validation/pktio/pktio.c >> @@ -342,15 +342,17 @@ static odp_packet_t wait_for_packet(odp_queue_t queue, >> uint64_t start, now, diff; >> odp_event_t ev; >> odp_packet_t pkt = ODP_PACKET_INVALID; >> + uint64_t wait; >> >> start = odp_time_cycles(); >> + wait = odp_schedule_wait_time(ns); >> >> do { >> if (queue != ODP_QUEUE_INVALID && >> odp_queue_type(queue) == ODP_QUEUE_TYPE_POLL) >> ev = queue_deq_wait_time(queue, ns); >> else >> - ev = odp_schedule(NULL, ns); >> + ev = odp_schedule(NULL, wait); >> >> if (ev != ODP_EVENT_INVALID) { >> if (odp_event_type(ev) == ODP_EVENT_PACKET) { >> @@ -566,6 +568,7 @@ void pktio_test_inq_remdef(void) >> odp_pktio_t pktio = create_pktio(iface_name[0], 0); >> odp_queue_t inq; >> odp_event_t ev; >> + uint64_t wait; >> int i; >> >> CU_ASSERT(pktio != ODP_PKTIO_INVALID); >> @@ -574,8 +577,9 @@ void pktio_test_inq_remdef(void) >> CU_ASSERT(inq != ODP_QUEUE_INVALID); >> CU_ASSERT(odp_pktio_inq_remdef(pktio) == 0); >> >> + wait = odp_schedule_wait_time(ODP_TIME_SEC); >> for (i = 0; i < 100; i++) { >> - ev = odp_schedule(NULL, ODP_TIME_MSEC); >> + ev = odp_schedule(NULL, wait); >> if (ev != ODP_EVENT_INVALID) { >> odp_buffer_free(odp_buffer_from_event(ev)); >> CU_FAIL("received unexpected event"); >> -- >> 1.9.1 >> > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > https://lists.linaro.org/mailman/listinfo/lng-odp
diff --git a/test/validation/pktio/pktio.c b/test/validation/pktio/pktio.c index cb2a9ed..7c0c812 100644 --- a/test/validation/pktio/pktio.c +++ b/test/validation/pktio/pktio.c @@ -342,15 +342,17 @@ static odp_packet_t wait_for_packet(odp_queue_t queue, uint64_t start, now, diff; odp_event_t ev; odp_packet_t pkt = ODP_PACKET_INVALID; + uint64_t wait; start = odp_time_cycles(); + wait = odp_schedule_wait_time(ns); do { if (queue != ODP_QUEUE_INVALID && odp_queue_type(queue) == ODP_QUEUE_TYPE_POLL) ev = queue_deq_wait_time(queue, ns); else - ev = odp_schedule(NULL, ns); + ev = odp_schedule(NULL, wait); if (ev != ODP_EVENT_INVALID) { if (odp_event_type(ev) == ODP_EVENT_PACKET) { @@ -566,6 +568,7 @@ void pktio_test_inq_remdef(void) odp_pktio_t pktio = create_pktio(iface_name[0], 0); odp_queue_t inq; odp_event_t ev; + uint64_t wait; int i; CU_ASSERT(pktio != ODP_PKTIO_INVALID); @@ -574,8 +577,9 @@ void pktio_test_inq_remdef(void) CU_ASSERT(inq != ODP_QUEUE_INVALID); CU_ASSERT(odp_pktio_inq_remdef(pktio) == 0); + wait = odp_schedule_wait_time(ODP_TIME_SEC); for (i = 0; i < 100; i++) { - ev = odp_schedule(NULL, ODP_TIME_MSEC); + ev = odp_schedule(NULL, wait); if (ev != ODP_EVENT_INVALID) { odp_buffer_free(odp_buffer_from_event(ev)); CU_FAIL("received unexpected event");
The odp_schduler() requires time value in it`s own ticks, so path scheduler wait time instead of ns. Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> --- test/validation/pktio/pktio.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)