patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 1/4] test/cycles: restore original delay function
       [not found] <20200424074356.193204-1-ruifeng.wang@arm.com>
@ 2020-04-24  7:43 ` Ruifeng Wang
  2020-07-27 10:16 ` [dpdk-stable] [PATCH v2] " Ruifeng Wang
  2020-07-27 10:21 ` Ruifeng Wang
  2 siblings, 0 replies; 4+ messages in thread
From: Ruifeng Wang @ 2020-04-24  7:43 UTC (permalink / raw)
  To: aconole, maicolgabriel
  Cc: dev, gavin.hu, honnappa.nagarahalli, juraj.linkes, nd,
	Ruifeng Wang, stable

test_delay_us_sleep registers sleep based delay for testing.
The change of default delay function is not expected.

Restore defalut delay function to fix the issue.

Fixes: a51639cc720a ("eal: add nanosleep based delay function")
Cc: stable@dpdk.org

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
---
 app/test/test_cycles.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/app/test/test_cycles.c b/app/test/test_cycles.c
index c78e6a5b1..015a9290f 100644
--- a/app/test/test_cycles.c
+++ b/app/test/test_cycles.c
@@ -79,8 +79,14 @@ REGISTER_TEST_COMMAND(cycles_autotest, test_cycles);
 static int
 test_delay_us_sleep(void)
 {
+	int rv = 0;
+
 	rte_delay_us_callback_register(rte_delay_us_sleep);
-	return check_wait_one_second();
+	rv = check_wait_one_second();
+	/* restore original delay function */
+	rte_delay_us_callback_register(rte_delay_us_block);
+
+	return rv;
 }
 
 REGISTER_TEST_COMMAND(delay_us_sleep_autotest, test_delay_us_sleep);
-- 
2.17.1


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

* [dpdk-stable] [PATCH v2] test/cycles: restore original delay function
       [not found] <20200424074356.193204-1-ruifeng.wang@arm.com>
  2020-04-24  7:43 ` [dpdk-stable] [PATCH 1/4] test/cycles: restore original delay function Ruifeng Wang
@ 2020-07-27 10:16 ` Ruifeng Wang
  2020-07-27 10:21 ` Ruifeng Wang
  2 siblings, 0 replies; 4+ messages in thread
From: Ruifeng Wang @ 2020-07-27 10:16 UTC (permalink / raw)
  Cc: dev, i.maximets, honnappa.nagarahalli, nd, Ruifeng Wang, stable

test_delay_us_sleep registers sleep based delay for testing.
This changes the default delay function of testing environment.
It is not expected.

Restore defalut delay function after the test to fix the issue.

Fixes: a51639cc720a ("eal: add nanosleep based delay function")
Cc: stable@dpdk.org

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
---
v2:
Dropped other patches in the series that are not needed.

 app/test/test_cycles.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/app/test/test_cycles.c b/app/test/test_cycles.c
index c78e6a5b1..015a9290f 100644
--- a/app/test/test_cycles.c
+++ b/app/test/test_cycles.c
@@ -79,8 +79,14 @@ REGISTER_TEST_COMMAND(cycles_autotest, test_cycles);
 static int
 test_delay_us_sleep(void)
 {
+	int rv = 0;
+
 	rte_delay_us_callback_register(rte_delay_us_sleep);
-	return check_wait_one_second();
+	rv = check_wait_one_second();
+	/* restore original delay function */
+	rte_delay_us_callback_register(rte_delay_us_block);
+
+	return rv;
 }
 
 REGISTER_TEST_COMMAND(delay_us_sleep_autotest, test_delay_us_sleep);
-- 
2.17.1


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

* [dpdk-stable] [PATCH v2] test/cycles: restore original delay function
       [not found] <20200424074356.193204-1-ruifeng.wang@arm.com>
  2020-04-24  7:43 ` [dpdk-stable] [PATCH 1/4] test/cycles: restore original delay function Ruifeng Wang
  2020-07-27 10:16 ` [dpdk-stable] [PATCH v2] " Ruifeng Wang
