DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] event/dlb2: fix delayed_pop test in dlb2_selftest
@ 2021-11-12 19:48 Rashmi Shetty
  2021-11-12 20:25 ` Chen, Mike Ximing
  2021-11-15 16:34 ` [PATCH v2] " Rashmi Shetty
  0 siblings, 2 replies; 5+ messages in thread
From: Rashmi Shetty @ 2021-11-12 19:48 UTC (permalink / raw)
  To: dev
  Cc: jerinj, harry.van.haaren, pravin.pathak, mike.ximing.chen,
	timothy.mcdaniel, Rashmi Shetty

Number of events scheduled and available for dequeue
after token pop was set to dequeue_depth-1 instead of
dequeue_depth in test_delayed_pop. The expectation is
that all dequeue_depth number of events can be dequeued
once the last event is released.

Signed-off-by: Rashmi Shetty <rashmi.shetty@intel.com>
---
 drivers/event/dlb2/dlb2_selftest.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/drivers/event/dlb2/dlb2_selftest.c b/drivers/event/dlb2/dlb2_selftest.c
index 5cf66c552c..2113bc2c99 100644
--- a/drivers/event/dlb2/dlb2_selftest.c
+++ b/drivers/event/dlb2/dlb2_selftest.c
@@ -1354,7 +1354,7 @@ test_delayed_pop(void)
 	}
 
 	/* Release one more event. This will trigger the token pop, and
-	 * dequeue_depth - 1 more events will be scheduled to the device.
+	 * dequeue_depth more events will be scheduled to the device.
 	 */
 	ev.op = RTE_EVENT_OP_RELEASE;
 
@@ -1366,7 +1366,7 @@ test_delayed_pop(void)
 
 	timeout = 0xFFFFFFFFF;
 
-	for (i = 0; i < port_conf.dequeue_depth - 1; i++) {
+	for (i = 0; i < port_conf.dequeue_depth; i++) {
 		if (rte_event_dequeue_burst(evdev, 0, &ev, 1, timeout) != 1) {
 			printf("%d: event dequeue expected to succeed\n",
 			       __LINE__);
@@ -1374,14 +1374,6 @@ test_delayed_pop(void)
 		}
 	}
 
-	timeout = 0x10000;
-
-	if (rte_event_dequeue_burst(evdev, 0, &ev, 1, timeout) != 0) {
-		printf("%d: event dequeue expected to fail\n",
-		       __LINE__);
-		goto err;
-	}
-
 	cleanup();
 	return 0;
 
-- 
2.25.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH] event/dlb2: fix delayed_pop test in dlb2_selftest
  2021-11-12 19:48 [PATCH] event/dlb2: fix delayed_pop test in dlb2_selftest Rashmi Shetty
