diff mbox

validation: pktio: do not dequeue from scheduled queue

Message ID 1433256366-10099-1-git-send-email-maxim.uvarov@linaro.org
State Accepted
Commit a6d1ce8e83eb599e1ac67b7995d8738c6debe702
Headers show

Commit Message

Maxim Uvarov June 2, 2015, 2:46 p.m. UTC
packet i/o test can create 2 types of queues: scheduled and
polled. Do not do dequeue from scheduled queue.
https://bugs.linaro.org/show_bug.cgi?id=1383

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
---
 test/validation/odp_pktio.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Balasubramanian Manoharan June 9, 2015, 4:53 a.m. UTC | #1
Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>

On 2 June 2015 at 20:16, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:

> packet i/o test can create 2 types of queues: scheduled and
> polled. Do not do dequeue from scheduled queue.
> https://bugs.linaro.org/show_bug.cgi?id=1383
>
> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
> ---
>  test/validation/odp_pktio.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/test/validation/odp_pktio.c b/test/validation/odp_pktio.c
> index 7c1a666..e1025d6 100644
> --- a/test/validation/odp_pktio.c
> +++ b/test/validation/odp_pktio.c
> @@ -319,7 +319,8 @@ static odp_packet_t wait_for_packet(odp_queue_t queue,
>         start = odp_time_cycles();
>
>         do {
> -               if (queue != ODP_QUEUE_INVALID)
> +               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);
> --
> 1.9.1
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp
>
Maxim Uvarov June 9, 2015, 5:54 a.m. UTC | #2
Merged,
Maxim.

On 06/09/15 07:53, Bala Manoharan wrote:
> Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org 
> <mailto:bala.manoharan@linaro.org>>
>
> On 2 June 2015 at 20:16, Maxim Uvarov <maxim.uvarov@linaro.org 
> <mailto:maxim.uvarov@linaro.org>> wrote:
>
>     packet i/o test can create 2 types of queues: scheduled and
>     polled. Do not do dequeue from scheduled queue.
>     https://bugs.linaro.org/show_bug.cgi?id=1383
>
>     Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org
>     <mailto:maxim.uvarov@linaro.org>>
>     ---
>      test/validation/odp_pktio.c | 3 ++-
>      1 file changed, 2 insertions(+), 1 deletion(-)
>
>     diff --git a/test/validation/odp_pktio.c b/test/validation/odp_pktio.c
>     index 7c1a666..e1025d6 100644
>     --- a/test/validation/odp_pktio.c
>     +++ b/test/validation/odp_pktio.c
>     @@ -319,7 +319,8 @@ static odp_packet_t
>     wait_for_packet(odp_queue_t queue,
>             start = odp_time_cycles();
>
>             do {
>     -               if (queue != ODP_QUEUE_INVALID)
>     +               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);
>     --
>     1.9.1
>
>     _______________________________________________
>     lng-odp mailing list
>     lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org>
>     https://lists.linaro.org/mailman/listinfo/lng-odp
>
>
diff mbox

Patch

diff --git a/test/validation/odp_pktio.c b/test/validation/odp_pktio.c
index 7c1a666..e1025d6 100644
--- a/test/validation/odp_pktio.c
+++ b/test/validation/odp_pktio.c
@@ -319,7 +319,8 @@  static odp_packet_t wait_for_packet(odp_queue_t queue,
 	start = odp_time_cycles();
 
 	do {
-		if (queue != ODP_QUEUE_INVALID)
+		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);