@ 2020-07-27 10:21 ` Ruifeng Wang
  2020-07-27 12:21   ` [dpdk-stable] [dpdk-dev] " David Marchand
  2 siblings, 1 reply; 4+ messages in thread
From: Ruifeng Wang @ 2020-07-27 10:21 UTC (permalink / raw)
  Cc: dev, honnappa.nagarahalli, nd, Ruifeng Wang, stable

test_delay_us_sleep registers sleep based delay for testing.
This changes the default delay function of testing environment.
It is not expected.

Restore default delay function after the test to fix the issue.

Fixes: a51639cc720a ("eal: add nanosleep based delay function")
Cc: stable@dpdk.org

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
---
v2:
Dropped other patches in the series that are not needed.

 app/test/test_cycles.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/app/test/test_cycles.c b/app/test/test_cycles.c
index c78e6a5b1..015a9290f 100644
--- a/app/test/test_cycles.c
+++ b/app/test/test_cycles.c
@@ -79,8 +79,14 @@ REGISTER_TEST_COMMAND(cycles_autotest, test_cycles);
 static int
 test_delay_us_sleep(void)
 {
+	int rv = 0;
+
 	rte_delay_us_callback_register(rte_delay_us_sleep);
-	return check_wait_one_second();
+	rv = check_wait_one_second();
+	/* restore original delay function */
+	rte_delay_us_callback_register(rte_delay_us_block);
+
+	return rv;
 }
 
 REGISTER_TEST_COMMAND(delay_us_sleep_autotest, test_delay_us_sleep);
-- 
2.17.1


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

* Re: [dpdk-stable] [dpdk-dev] [PATCH v2] test/cycles: restore original delay function
  2020-07-27 10:21 ` Ruifeng Wang
@ 2020-07-27 12:21   ` David Marchand
  0 siblings, 0 replies; 4+ messages in thread
From: David Marchand @ 2020-07-27 12:21 UTC (permalink / raw)
  To: Ruifeng Wang; +Cc: dev, Honnappa Nagarahalli, nd, dpdk stable, Ilya Maximets

On Mon, Jul 27, 2020 at 12:22 PM Ruifeng Wang <ruifeng.wang@arm.com> wrote:
>
> test_delay_us_sleep registers sleep based delay for testing.
> This changes the default delay function of testing environment.
> It is not expected.
>
> Restore default delay function after the test to fix the issue.
>
> Fixes: a51639cc720a ("eal: add nanosleep based delay function")
> Cc: stable@dpdk.org
>
> Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
> Reviewed-by: Gavin Hu <gavin.hu@arm.com>
> ---
> v2:
> Dropped other patches in the series that are not needed.
>
>  app/test/test_cycles.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/app/test/test_cycles.c b/app/test/test_cycles.c
> index c78e6a5b1..015a9290f 100644
> --- a/app/test/test_cycles.c
> +++ b/app/test/test_cycles.c
> @@ -79,8 +79,14 @@ REGISTER_TEST_COMMAND(cycles_autotest, test_cycles);
>  static int
>  test_delay_us_sleep(void)
>  {
> +       int rv = 0;

No initialisation needed, I removed it while applying.


> +
>         rte_delay_us_callback_register(rte_delay_us_sleep);
> -       return check_wait_one_second();
> +       rv = check_wait_one_second();
> +       /* restore original delay function */
> +       rte_delay_us_callback_register(rte_delay_us_block);
> +
> +       return rv;
>  }
>
>  REGISTER_TEST_COMMAND(delay_us_sleep_autotest, test_delay_us_sleep);

Reviewed-by: David Marchand <david.marchand@redhat.com>


Applied, thanks.


-- 
David Marchand


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

end of thread, other threads:[~2020-07-27 12:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20200424074356.193204-1-ruifeng.wang@arm.com>
2020-04-24  7:43 ` [dpdk-stable] [PATCH 1/4] test/cycles: restore original delay function Ruifeng Wang
2020-07-27 10:16 ` [dpdk-stable] [PATCH v2] " Ruifeng Wang
2020-07-27 10:21 ` Ruifeng Wang
2020-07-27 12:21   ` [dpdk-stable] [dpdk-dev] " David Marchand

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).