@ 2021-11-12 20:25 ` Chen, Mike Ximing
  2021-11-15  8:29   ` Jerin Jacob
  2021-11-15 16:34 ` [PATCH v2] " Rashmi Shetty
  1 sibling, 1 reply; 5+ messages in thread
From: Chen, Mike Ximing @ 2021-11-12 20:25 UTC (permalink / raw)
  To: Shetty, Rashmi, dev
  Cc: jerinj, Van Haaren, Harry, Pathak, Pravin, McDaniel, Timothy



> -----Original Message-----
> From: Shetty, Rashmi <rashmi.shetty@intel.com>
> Sent: Friday, November 12, 2021 2:49 PM
> To: dev@dpdk.org
> Cc: jerinj@marvell.com; Van Haaren, Harry <harry.van.haaren@intel.com>; Pathak, Pravin
> <pravin.pathak@intel.com>; Chen, Mike Ximing <mike.ximing.chen@intel.com>; McDaniel, Timothy
> <timothy.mcdaniel@intel.com>; Shetty, Rashmi <rashmi.shetty@intel.com>
> Subject: [PATCH] event/dlb2: fix delayed_pop test in dlb2_selftest
> 
> Number of events scheduled and available for dequeue after token pop was set to dequeue_depth-1
> instead of dequeue_depth in test_delayed_pop. The expectation is that all dequeue_depth number of
> events can be dequeued once the last event is released.
> 
> Signed-off-by: Rashmi Shetty <rashmi.shetty@intel.com>
> ---
>  drivers/event/dlb2/dlb2_selftest.c | 12 ++----------
>  1 file changed, 2 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/event/dlb2/dlb2_selftest.c b/drivers/event/dlb2/dlb2_selftest.c
> index 5cf66c552c..2113bc2c99 100644
> --- a/drivers/event/dlb2/dlb2_selftest.c
> +++ b/drivers/event/dlb2/dlb2_selftest.c
> @@ -1354,7 +1354,7 @@ test_delayed_pop(void)
>  	}
> 
>  	/* Release one more event. This will trigger the token pop, and
> -	 * dequeue_depth - 1 more events will be scheduled to the device.
> +	 * dequeue_depth more events will be scheduled to the device.
>  	 */
>  	ev.op = RTE_EVENT_OP_RELEASE;
> 
> @@ -1366,7 +1366,7 @@ test_delayed_pop(void)
> 
>  	timeout = 0xFFFFFFFFF;
> 
> -	for (i = 0; i < port_conf.dequeue_depth - 1; i++) {
> +	for (i = 0; i < port_conf.dequeue_depth; i++) {
>  		if (rte_event_dequeue_burst(evdev, 0, &ev, 1, timeout) != 1) {
>  			printf("%d: event dequeue expected to succeed\n",
>  			       __LINE__);
> @@ -1374,14 +1374,6 @@ test_delayed_pop(void)
>  		}
>  	}
> 
> -	timeout = 0x10000;
> -
> -	if (rte_event_dequeue_burst(evdev, 0, &ev, 1, timeout) != 0) {
> -		printf("%d: event dequeue expected to fail\n",
> -		       __LINE__);
> -		goto err;
> -	}
> -
>  	cleanup();
>  	return 0;
> 
> --
> 2.25.1

Looks good.
Reviewed-by: Mike Ximing Chen <mike.ximing.chen@intel.con>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] event/dlb2: fix delayed_pop test in dlb2_selftest
  2021-11-12 20:25 ` Chen, Mike Ximing
@ 2021-11-15  8:29   ` Jerin Jacob
  0 siblings, 0 replies; 5+ messages in thread
From: Jerin Jacob @ 2021-11-15  8:29 UTC (permalink / raw)
  To: Chen, Mike Ximing
  Cc: Shetty, Rashmi, dev, jerinj, Van Haaren, Harry, Pathak, Pravin,
	McDaniel, Timothy

On Sat, Nov 13, 2021 at 2:33 AM Chen, Mike Ximing
<mike.ximing.chen@intel.com> wrote:
>
>
>
> > -----Original Message-----
> > From: Shetty, Rashmi <rashmi.shetty@intel.com>
> > Sent: Friday, November 12, 2021 2:49 PM
> > To: dev@dpdk.org
> > Cc: jerinj@marvell.com; Van Haaren, Harry <harry.van.haaren@intel.com>; Pathak, Pravin
> > <pravin.pathak@intel.com>; Chen, Mike Ximing <mike.ximing.chen@intel.com>; McDaniel, Timothy
> > <timothy.mcdaniel@intel.com>; Shetty, Rashmi <rashmi.shetty@intel.com>
> > Subject: [PATCH] event/dlb2: fix delayed_pop test in dlb2_selftest
> >
> > Number of events scheduled and available for dequeue after token pop was set to dequeue_depth-1
> > instead of dequeue_depth in test_delayed_pop. The expectation is that all dequeue_depth number of
> > events can be dequeued once the last event is released.
> >
> > Signed-off-by: Rashmi Shetty <rashmi.shetty@intel.com>
> > ---
> >  drivers/event/dlb2/dlb2_selftest.c | 12 ++----------
> >  1 file changed, 2 insertions(+), 10 deletions(-)
> >
> > diff --git a/drivers/event/dlb2/dlb2_selftest.c b/drivers/event/dlb2/dlb2_selftest.c
> > index 5cf66c552c..2113bc2c99 100644
> > --- a/drivers/event/dlb2/dlb2_selftest.c
> > +++ b/drivers/event/dlb2/dlb2_selftest.c
> > @@ -1354,7 +1354,7 @@ test_delayed_pop(void)
> >       }
> >
> >       /* Release one more event. This will trigger the token pop, and
> > -      * dequeue_depth - 1 more events will be scheduled to the device.
> > +      * dequeue_depth more events will be scheduled to the device.
> >        */
> >       ev.op = RTE_EVENT_OP_RELEASE;
> >
> > @@ -1366,7 +1366,7 @@ test_delayed_pop(void)
> >
> >       timeout = 0xFFFFFFFFF;
> >
> > -     for (i = 0; i < port_conf.dequeue_depth - 1; i++) {
> > +     for (i = 0; i < port_conf.dequeue_depth; i++) {
> >               if (rte_event_dequeue_burst(evdev, 0, &ev, 1, timeout) != 1) {
> >                       printf("%d: event dequeue expected to succeed\n",
> >                              __LINE__);
> > @@ -1374,14 +1374,6 @@ test_delayed_pop(void)
> >               }
> >       }
> >
> > -     timeout = 0x10000;
> > -
> > -     if (rte_event_dequeue_burst(evdev, 0, &ev, 1, timeout) != 0) {
> > -             printf("%d: event dequeue expected to fail\n",
> > -                    __LINE__);
> > -             goto err;
> > -     }
> > -
> >       cleanup();
> >       return 0;
> >
> > --
> > 2.25.1
>
> Looks good.
> Reviewed-by: Mike Ximing Chen <mike.ximing.chen@intel.con>


Please fix


[for-main]dell[dpdk-next-eventdev] $ ./devtools/check-git-log.sh -n 1
Wrong headline format:
        event/dlb2: fix delayed_pop test in dlb2_selftest
Missing 'Fixes' tag:
        event/dlb2: fix delayed_pop test in dlb2_selftest

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2] event/dlb2: fix delayed_pop test in dlb2_selftest
  2021-11-12 19:48 [PATCH] event/dlb2: fix delayed_pop test in dlb2_selftest Rashmi Shetty
  2021-11-12 20:25 ` Chen, Mike Ximing
@ 2021-11-15 16:34 ` Rashmi Shetty
  2021-11-16  7:07   ` Jerin Jacob
  1 sibling, 1 reply; 5+ messages in thread
From: Rashmi Shetty @ 2021-11-15 16:34 UTC (permalink / raw)
  To: dev
  Cc: jerinj, harry.van.haaren, pravin.pathak, mike.ximing.chen,
	timothy.mcdaniel, Rashmi Shetty

Number of events scheduled and available for dequeue
after token pop was set to dequeue_depth-1 instead of
dequeue_depth in test_delayed_pop. The expectation is
that all dequeue_depth number of events can be dequeued
once the last event is released.

Fixes: a10e8e96865f ("event/dlb2: add delayed token pop logic")

Signed-off-by: Rashmi Shetty <rashmi.shetty@intel.com>

---

v2:
 - Updated commit message with 'Fixes' tag (Jerin)

---
 drivers/event/dlb2/dlb2_selftest.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/drivers/event/dlb2/dlb2_selftest.c b/drivers/event/dlb2/dlb2_selftest.c
index 5cf66c552c..2113bc2c99 100644
--- a/drivers/event/dlb2/dlb2_selftest.c
+++ b/drivers/event/dlb2/dlb2_selftest.c
@@ -1354,7 +1354,7 @@ test_delayed_pop(void)
 	}
 
 	/* Release one more event. This will trigger the token pop, and
-	 * dequeue_depth - 1 more events will be scheduled to the device.
+	 * dequeue_depth more events will be scheduled to the device.
 	 */
 	ev.op = RTE_EVENT_OP_RELEASE;
 
@@ -1366,7 +1366,7 @@ test_delayed_pop(void)
 
 	timeout = 0xFFFFFFFFF;
 
-	for (i = 0; i < port_conf.dequeue_depth - 1; i++) {
+	for (i = 0; i < port_conf.dequeue_depth; i++) {
 		if (rte_event_dequeue_burst(evdev, 0, &ev, 1, timeout) != 1) {
 			printf("%d: event dequeue expected to succeed\n",
 			       __LINE__);
@@ -1374,14 +1374,6 @@ test_delayed_pop(void)
 		}
 	}
 
-	timeout = 0x10000;
-
-	if (rte_event_dequeue_burst(evdev, 0, &ev, 1, timeout) != 0) {
-		printf("%d: event dequeue expected to fail\n",
-		       __LINE__);
-		goto err;
-	}
-
 	cleanup();
 	return 0;
 
-- 
2.25.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] event/dlb2: fix delayed_pop test in dlb2_selftest
  2021-11-15 16:34 ` [PATCH v2] " Rashmi Shetty
@ 2021-11-16  7:07   ` Jerin Jacob
  0 siblings, 0 replies; 5+ messages in thread
From: Jerin Jacob @ 2021-11-16  7:07 UTC (permalink / raw)
  To: Rashmi Shetty
  Cc: dpdk-dev, Jerin Jacob, Van Haaren, Harry, Pathak, Pravin, Chen,
	Mike Ximing, McDaniel, Timothy

On Mon, Nov 15, 2021 at 10:04 PM Rashmi Shetty <rashmi.shetty@intel.com> wrote:
>
> Number of events scheduled and available for dequeue
> after token pop was set to dequeue_depth-1 instead of
> dequeue_depth in test_delayed_pop. The expectation is
> that all dequeue_depth number of events can be dequeued
> once the last event is released.
>
> Fixes: a10e8e96865f ("event/dlb2: add delayed token pop logic")
>
> Signed-off-by: Rashmi Shetty <rashmi.shetty@intel.com>
>
> ---
>
> v2:
>  - Updated commit message with 'Fixes' tag (Jerin)

Update git commit  as

Author: Rashmi Shetty <rashmi.shetty@intel.com>
Date:   Mon Nov 15 10:34:44 2021 -0600

    event/dlb2: fix delayed pop test in selftest

    Number of events scheduled and available for dequeue
    after token pop was set to dequeue_depth-1 instead of
    dequeue_depth in test_delayed_pop. The expectation is
    that all dequeue_depth number of events can be dequeued
    once the last event is released.

    Fixes: 07d55c418d47 ("event/dlb2: add delayed token pop logic")
    Cc: stable@dpdk.org

    Signed-off-by: Rashmi Shetty <rashmi.shetty@intel.com>
    Reviewed-by: Mike Ximing Chen <mike.ximing.chen@intel.con>

Applied to dpdk-next-net-eventdev/for-main. Thanks




>
> ---
>  drivers/event/dlb2/dlb2_selftest.c | 12 ++----------
>  1 file changed, 2 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/event/dlb2/dlb2_selftest.c b/drivers/event/dlb2/dlb2_selftest.c
> index 5cf66c552c..2113bc2c99 100644
> --- a/drivers/event/dlb2/dlb2_selftest.c
> +++ b/drivers/event/dlb2/dlb2_selftest.c
> @@ -1354,7 +1354,7 @@ test_delayed_pop(void)
>         }
>
>         /* Release one more event. This will trigger the token pop, and
> -        * dequeue_depth - 1 more events will be scheduled to the device.
> +        * dequeue_depth more events will be scheduled to the device.
>          */
>         ev.op = RTE_EVENT_OP_RELEASE;
>
> @@ -1366,7 +1366,7 @@ test_delayed_pop(void)
>
>         timeout = 0xFFFFFFFFF;
>
> -       for (i = 0; i < port_conf.dequeue_depth - 1; i++) {
> +       for (i = 0; i < port_conf.dequeue_depth; i++) {
>                 if (rte_event_dequeue_burst(evdev, 0, &ev, 1, timeout) != 1) {
>                         printf("%d: event dequeue expected to succeed\n",
>                                __LINE__);
> @@ -1374,14 +1374,6 @@ test_delayed_pop(void)
>                 }
>         }
>
> -       timeout = 0x10000;
> -
> -       if (rte_event_dequeue_burst(evdev, 0, &ev, 1, timeout) != 0) {
> -               printf("%d: event dequeue expected to fail\n",
> -                      __LINE__);
> -               goto err;
> -       }
> -
>         cleanup();
>         return 0;
>
> --
> 2.25.1
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-11-16  7:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-12 19:48 [PATCH] event/dlb2: fix delayed_pop test in dlb2_selftest Rashmi Shetty
2021-11-12 20:25 ` Chen, Mike Ximing
2021-11-15  8:29   ` Jerin Jacob
2021-11-15 16:34 ` [PATCH v2] " Rashmi Shetty
2021-11-16  7:07   ` Jerin Jacob

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).