Skip to contentSkip to conversation

test/meson: fix hash readwrite timeout failure

PATCH In review [email protected] 6 participants 38 messages Sep 6, 2019 – Feb 5, 2020 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

cover test/meson: fix hash readwrite timeout failure

From: Amit Gupta <[email protected]>

V1 changes:
* hash_readwrite and hash_readwrite lockfree meson test was taking longer time to complete. The test always get TIMEOUT.
* hash readwrtie test is split into functional and perf tests and moved to dpdk fast and perf testsuite accordingly.
* hash readwrite lockfree is moved to dpdk perf testsuite.

Amit Gupta (2):
test/meson: hash test split into shorter subtests test/meson: hash lf test moved to dpdk perf testsuite

 app/test/meson.build           |   5 +-
 app/test/test_hash_readwrite.c | 146 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 149 insertions(+), 2 deletions(-)
Signature · 1 line
1.8.3.1
#1 lore raw

PATCH 1/2 test/meson: hash test split into shorter subtests

From: Amit Gupta <[email protected]>

hash_readwrite meson test was taking longer time to complete. The test always get TIMEOUT, hence test is split into functional and perf test. perf test is being moved under dpdk perf testsuites in meson build.

---
 app/test/meson.build           |   3 +-
 app/test/test_hash_readwrite.c | 146 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 148 insertions(+), 1 deletion(-)
app/test/meson.build +2 -1
index ec40943..94fd9f8 100644
@@ -219,7 +219,7 @@ fast_test_names = [
         'distributor_autotest',
         'eventdev_common_autotest',
         'fbarray_autotest',
-        'hash_readwrite_autotest',
+        'hash_readwrite_func_autotest',
         'hash_readwrite_lf_autotest',
         'ipsec_autotest',
         'kni_autotest',
@@ -262,6 +262,7 @@ perf_test_names = [
         'stack_perf_autotest',
         'stack_lf_perf_autotest',
         'rand_perf_autotest',
+        'hash_readwrite_perf_autotest',
 ]
 
 driver_test_names = [
app/test/test_hash_readwrite.c +146 -0

155 lines not on this page · raw message

Signature · 1 line
1.8.3.1
Acked-by on v1 1/2
#2 lore raw

Re: [dpdk-dev] [PATCH 1/2] test/meson: hash test split into shorter subtests

Quoted 8 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: Thursday, September 5, 2019 10:50 PM
To: Wang, Yipeng1 <[email protected]>; Gobriel, Sameh <[email protected]>; Richardson, Bruce <[email protected]>; De Lara Guarch, Pablo <[email protected]>
Cc: [email protected]; Amit Gupta <[email protected]>
Subject: [PATCH 1/2] test/meson: hash test split into shorter subtests

Quoted 8 lines

From: Amit Gupta <[email protected]>

hash_readwrite meson test was taking longer time to complete. The test always get TIMEOUT, hence test is split into functional and perf test. perf test is being moved under dpdk perf testsuites in meson build.

[Wang, Yipeng]

Thanks for the patch!

author
#3 lore raw

Re: [dpdk-dev] [PATCH 1/2] test/meson: hash test split into shorter subtests

Quoted 33 lines

-----Original Message-----
From: Wang, Yipeng1 <[email protected]>
Sent: Wednesday, September 11, 2019 10:35 PM
To: Amit Gupta <[email protected]>; Gobriel, Sameh <[email protected]>; Richardson, Bruce <[email protected]>; De Lara Guarch, Pablo <[email protected]>
Cc: [email protected]
Subject: [EXT] RE: [PATCH 1/2] test/meson: hash test split into shorter subtests

External Email

----------------------------------------------------------------------

Quoted 17 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: Thursday, September 5, 2019 10:50 PM
To: Wang, Yipeng1 <[email protected]>; Gobriel, Sameh <[email protected]>; Richardson, Bruce <[email protected]>; De Lara Guarch, Pablo <[email protected]>
Cc: [email protected]; Amit Gupta <[email protected]>
Subject: [PATCH 1/2] test/meson: hash test split into shorter subtests

From: Amit Gupta <[email protected]>

hash_readwrite meson test was taking longer time to complete. The test always get TIMEOUT, hence test is split into functional and perf test. perf test is being moved under dpdk perf testsuites in meson build.

Quoted 6 lines
Quoted 1 line
[Wang, Yipeng]

Thanks for the patch!

@Wang, Yipeng1, any plan on taking this patch ?

Regards,
Amit

author
#4 lore raw

Re: [dpdk-dev] [PATCH 1/2] test/meson: hash test split into shorter subtests

Ping!

Quoted 56 lines

-----Original Message-----
From: Amit Gupta
Sent: Thursday, October 17, 2019 10:33 AM
To: Wang, Yipeng1 <[email protected]>; Gobriel, Sameh <[email protected]>; Richardson, Bruce <[email protected]>; De Lara Guarch, Pablo <[email protected]>
Cc: [email protected]
Subject: RE: [PATCH 1/2] test/meson: hash test split into shorter subtests

Quoted 32 lines

-----Original Message-----
From: Wang, Yipeng1 <[email protected]>
Sent: Wednesday, September 11, 2019 10:35 PM
To: Amit Gupta <[email protected]>; Gobriel, Sameh <[email protected]>; Richardson, Bruce <[email protected]>; De Lara Guarch, Pablo <[email protected]>
Cc: [email protected]
Subject: [EXT] RE: [PATCH 1/2] test/meson: hash test split into shorter subtests

External Email

----------------------------------------------------------------------

Quoted 18 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: Thursday, September 5, 2019 10:50 PM
To: Wang, Yipeng1 <[email protected]>; Gobriel, Sameh <[email protected]>; Richardson, Bruce <[email protected]>; De Lara Guarch, Pablo <[email protected]>
Cc: [email protected]; Amit Gupta <[email protected]>
Subject: [PATCH 1/2] test/meson: hash test split into shorter subtests

From: Amit Gupta <[email protected]>

hash_readwrite meson test was taking longer time to complete. The test always get TIMEOUT, hence test is split into functional and perf test. perf test is being moved under dpdk perf testsuites in meson build.

Quoted 6 lines
Quoted 1 line
[Wang, Yipeng]

Thanks for the patch!

@Wang, Yipeng1, any plan on taking this patch ?

Regards,
Amit

#5 lore raw

Re: [dpdk-dev] [PATCH 1/2] test/meson: hash test split into shorter subtests

Hi, Amit,

I think I acked this patch. But from patchwork seems you superseded this patch set accidentally. So Thomas might have missed it. To make his life easier, you may submit a newer version with my acked. I believe Thomas will see it.

Thanks
Yipeng

Quoted 67 lines

-----Original Message-----
From: Amit Gupta [mailto:[email protected]]
Sent: Thursday, October 31, 2019 9:54 PM
To: Wang, Yipeng1 <[email protected]>; Gobriel, Sameh <[email protected]>; Richardson, Bruce <[email protected]>; De Lara Guarch, Pablo <[email protected]>; Jerin Jacob Kollanukkaran <[email protected]>
Cc: [email protected]
Subject: RE: [PATCH 1/2] test/meson: hash test split into shorter subtests

Ping!

Quoted 56 lines

-----Original Message-----
From: Amit Gupta
Sent: Thursday, October 17, 2019 10:33 AM
To: Wang, Yipeng1 <[email protected]>; Gobriel, Sameh <[email protected]>; Richardson, Bruce <[email protected]>; De Lara Guarch, Pablo <[email protected]>
Cc: [email protected]
Subject: RE: [PATCH 1/2] test/meson: hash test split into shorter subtests

Quoted 32 lines

-----Original Message-----
From: Wang, Yipeng1 <[email protected]>
Sent: Wednesday, September 11, 2019 10:35 PM
To: Amit Gupta <[email protected]>; Gobriel, Sameh <[email protected]>; Richardson, Bruce <[email protected]>; De Lara Guarch, Pablo <[email protected]>
Cc: [email protected]
Subject: [EXT] RE: [PATCH 1/2] test/meson: hash test split into shorter subtests

External Email

----------------------------------------------------------------------

Quoted 18 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: Thursday, September 5, 2019 10:50 PM
To: Wang, Yipeng1 <[email protected]>; Gobriel, Sameh <[email protected]>; Richardson, Bruce <[email protected]>; De Lara Guarch, Pablo <[email protected]>
Cc: [email protected]; Amit Gupta <[email protected]>
Subject: [PATCH 1/2] test/meson: hash test split into shorter subtests

From: Amit Gupta <[email protected]>

hash_readwrite meson test was taking longer time to complete. The test always get TIMEOUT, hence test is split into functional and perf test. perf test is being moved under dpdk perf testsuites in meson build.

Quoted 6 lines
Quoted 1 line
[Wang, Yipeng]

Thanks for the patch!

@Wang, Yipeng1, any plan on taking this patch ?

Regards,
Amit

#6 lore raw

Re: [dpdk-dev] [PATCH 1/2] test/meson: hash test split into shorter subtests

Quoted 4 lines · On 11/1/2019 5:04 PM, Wang, Yipeng1 wrote:

Hi, Amit,

I think I acked this patch. But from patchwork seems you superseded this patch set accidentally. So Thomas might have missed it. To make his life easier, you may submit a newer version with my acked. I believe Thomas will see it.

cc'ed David.

Hi Amit,

The patch is in "Superseded" state as Yipeng said, as far as I understand that is not the case, I am updating their status as "New". Can you please confirm this is the correct state?

Quoted 71 lines

Thanks
Yipeng

Quoted 67 lines

-----Original Message-----
From: Amit Gupta [mailto:[email protected]]
Sent: Thursday, October 31, 2019 9:54 PM
To: Wang, Yipeng1 <[email protected]>; Gobriel, Sameh <[email protected]>; Richardson, Bruce <[email protected]>; De Lara Guarch, Pablo <[email protected]>; Jerin Jacob Kollanukkaran <[email protected]>
Cc: [email protected]
Subject: RE: [PATCH 1/2] test/meson: hash test split into shorter subtests

Ping!

Quoted 56 lines

-----Original Message-----
From: Amit Gupta
Sent: Thursday, October 17, 2019 10:33 AM
To: Wang, Yipeng1 <[email protected]>; Gobriel, Sameh <[email protected]>; Richardson, Bruce <[email protected]>; De Lara Guarch, Pablo <[email protected]>
Cc: [email protected]
Subject: RE: [PATCH 1/2] test/meson: hash test split into shorter subtests

Quoted 32 lines

-----Original Message-----
From: Wang, Yipeng1 <[email protected]>
Sent: Wednesday, September 11, 2019 10:35 PM
To: Amit Gupta <[email protected]>; Gobriel, Sameh <[email protected]>; Richardson, Bruce <[email protected]>; De Lara Guarch, Pablo <[email protected]>
Cc: [email protected]
Subject: [EXT] RE: [PATCH 1/2] test/meson: hash test split into shorter subtests

External Email

----------------------------------------------------------------------

Quoted 18 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: Thursday, September 5, 2019 10:50 PM
To: Wang, Yipeng1 <[email protected]>; Gobriel, Sameh <[email protected]>; Richardson, Bruce <[email protected]>; De Lara Guarch, Pablo <[email protected]>
Cc: [email protected]; Amit Gupta <[email protected]>
Subject: [PATCH 1/2] test/meson: hash test split into shorter subtests

From: Amit Gupta <[email protected]>

hash_readwrite meson test was taking longer time to complete. The test always get TIMEOUT, hence test is split into functional and perf test. perf test is being moved under dpdk perf testsuites in meson build.

Quoted 6 lines
Quoted 1 line
[Wang, Yipeng]

Thanks for the patch!

@Wang, Yipeng1, any plan on taking this patch ?

Regards,
Amit

author
#7 lore raw

Re: [dpdk-dev] [EXT] Re: [PATCH 1/2] test/meson: hash test split into shorter subtests

Hi Yipeng,

Thanks for changing the state to 'New'. Yes this patch was wrongly Superseded.

Regards,
Amit

Quoted 105 lines

-----Original Message-----
From: Ferruh Yigit <[email protected]>
Sent: Tuesday, November 5, 2019 10:07 PM
To: Wang, Yipeng1 <[email protected]>; Amit Gupta <[email protected]>; Gobriel, Sameh <[email protected]>; Thomas Monjalon <[email protected]>
Cc: [email protected]; David Marchand <[email protected]>
Subject: [EXT] Re: [dpdk-dev] [PATCH 1/2] test/meson: hash test split into shorter subtests

External Email

----------------------------------------------------------------------

Quoted 3 lines · On 11/1/2019 5:04 PM, Wang, Yipeng1 wrote:

Hi, Amit,

I think I acked this patch. But from patchwork seems you superseded this

patch set accidentally. So Thomas might have missed it.

Quoted 1 line

To make his life easier, you may submit a newer version with my acked. I

believe Thomas will see it.

cc'ed David.

Hi Amit,

The patch is in "Superseded" state as Yipeng said, as far as I understand that is not the case, I am updating their status as "New". Can you please confirm this is the correct state?

Quoted 76 lines

Thanks
Yipeng

Quoted 72 lines

-----Original Message-----
From: Amit Gupta [mailto:[email protected]]
Sent: Thursday, October 31, 2019 9:54 PM
To: Wang, Yipeng1 <[email protected]>; Gobriel, Sameh <[email protected]>; Richardson, Bruce <[email protected]>; De Lara Guarch, Pablo <[email protected]>; Jerin Jacob Kollanukkaran <[email protected]>
Cc: [email protected]
Subject: RE: [PATCH 1/2] test/meson: hash test split into shorter subtests

Ping!

Quoted 58 lines

-----Original Message-----
From: Amit Gupta
Sent: Thursday, October 17, 2019 10:33 AM
To: Wang, Yipeng1 <[email protected]>; Gobriel, Sameh <[email protected]>; Richardson, Bruce <[email protected]>; De Lara Guarch, Pablo <[email protected]>
Cc: [email protected]
Subject: RE: [PATCH 1/2] test/meson: hash test split into shorter subtests

Quoted 33 lines

-----Original Message-----
From: Wang, Yipeng1 <[email protected]>
Sent: Wednesday, September 11, 2019 10:35 PM
To: Amit Gupta <[email protected]>; Gobriel, Sameh <[email protected]>; Richardson, Bruce <[email protected]>; De Lara Guarch, Pablo <[email protected]>
Cc: [email protected]
Subject: [EXT] RE: [PATCH 1/2] test/meson: hash test split into shorter subtests

External Email

-------------------------------------------------------------------
---

Quoted 18 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: Thursday, September 5, 2019 10:50 PM
To: Wang, Yipeng1 <[email protected]>; Gobriel, Sameh <[email protected]>; Richardson, Bruce <[email protected]>; De Lara Guarch, Pablo <[email protected]>
Cc: [email protected]; Amit Gupta <[email protected]>
Subject: [PATCH 1/2] test/meson: hash test split into shorter subtests

From: Amit Gupta <[email protected]>

hash_readwrite meson test was taking longer time to complete. The test always get TIMEOUT, hence test is split into functional and perf test. perf test is being moved under dpdk perf testsuites in meson build.

Quoted 6 lines
Quoted 1 line
[Wang, Yipeng]

Thanks for the patch!

@Wang, Yipeng1, any plan on taking this patch ?

Regards,
Amit

author
#8 lore raw

Re: [dpdk-dev] [EXT] Re: [PATCH 1/2] test/meson: hash test split into shorter subtests

Ping!

Any plan to merge this change ?

Regards,
Amit

Quoted 127 lines

-----Original Message-----
From: Amit Gupta
Sent: Thursday, November 7, 2019 9:03 AM
To: Ferruh Yigit <[email protected]>; Wang, Yipeng1 <[email protected]>; Gobriel, Sameh <[email protected]>; Thomas Monjalon <[email protected]>
Cc: [email protected]; David Marchand <[email protected]>
Subject: RE: [EXT] Re: [dpdk-dev] [PATCH 1/2] test/meson: hash test split into shorter subtests

Hi Yipeng,

Thanks for changing the state to 'New'. Yes this patch was wrongly Superseded.

Regards,
Amit

Quoted 108 lines

-----Original Message-----
From: Ferruh Yigit <[email protected]>
Sent: Tuesday, November 5, 2019 10:07 PM
To: Wang, Yipeng1 <[email protected]>; Amit Gupta <[email protected]>; Gobriel, Sameh <[email protected]>; Thomas Monjalon <[email protected]>
Cc: [email protected]; David Marchand <[email protected]>
Subject: [EXT] Re: [dpdk-dev] [PATCH 1/2] test/meson: hash test split into shorter subtests

External Email

----------------------------------------------------------------------

Quoted 4 lines · On 11/1/2019 5:04 PM, Wang, Yipeng1 wrote:

Hi, Amit,

I think I acked this patch. But from patchwork seems you superseded this

patch set accidentally. So Thomas might have missed it.

Quoted 2 lines

To make his life easier, you may submit a newer version with my acked. I

believe Thomas will see it.

cc'ed David.

Hi Amit,

The patch is in "Superseded" state as Yipeng said, as far as I understand that is not the case, I am updating their status as "New". Can you please confirm this is the correct state?

Quoted 77 lines

Thanks
Yipeng

Quoted 73 lines

-----Original Message-----
From: Amit Gupta [mailto:[email protected]]
Sent: Thursday, October 31, 2019 9:54 PM
To: Wang, Yipeng1 <[email protected]>; Gobriel, Sameh <[email protected]>; Richardson, Bruce <[email protected]>; De Lara Guarch, Pablo <[email protected]>; Jerin Jacob Kollanukkaran <[email protected]>
Cc: [email protected]
Subject: RE: [PATCH 1/2] test/meson: hash test split into shorter subtests

Ping!

Quoted 59 lines

-----Original Message-----
From: Amit Gupta
Sent: Thursday, October 17, 2019 10:33 AM
To: Wang, Yipeng1 <[email protected]>; Gobriel, Sameh <[email protected]>; Richardson, Bruce <[email protected]>; De Lara Guarch, Pablo <[email protected]>
Cc: [email protected]
Subject: RE: [PATCH 1/2] test/meson: hash test split into shorter subtests

Quoted 34 lines

-----Original Message-----
From: Wang, Yipeng1 <[email protected]>
Sent: Wednesday, September 11, 2019 10:35 PM
To: Amit Gupta <[email protected]>; Gobriel, Sameh <[email protected]>; Richardson, Bruce <[email protected]>; De Lara Guarch, Pablo <[email protected]>
Cc: [email protected]
Subject: [EXT] RE: [PATCH 1/2] test/meson: hash test split into shorter subtests

External Email

-----------------------------------------------------------------
--
---

Quoted 18 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: Thursday, September 5, 2019 10:50 PM
To: Wang, Yipeng1 <[email protected]>; Gobriel, Sameh <[email protected]>; Richardson, Bruce <[email protected]>; De Lara Guarch, Pablo <[email protected]>
Cc: [email protected]; Amit Gupta <[email protected]>
Subject: [PATCH 1/2] test/meson: hash test split into shorter subtests

From: Amit Gupta <[email protected]>

hash_readwrite meson test was taking longer time to complete. The test always get TIMEOUT, hence test is split into functional and perf test. perf test is being moved under dpdk perf testsuites in meson build.

Quoted 6 lines
Quoted 1 line
[Wang, Yipeng]

Thanks for the patch!

@Wang, Yipeng1, any plan on taking this patch ?

Regards,
Amit

#9 lore raw

PATCH 2/2 test/meson: hash lf test moved to dpdk perf testsuite

In reply to [email protected]

From: Amit Gupta <[email protected]>

hash_readwrite_lf test always getting TIMEOUT as required time to finish this test was much longer compare to time required for fast tests(10s). Hence, the test is being moved to perf test category for its execution to complete.

---
 app/test/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
app/test/meson.build +1 -1
index 94fd9f8..34141c5 100644
@@ -220,7 +220,6 @@ fast_test_names = [
         'eventdev_common_autotest',
         'fbarray_autotest',
         'hash_readwrite_func_autotest',
-        'hash_readwrite_lf_autotest',
         'ipsec_autotest',
         'kni_autotest',
         'kvargs_autotest',
@@ -263,6 +262,7 @@ perf_test_names = [
         'stack_lf_perf_autotest',
         'rand_perf_autotest',
         'hash_readwrite_perf_autotest',
+        'hash_readwrite_lf_autotest',
 ]
 
 driver_test_names = [
Signature · 1 line
1.8.3.1
#10 lore raw

Re: [dpdk-dev] [PATCH 2/2] test/meson: hash lf test moved to dpdk perf testsuite

Quoted 39 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: Thursday, September 5, 2019 10:50 PM
To: Wang, Yipeng1 <[email protected]>; Gobriel, Sameh <[email protected]>; Richardson, Bruce <[email protected]>; De Lara Guarch, Pablo <[email protected]>
Cc: [email protected]; Amit Gupta <[email protected]>
Subject: [PATCH 2/2] test/meson: hash lf test moved to dpdk perf testsuite

From: Amit Gupta <[email protected]>

hash_readwrite_lf test always getting TIMEOUT as required time to finish this test was much longer compare to time required for fast tests(10s). Hence, the test is being moved to perf test category for its execution to complete.

---
app/test/meson.build | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
app/test/meson.build +1 -1
index 94fd9f8..34141c5 100644
@@ -220,7 +220,6 @@ fast_test_names = [
        'eventdev_common_autotest',
        'fbarray_autotest',
        'hash_readwrite_func_autotest',
-        'hash_readwrite_lf_autotest',
        'ipsec_autotest',
        'kni_autotest',
        'kvargs_autotest',
@@ -263,6 +262,7 @@ perf_test_names = [
        'stack_lf_perf_autotest',
        'rand_perf_autotest',
        'hash_readwrite_perf_autotest',
+        'hash_readwrite_lf_autotest',

]

Quoted 3 lines

driver_test_names = [
--
1.8.3.1

[Wang, Yipeng]
I believe the lf_autotest includes functional test as well which is critical for testing the lock free implementation on non-TSO machine. Do you think it is possible to also separate this test?
I also include the ARM folks for opinions.

Thanks!
Yipeng

#11 lore raw

Re: [dpdk-dev] [PATCH 2/2] test/meson: hash lf test moved to dpdk perf testsuite

<snip>

Quoted 34 lines
Quoted 34 lines

Subject: [PATCH 2/2] test/meson: hash lf test moved to dpdk perf testsuite

From: Amit Gupta <[email protected]>

hash_readwrite_lf test always getting TIMEOUT as required time to finish this test was much longer compare to time required for fast tests(10s). Hence, the test is being moved to perf test category for its execution to complete.

---
app/test/meson.build | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
app/test/meson.build index renamed from app/test/meson.build +0 -0

94fd9f8..34141c5 100644

app/test/meson.build +1 -1
@@ -220,7 +220,6 @@ fast_test_names = [
        'eventdev_common_autotest',
        'fbarray_autotest',
        'hash_readwrite_func_autotest',
-        'hash_readwrite_lf_autotest',
        'ipsec_autotest',
        'kni_autotest',
        'kvargs_autotest',
@@ -263,6 +262,7 @@ perf_test_names = [
        'stack_lf_perf_autotest',
        'rand_perf_autotest',
        'hash_readwrite_perf_autotest',
+        'hash_readwrite_lf_autotest',

]

Quoted 8 lines
Quoted 3 lines

driver_test_names = [
--
1.8.3.1

[Wang, Yipeng]
I believe the lf_autotest includes functional test as well which is critical for testing the lock free implementation on non-TSO machine.
Do you think it is possible to also separate this test?
I also include the ARM folks for opinions.

Thanks Yipeng. We combined the functional testing with performance testing. So, it is all performance tests. From that perspective, I suggest changing 'hash_readwrite_lf_autotest' to 'hash_readwrite_lf_perf_autotest'.

Quoted 3 lines

Thanks!
Yipeng

author
#12 lore raw

Re: [dpdk-dev] [PATCH 2/2] test/meson: hash lf test moved to dpdk perf testsuite

Quoted 61 lines

-----Original Message-----
From: Honnappa Nagarahalli <[email protected]>
Sent: Thursday, September 12, 2019 8:31 PM
To: Wang, Yipeng1 <[email protected]>; Amit Gupta <[email protected]>; Gobriel, Sameh <[email protected]>; Dharmik Thakkar <[email protected]>; Ruifeng Wang (Arm Technology China) <[email protected]>
Cc: [email protected]; nd <[email protected]>; Honnappa Nagarahalli <[email protected]>; nd <[email protected]>
Subject: [EXT] RE: [PATCH 2/2] test/meson: hash lf test moved to dpdk perf testsuite

External Email

----------------------------------------------------------------------
<snip>

Quoted 34 lines
Quoted 34 lines

Subject: [PATCH 2/2] test/meson: hash lf test moved to dpdk perf testsuite

From: Amit Gupta <[email protected]>

hash_readwrite_lf test always getting TIMEOUT as required time to finish this test was much longer compare to time required for fast tests(10s). Hence, the test is being moved to perf test category for its execution to complete.

---
app/test/meson.build | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
app/test/meson.build index renamed from app/test/meson.build +0 -0

94fd9f8..34141c5 100644

app/test/meson.build +1 -1
@@ -220,7 +220,6 @@ fast_test_names = [
        'eventdev_common_autotest',
        'fbarray_autotest',
        'hash_readwrite_func_autotest',
-        'hash_readwrite_lf_autotest',
        'ipsec_autotest',
        'kni_autotest',
        'kvargs_autotest',
@@ -263,6 +262,7 @@ perf_test_names = [
        'stack_lf_perf_autotest',
        'rand_perf_autotest',
        'hash_readwrite_perf_autotest',
+        'hash_readwrite_lf_autotest',

]

Quoted 8 lines
Quoted 3 lines

driver_test_names = [
--
1.8.3.1

[Wang, Yipeng]
I believe the lf_autotest includes functional test as well which is critical for testing the lock free implementation on non-TSO machine. Do you think it is possible to also separate this test?
I also include the ARM folks for opinions.

Quoted 4 lines

Thanks Yipeng. We combined the functional testing with performance testing. So, it is all performance tests. From that perspective, I suggest changing 'hash_readwrite_lf_autotest' to 'hash_readwrite_lf_perf_autotest'.

Agreed, will update in v2!

Quoted 4 lines
Quoted 4 lines

Thanks!
Yipeng

#13 lore raw

PATCH v2 1/1 test/meson: hash lf test moved to dpdk perf testsuite

In reply to [email protected]

From: Amit Gupta <[email protected]>

hash_readwrite_lf test always getting TIMEOUT as required time to finish this test was much longer compare to time required for fast tests(10s). Hence, the test is being renamed moved to perf test category for its execution to complete.

---
 app/test/meson.build              | 2 +-
 app/test/test_hash_readwrite_lf.c | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
app/test/meson.build +1 -1
index 94fd9f8..57d5316 100644
@@ -220,7 +220,6 @@ fast_test_names = [
         'eventdev_common_autotest',
         'fbarray_autotest',
         'hash_readwrite_func_autotest',
-        'hash_readwrite_lf_autotest',
         'ipsec_autotest',
         'kni_autotest',
         'kvargs_autotest',
@@ -263,6 +262,7 @@ perf_test_names = [
         'stack_lf_perf_autotest',
         'rand_perf_autotest',
         'hash_readwrite_perf_autotest',
+        'hash_readwrite_lf_perf_autotest',
 ]
 
 driver_test_names = [
app/test/test_hash_readwrite_lf.c +2 -1
index 1f2fba4..33d63fa 100644
@@ -1431,4 +1431,5 @@ struct {
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(hash_readwrite_lf_autotest, test_hash_readwrite_lf_main);
+REGISTER_TEST_COMMAND(hash_readwrite_lf_perf_autotest,
+		      test_hash_readwrite_lf_main);
Signature · 1 line
1.8.3.1
#14 lore raw

Re: [dpdk-dev] [PATCH v2 1/1] test/meson: hash lf test moved to dpdk perf testsuite

Quoted 9 lines · <[email protected]> writes:

From: Amit Gupta <[email protected]>

hash_readwrite_lf test always getting TIMEOUT as required time to finish this test was much longer compare to time required for fast tests(10s). Hence, the test is being renamed moved to perf test category for its execution to complete.

---

Okay. I'll note that we pass the '-t 3' flag, so it is actually timing out with 30s instead of the default 10. We do this because occasionally the lpm6 and table tests would also exceed the 10s timeout in the travis environment. I agree, it's better to pull the perf part of tests out.

I think there isn't any additional functional test in this readwrite - is that so? If it is, then we need to also prioritize adding back in some of the functional testing. Maybe I misread the lf_autotest, though.

Quoted 35 lines
 app/test/meson.build              | 2 +-
 app/test/test_hash_readwrite_lf.c | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
app/test/meson.build +1 -1
index 94fd9f8..57d5316 100644
@@ -220,7 +220,6 @@ fast_test_names = [
         'eventdev_common_autotest',
         'fbarray_autotest',
         'hash_readwrite_func_autotest',
-        'hash_readwrite_lf_autotest',
         'ipsec_autotest',
         'kni_autotest',
         'kvargs_autotest',
@@ -263,6 +262,7 @@ perf_test_names = [
         'stack_lf_perf_autotest',
         'rand_perf_autotest',
         'hash_readwrite_perf_autotest',
+        'hash_readwrite_lf_perf_autotest',
 ]
 
 driver_test_names = [
app/test/test_hash_readwrite_lf.c +2 -1
index 1f2fba4..33d63fa 100644
@@ -1431,4 +1431,5 @@ struct {
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(hash_readwrite_lf_autotest, test_hash_readwrite_lf_main);
+REGISTER_TEST_COMMAND(hash_readwrite_lf_perf_autotest,
+		      test_hash_readwrite_lf_main);
#15 lore raw

Re: [dpdk-dev] [PATCH v2 1/1] test/meson: hash lf test moved to dpdk perf testsuite

Quoted 24 lines

-----Original Message-----
From: Aaron Conole [mailto:[email protected]]
Sent: Friday, September 13, 2019 7:41 AM
To: [email protected]
Cc: Wang, Yipeng1 <[email protected]>; Gobriel, Sameh <[email protected]>; Richardson, Bruce <[email protected]>; De Lara Guarch, Pablo <[email protected]>; [email protected]; Honnappa Nagarahalli <[email protected]>
Subject: Re: [dpdk-dev] [PATCH v2 1/1] test/meson: hash lf test moved to dpdk perf testsuite

Quoted 9 lines · <[email protected]> writes:

From: Amit Gupta <[email protected]>

hash_readwrite_lf test always getting TIMEOUT as required time to finish this test was much longer compare to time required for fast tests(10s). Hence, the test is being renamed moved to perf test category for its execution to complete.

---

Quoted 9 lines

Okay. I'll note that we pass the '-t 3' flag, so it is actually timing out with 30s instead of the default 10. We do this because occasionally the lpm6 and table tests would also exceed the 10s timeout in the travis environment. I agree, it's better to pull the perf part of tests out.

I think there isn't any additional functional test in this readwrite - is that so? If it is, then we need to also prioritize adding back in some of the functional testing. Maybe I misread the lf_autotest, though.

[Wang, Yipeng]
Yes that is my concern too, if we just move all the lock-free test into perf test then we miss the functional test.
Would any of you like to consider adding a small functional test into the readwrite or readwrite_lf_functional? That would be great :)

#16 lore raw

Re: [dpdk-dev] [PATCH v2 1/1] test/meson: hash lf test moved to dpdk perf testsuite

<snip>

Quoted 23 lines
Quoted 10 lines
Quoted 7 lines · <[email protected]> writes:

From: Amit Gupta <[email protected]>

hash_readwrite_lf test always getting TIMEOUT as required time to finish this test was much longer compare to time required for fast tests(10s). Hence, the test is being renamed moved to perf test category for its execution to complete.

Quoted 7 lines
Quoted 2 lines

---

Okay. I'll note that we pass the '-t 3' flag, so it is actually timing out with 30s instead of the default 10. We do this because occasionally the lpm6 and table tests would also exceed the 10s timeout in the travis environment. I agree, it's better to pull the perf part

of tests out.

Quoted 5 lines

I think there isn't any additional functional test in this readwrite - is that so? If it is, then we need to also prioritize adding back in some of the functional testing. Maybe I misread the lf_autotest, though.

Quoted 6 lines

[Wang, Yipeng]
Yes that is my concern too, if we just move all the lock-free test into perf test then we miss the functional test.
Would any of you like to consider adding a small functional test into the readwrite or readwrite_lf_functional?
That would be great :)

Yes, I will take up for readwrite_lf_functional. But, I do not have much bandwidth for 19.11. I suggest we move only part of the tests to perf tests instead for 19.11, this would serve both the purposes.

Amit, would it be possible to check what tests will run within the timeout period?

Quoted 1 line
author
#17 lore raw

Re: [dpdk-dev] [PATCH v2 1/1] test/meson: hash lf test moved to dpdk perf testsuite

Quoted 50 lines

-----Original Message-----
From: Honnappa Nagarahalli <[email protected]>
Sent: Friday, September 13, 2019 9:17 PM
To: Wang, Yipeng1 <[email protected]>; Aaron Conole <[email protected]>; Amit Gupta <[email protected]>
Cc: Gobriel, Sameh <[email protected]>; Richardson, Bruce <[email protected]>; De Lara Guarch, Pablo <[email protected]>; [email protected]; Honnappa Nagarahalli <[email protected]>; nd <[email protected]>; nd <[email protected]>
Subject: [EXT] RE: [dpdk-dev] [PATCH v2 1/1] test/meson: hash lf test moved to dpdk perf testsuite

External Email

----------------------------------------------------------------------
<snip>

Quoted 13 lines
Quoted 13 lines
Quoted 9 lines · <[email protected]> writes:

From: Amit Gupta <[email protected]>

hash_readwrite_lf test always getting TIMEOUT as required time to finish this test was much longer compare to time required for fast tests(10s). Hence, the test is being renamed moved to perf test category for its execution to complete.

---

Quoted 8 lines
Quoted 5 lines

Okay. I'll note that we pass the '-t 3' flag, so it is actually timing out with 30s instead of the default 10. We do this because occasionally the lpm6 and table tests would also exceed the 10s timeout in the travis environment. I agree, it's better to pull the perf part

of tests out.

Quoted 2 lines

I think there isn't any additional functional test in this readwrite - is that

so?

Quoted 9 lines
Quoted 3 lines

If it is, then we need to also prioritize adding back in some of the functional testing. Maybe I misread the lf_autotest, though.

[Wang, Yipeng]
Yes that is my concern too, if we just move all the lock-free test into perf test then we miss the functional test.
Would any of you like to consider adding a small functional test into the readwrite or readwrite_lf_functional?
That would be great :)

Quoted 7 lines

Yes, I will take up for readwrite_lf_functional. But, I do not have much bandwidth for 19.11. I suggest we move only part of the tests to perf tests instead for 19.11, this would serve both the purposes.

Amit, would it be possible to check what tests will run within the timeout period?

Quoted 1 line

Not even a single subtest of hash_readwrite_lf runs within the timeout period of 10s. generate_key logic itself is taking ~8s to generate all required keys.

author
#18 lore raw

Re: [dpdk-dev] [PATCH v2 1/1] test/meson: hash lf test moved to dpdk perf testsuite

In reply to Honnappa Nagarahalli
Quoted 50 lines

-----Original Message-----
From: Honnappa Nagarahalli <[email protected]>
Sent: Friday, September 13, 2019 9:17 PM
To: Wang, Yipeng1 <[email protected]>; Aaron Conole <[email protected]>; Amit Gupta <[email protected]>
Cc: Gobriel, Sameh <[email protected]>; Richardson, Bruce <[email protected]>; De Lara Guarch, Pablo <[email protected]>; [email protected]; Honnappa Nagarahalli <[email protected]>; nd <[email protected]>; nd <[email protected]>
Subject: [EXT] RE: [dpdk-dev] [PATCH v2 1/1] test/meson: hash lf test moved to dpdk perf testsuite

External Email

----------------------------------------------------------------------
<snip>

Quoted 13 lines
Quoted 13 lines
Quoted 9 lines · <[email protected]> writes:

From: Amit Gupta <[email protected]>

hash_readwrite_lf test always getting TIMEOUT as required time to finish this test was much longer compare to time required for fast tests(10s). Hence, the test is being renamed moved to perf test category for its execution to complete.

---

Quoted 8 lines
Quoted 5 lines

Okay. I'll note that we pass the '-t 3' flag, so it is actually timing out with 30s instead of the default 10. We do this because occasionally the lpm6 and table tests would also exceed the 10s timeout in the travis environment. I agree, it's better to pull the perf part

of tests out.

Quoted 2 lines

I think there isn't any additional functional test in this readwrite - is that

so?

Quoted 9 lines
Quoted 3 lines

If it is, then we need to also prioritize adding back in some of the functional testing. Maybe I misread the lf_autotest, though.

[Wang, Yipeng]
Yes that is my concern too, if we just move all the lock-free test into perf test then we miss the functional test.
Would any of you like to consider adding a small functional test into the readwrite or readwrite_lf_functional?
That would be great :)

Quoted 7 lines

Yes, I will take up for readwrite_lf_functional. But, I do not have much bandwidth for 19.11. I suggest we move only part of the tests to perf tests instead for 19.11, this would serve both the purposes.

Amit, would it be possible to check what tests will run within the timeout period?

Quoted 1 line

@Wang, Yipeng1, is it good if we do the change as @Honnappa Nagarahalli suggestion of changing 'hash_readwrite_lf_autotest' to 'hash_readwrite_lf_perf_autotest' for the time being and later once have sufficient bandwidth we can move only perf part of the test to perf tests.

#19 lore raw

Re: [dpdk-dev] [PATCH v2 1/1] test/meson: hash lf test moved to dpdk perf testsuite

Quoted 52 lines · Amit Gupta
Quoted 52 lines

-----Original Message-----
From: Honnappa Nagarahalli <[email protected]>
Sent: Friday, September 13, 2019 9:17 PM
To: Wang, Yipeng1 <[email protected]>; Aaron Conole <[email protected]>; Amit Gupta <[email protected]>
Cc: Gobriel, Sameh <[email protected]>; Richardson, Bruce <[email protected]>; De Lara Guarch, Pablo <[email protected]>; [email protected]; Honnappa Nagarahalli <[email protected]>; nd <[email protected]>; nd <[email protected]>
Subject: [EXT] RE: [dpdk-dev] [PATCH v2 1/1] test/meson: hash lf test moved to dpdk perf testsuite

External Email

----------------------------------------------------------------------
<snip>

Quoted 13 lines
Quoted 13 lines
Quoted 9 lines · <[email protected]> writes:

From: Amit Gupta <[email protected]>

hash_readwrite_lf test always getting TIMEOUT as required time to finish this test was much longer compare to time required for fast tests(10s). Hence, the test is being renamed moved to perf test category for its execution to complete.

---

Quoted 8 lines
Quoted 5 lines

Okay. I'll note that we pass the '-t 3' flag, so it is actually timing out with 30s instead of the default 10. We do this because occasionally the lpm6 and table tests would also exceed the 10s timeout in the travis environment. I agree, it's better to pull the perf part

of tests out.

Quoted 2 lines

I think there isn't any additional functional test in this readwrite - is that

so?

Quoted 9 lines
Quoted 3 lines

If it is, then we need to also prioritize adding back in some of the functional testing. Maybe I misread the lf_autotest, though.

[Wang, Yipeng]
Yes that is my concern too, if we just move all the lock-free test into perf test then we miss the functional test.
Would any of you like to consider adding a small functional test into the readwrite or readwrite_lf_functional?
That would be great :)

Yes, I will take up for readwrite_lf_functional. But, I do not have much bandwidth for 19.11. I suggest we move only part of the tests to perf tests instead for 19.11, this would serve both the purposes.

Quoted 8 lines
Quoted 3 lines

Amit, would it be possible to check what tests will run within the timeout period?

Quoted 1 line

@Wang, Yipeng1, is it good if we do the change as @Honnappa Nagarahalli suggestion of changing 'hash_readwrite_lf_autotest' to 'hash_readwrite_lf_perf_autotest' for the time being and later once have sufficient bandwidth we can move only perf part of the test to perf tests.

NAK.

I don't like that proposal. While it's true that there are occasional TIMEOUT failures with the current setup, I'd much prefer these timeouts (which we can easily distinguish) to removing the test from the travis chain. My understanding is that there *are* some functionality being exercised by this test that isn't exercised elsewhere. I'd prefer we don't sacrifice the coverage.

#20 lore raw

Re: [dpdk-dev] [PATCH v2 1/1] test/meson: hash lf test moved to dpdk perf testsuite

Quoted 64 lines · Aaron Conole
Quoted 52 lines · Amit Gupta
Quoted 52 lines

-----Original Message-----
From: Honnappa Nagarahalli <[email protected]>
Sent: Friday, September 13, 2019 9:17 PM
To: Wang, Yipeng1 <[email protected]>; Aaron Conole <[email protected]>; Amit Gupta <[email protected]>
Cc: Gobriel, Sameh <[email protected]>; Richardson, Bruce <[email protected]>; De Lara Guarch, Pablo <[email protected]>; [email protected]; Honnappa Nagarahalli <[email protected]>; nd <[email protected]>; nd <[email protected]>
Subject: [EXT] RE: [dpdk-dev] [PATCH v2 1/1] test/meson: hash lf test moved to dpdk perf testsuite

External Email

----------------------------------------------------------------------
<snip>

Quoted 13 lines
Quoted 13 lines
Quoted 9 lines · <[email protected]> writes:

From: Amit Gupta <[email protected]>

hash_readwrite_lf test always getting TIMEOUT as required time to finish this test was much longer compare to time required for fast tests(10s). Hence, the test is being renamed moved to perf test category for its execution to complete.

---

Quoted 8 lines
Quoted 5 lines

Okay. I'll note that we pass the '-t 3' flag, so it is actually timing out with 30s instead of the default 10. We do this because occasionally the lpm6 and table tests would also exceed the 10s timeout in the travis environment. I agree, it's better to pull the perf part

of tests out.

Quoted 2 lines

I think there isn't any additional functional test in this readwrite - is that

so?

Quoted 9 lines
Quoted 3 lines

If it is, then we need to also prioritize adding back in some of the functional testing. Maybe I misread the lf_autotest, though.

[Wang, Yipeng]
Yes that is my concern too, if we just move all the lock-free test into perf test then we miss the functional test.
Would any of you like to consider adding a small functional test into the readwrite or readwrite_lf_functional?
That would be great :)

Yes, I will take up for readwrite_lf_functional. But, I do not have much bandwidth for 19.11. I suggest we move only part of the tests to perf tests instead for 19.11, this would serve both the purposes.

Quoted 8 lines
Quoted 3 lines

Amit, would it be possible to check what tests will run within the timeout period?

Quoted 1 line

@Wang, Yipeng1, is it good if we do the change as @Honnappa Nagarahalli suggestion of changing 'hash_readwrite_lf_autotest' to 'hash_readwrite_lf_perf_autotest' for the time being and later once have sufficient bandwidth we can move only perf part of the test to perf tests.

Quoted 8 lines

NAK.

I don't like that proposal. While it's true that there are occasional TIMEOUT failures with the current setup, I'd much prefer these timeouts (which we can easily distinguish) to removing the test from the travis chain. My understanding is that there *are* some functionality being exercised by this test that isn't exercised elsewhere. I'd prefer we don't sacrifice the coverage.

+1 and marking this patch as rejected.

On a sidenote, Amit, please be careful about the versioning of your patches and update their status in patchwork.
I had two patches named the same with one marked as NEW (but no comment on it) and this current thread patch marked as SUPERSEDED.

Thanks.

Signature · 1 line
David Marchand
#21 lore raw

PATCH v2 1/1 test/meson: hash lf test moved to dpdk perf testsuite

In reply to [email protected]

From: Amit Gupta <[email protected]>

hash_readwrite_lf test always getting TIMEOUT as required time to finish this test was much longer compare to time required for fast tests(10s). Hence, the test is being renamed moved to perf test category for its execution to complete.

---
v2 Changes:
*hash_readwrite_lf_autotest renamed to hash_readwrite_lf_pref_autotest

 app/test/meson.build              | 2 +-
 app/test/test_hash_readwrite_lf.c | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
app/test/meson.build +1 -1
index 94fd9f8..57d5316 100644
@@ -220,7 +220,6 @@ fast_test_names = [
         'eventdev_common_autotest',
         'fbarray_autotest',
         'hash_readwrite_func_autotest',
-        'hash_readwrite_lf_autotest',
         'ipsec_autotest',
         'kni_autotest',
         'kvargs_autotest',
@@ -263,6 +262,7 @@ perf_test_names = [
         'stack_lf_perf_autotest',
         'rand_perf_autotest',
         'hash_readwrite_perf_autotest',
+        'hash_readwrite_lf_perf_autotest',
 ]
 
 driver_test_names = [
app/test/test_hash_readwrite_lf.c +2 -1
index 1f2fba4..33d63fa 100644
@@ -1431,4 +1431,5 @@ struct {
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(hash_readwrite_lf_autotest, test_hash_readwrite_lf_main);
+REGISTER_TEST_COMMAND(hash_readwrite_lf_perf_autotest,
+		      test_hash_readwrite_lf_main);
Signature · 1 line
1.8.3.1
author
#22 lore raw
In reply to [email protected]

Ping..

-----Original Message-----
From: [email protected] <[email protected]>
Sent: Friday, September 6, 2019 11:20 AM
To: [email protected]; [email protected]; [email protected]; [email protected]
Cc: [email protected]; Amit Gupta <[email protected]>
Subject: [PATCH 0/2] test/meson: fix hash readwrite timeout failure

From: Amit Gupta <[email protected]>

V1 changes:
* hash_readwrite and hash_readwrite lockfree meson test was taking longer time to complete. The test always get TIMEOUT.
* hash readwrtie test is split into functional and perf tests and moved to dpdk fast and perf testsuite accordingly.
* hash readwrite lockfree is moved to dpdk perf testsuite.

Amit Gupta (2):
test/meson: hash test split into shorter subtests test/meson: hash lf test moved to dpdk perf testsuite

 app/test/meson.build           |   5 +-
 app/test/test_hash_readwrite.c | 146 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 149 insertions(+), 2 deletions(-)

--
1.8.3.1

#23 lore raw

v2 cover test/meson: fix hash readwrite timeout failure

In reply to [email protected]

V2 changes:
- Remove duplicated code in the existing patch
- Add lock-free option to hash read-write functional test cases
- Move existing loack-free test cases to performance tests
- A typo fix in the comments for lock-free extendable table feature

V1 changes:
- hash_readwrite and hash_readwrite lockfree meson test was taking longer time to complete. The test always get TIMEOUT.
- hash readwrtie test is split into functional and perf tests and moved to dpdk fast and perf testsuite accordingly.
- hash readwrite lockfree is moved to dpdk perf testsuite.

Amit Gupta (1):
test/meson: hash test split into shorter subtests

Honnappa Nagarahalli (4):
test/hash: remove duplicated test code
test/hash: add lock free reader writer functional tests test/hash: move reader writer lock free tests to perf tests
hash: correct lock free extendable table support

 app/test/Makefile                             |   2 +-
 app/test/autotest_data.py                     |  14 ++-
 app/test/meson.build                          |   7 +-
 app/test/test_hash_readwrite.c                | 117 +++++++++++++-----
 ...ite_lf.c => test_hash_readwrite_lf_perf.c} |   7 +-
 lib/librte_hash/rte_hash.h                    |   2 -
 6 files changed, 107 insertions(+), 42 deletions(-)
 rename app/test/{test_hash_readwrite_lf.c => test_hash_readwrite_lf_perf.c} (99%)
Signature · 1 line
2.17.1
#24 lore raw

PATCH v2 1/5 test/meson: hash test split into shorter subtests

From: Amit Gupta <[email protected]>

hash_readwrite meson test was taking longer time to complete. The test always get TIMEOUT, hence test is split into functional and perf test. perf test is being moved under dpdk perf testsuites in meson build.

---
 app/test/meson.build           |   3 +-
 app/test/test_hash_readwrite.c | 146 +++++++++++++++++++++++++++++++++
 2 files changed, 148 insertions(+), 1 deletion(-)
app/test/meson.build +2 -1
index 22b0cefaa..08c0ecb3f 100644
@@ -233,7 +233,7 @@ fast_test_names = [
         'distributor_autotest',
         'eventdev_common_autotest',
         'fbarray_autotest',
-        'hash_readwrite_autotest',
+        'hash_readwrite_func_autotest',
         'hash_readwrite_lf_autotest',
         'ipsec_autotest',
         'kni_autotest',
@@ -282,6 +282,7 @@ perf_test_names = [
         'stack_perf_autotest',
         'stack_lf_perf_autotest',
         'rand_perf_autotest',
+        'hash_readwrite_perf_autotest',
 ]
 
 driver_test_names = [
app/test/test_hash_readwrite.c +146 -0

155 lines not on this page · raw message

Signature · 1 line
2.17.1
#25 lore raw

PATCH v2 2/5 test/hash: remove duplicated test code

In reply to Honnappa Nagarahalli

The test case target 'hash_readwrite_autotest' is covered by 'hash_readwrite_func_autotest' and 'hash_readwrite_perf_autotest'. Hence, it is removed along with its test code.

---
 app/test/autotest_data.py      |  10 +++-
 app/test/test_hash_readwrite.c | 101 ---------------------------------
 2 files changed, 8 insertions(+), 103 deletions(-)
app/test/autotest_data.py +8 -2
index 6deb97bcc..71db4b3f6 100644
@@ -664,8 +664,14 @@
         "Report":  None,
     },
     {
-        "Name":    "Hash read-write concurrency autotest",
-        "Command": "hash_readwrite_autotest",
+        "Name":    "Hash read-write concurrency functional autotest",
+        "Command": "hash_readwrite_func_autotest",
+        "Func":    default_autotest,
+        "Report":  None,
+    },
+    {
+        "Name":    "Hash read-write concurrency perf autotest",
+        "Command": "hash_readwrite_perf_autotest",
         "Func":    default_autotest,
         "Report":  None,
     },
app/test/test_hash_readwrite.c +0 -101

106 lines not on this page · raw message

Signature · 1 line
2.17.1
#26 lore raw

Re: [dpdk-dev] [PATCH v2 2/5] test/hash: remove duplicated test code

Quoted 144 lines · Honnappa Nagarahalli

The test case target 'hash_readwrite_autotest' is covered by 'hash_readwrite_func_autotest' and 'hash_readwrite_perf_autotest'. Hence, it is removed along with its test code.

---
 app/test/autotest_data.py      |  10 +++-
 app/test/test_hash_readwrite.c | 101 ---------------------------------
 2 files changed, 8 insertions(+), 103 deletions(-)
app/test/autotest_data.py +8 -2
index 6deb97bcc..71db4b3f6 100644
@@ -664,8 +664,14 @@
         "Report":  None,
     },
     {
-        "Name":    "Hash read-write concurrency autotest",
-        "Command": "hash_readwrite_autotest",
+        "Name":    "Hash read-write concurrency functional autotest",
+        "Command": "hash_readwrite_func_autotest",
+        "Func":    default_autotest,
+        "Report":  None,
+    },
+    {
+        "Name":    "Hash read-write concurrency perf autotest",
+        "Command": "hash_readwrite_perf_autotest",
         "Func":    default_autotest,
         "Report":  None,
     },
app/test/test_hash_readwrite.c +0 -102
index aa55db7fe..635ed5a9f 100644
@@ -749,106 +749,5 @@ test_hash_rw_func_main(void)
        return 0;
 }
 
-static int
-test_hash_readwrite_main(void)
-{
-       /*
-        * Variables used to choose different tests.
-        * use_htm indicates if hardware transactional memory should be used.
-        * reader_faster indicates if the reader threads should finish earlier
-        * than writer threads. This is to timing either reader threads or
-        * writer threads for performance numbers.
-        */
-       int use_htm, use_ext,  reader_faster;
-       unsigned int i = 0, core_id = 0;
-
-       if (rte_lcore_count() < 3) {
-               printf("Not enough cores for hash_readwrite_autotest, expecting at least 3\n");
-               return TEST_SKIPPED;
-       }
-
-       RTE_LCORE_FOREACH_SLAVE(core_id) {
-               slave_core_ids[i] = core_id;
-               i++;
-       }
-
-       setlocale(LC_NUMERIC, "");
-
-       if (rte_tm_supported()) {
-               printf("Hardware transactional memory (lock elision) "
-                       "is supported\n");
-
-               printf("Test read-write with Hardware transactional memory\n");
-
-               use_htm = 1;
-               use_ext = 0;
-
-               if (test_hash_readwrite_functional(use_ext, use_htm) < 0)
-                       return -1;
-
-               use_ext = 1;
-               if (test_hash_readwrite_functional(use_ext, use_htm) < 0)
-                       return -1;
-
-               reader_faster = 1;
-               if (test_hash_readwrite_perf(&htm_results, use_htm,
-                                                       reader_faster) < 0)
-                       return -1;
-
-               reader_faster = 0;
-               if (test_hash_readwrite_perf(&htm_results, use_htm,
-                                                       reader_faster) < 0)
-                       return -1;
-       } else {
-               printf("Hardware transactional memory (lock elision) "
-                       "is NOT supported\n");
-       }
-
-       printf("Test read-write without Hardware transactional memory\n");
-       use_htm = 0;
-       use_ext = 0;
-       if (test_hash_readwrite_functional(use_ext, use_htm) < 0)
-               return -1;
-
-       use_ext = 1;
-       if (test_hash_readwrite_functional(use_ext, use_htm) < 0)
-               return -1;
-
-       reader_faster = 1;
-       if (test_hash_readwrite_perf(&non_htm_results, use_htm,
-                                                       reader_faster) < 0)
-               return -1;
-       reader_faster = 0;
-       if (test_hash_readwrite_perf(&non_htm_results, use_htm,
-                                                       reader_faster) < 0)
-               return -1;
-
-       printf("================\n");
-       printf("Results summary:\n");
-       printf("================\n");
-
-       printf("single read: %u\n", htm_results.single_read);
-       printf("single write: %u\n", htm_results.single_write);
-       for (i = 0; i < NUM_TEST; i++) {
-               printf("+++ core_cnt: %u +++\n", core_cnt[i]);
-               printf("HTM:\n");
-               printf("  read only: %u\n", htm_results.read_only[i]);
-               printf("  write only: %u\n", htm_results.write_only[i]);
-               printf("  read-write read: %u\n", htm_results.read_write_r[i]);
-               printf("  read-write write: %u\n", htm_results.read_write_w[i]);
-
-               printf("non HTM:\n");
-               printf("  read only: %u\n", non_htm_results.read_only[i]);
-               printf("  write only: %u\n", non_htm_results.write_only[i]);
-               printf("  read-write read: %u\n",
-                       non_htm_results.read_write_r[i]);
-               printf("  read-write write: %u\n",
-                       non_htm_results.read_write_w[i]);
-       }
-
-       return 0;
-}
-
-REGISTER_TEST_COMMAND(hash_readwrite_autotest, test_hash_readwrite_main);
 REGISTER_TEST_COMMAND(hash_readwrite_func_autotest, test_hash_rw_func_main);
 REGISTER_TEST_COMMAND(hash_readwrite_perf_autotest, test_hash_rw_perf_main);
--
Quoted 2 lines

2.17.1

I can see that DTS references this test:
https://git.dpdk.org/tools/dts/tree/tests/TestSuite_unit_tests_eal.py#n164

Travis (and UNH) also runs those unit tests (via the list included in meson).

Is there a reason to keep those in DTS?

Thanks.

--
David Marchand

#27 lore raw

Re: [dpdk-dev] [PATCH v2 2/5] test/hash: remove duplicated test code

Quoted 153 lines · David Marchand
Quoted 144 lines · Honnappa Nagarahalli

The test case target 'hash_readwrite_autotest' is covered by 'hash_readwrite_func_autotest' and 'hash_readwrite_perf_autotest'. Hence, it is removed along with its test code.

---
 app/test/autotest_data.py      |  10 +++-
 app/test/test_hash_readwrite.c | 101 ---------------------------------
 2 files changed, 8 insertions(+), 103 deletions(-)
app/test/autotest_data.py +8 -2
index 6deb97bcc..71db4b3f6 100644
@@ -664,8 +664,14 @@
         "Report":  None,
     },
     {
-        "Name":    "Hash read-write concurrency autotest",
-        "Command": "hash_readwrite_autotest",
+        "Name":    "Hash read-write concurrency functional autotest",
+        "Command": "hash_readwrite_func_autotest",
+        "Func":    default_autotest,
+        "Report":  None,
+    },
+    {
+        "Name":    "Hash read-write concurrency perf autotest",
+        "Command": "hash_readwrite_perf_autotest",
         "Func":    default_autotest,
         "Report":  None,
     },
app/test/test_hash_readwrite.c +0 -102
index aa55db7fe..635ed5a9f 100644
@@ -749,106 +749,5 @@ test_hash_rw_func_main(void)
        return 0;
 }
 
-static int
-test_hash_readwrite_main(void)
-{
-       /*
-        * Variables used to choose different tests.
-        * use_htm indicates if hardware transactional memory should be used.
-        * reader_faster indicates if the reader threads should finish earlier
-        * than writer threads. This is to timing either reader threads or
-        * writer threads for performance numbers.
-        */
-       int use_htm, use_ext,  reader_faster;
-       unsigned int i = 0, core_id = 0;
-
-       if (rte_lcore_count() < 3) {
-               printf("Not enough cores for hash_readwrite_autotest, expecting at least 3\n");
-               return TEST_SKIPPED;
-       }
-
-       RTE_LCORE_FOREACH_SLAVE(core_id) {
-               slave_core_ids[i] = core_id;
-               i++;
-       }
-
-       setlocale(LC_NUMERIC, "");
-
-       if (rte_tm_supported()) {
-               printf("Hardware transactional memory (lock elision) "
-                       "is supported\n");
-
-               printf("Test read-write with Hardware transactional memory\n");
-
-               use_htm = 1;
-               use_ext = 0;
-
-               if (test_hash_readwrite_functional(use_ext, use_htm) < 0)
-                       return -1;
-
-               use_ext = 1;
-               if (test_hash_readwrite_functional(use_ext, use_htm) < 0)
-                       return -1;
-
-               reader_faster = 1;
-               if (test_hash_readwrite_perf(&htm_results, use_htm,
-                                                       reader_faster) < 0)
-                       return -1;
-
-               reader_faster = 0;
-               if (test_hash_readwrite_perf(&htm_results, use_htm,
-                                                       reader_faster) < 0)
-                       return -1;
-       } else {
-               printf("Hardware transactional memory (lock elision) "
-                       "is NOT supported\n");
-       }
-
-       printf("Test read-write without Hardware transactional memory\n");
-       use_htm = 0;
-       use_ext = 0;
-       if (test_hash_readwrite_functional(use_ext, use_htm) < 0)
-               return -1;
-
-       use_ext = 1;
-       if (test_hash_readwrite_functional(use_ext, use_htm) < 0)
-               return -1;
-
-       reader_faster = 1;
-       if (test_hash_readwrite_perf(&non_htm_results, use_htm,
-                                                       reader_faster) < 0)
-               return -1;
-       reader_faster = 0;
-       if (test_hash_readwrite_perf(&non_htm_results, use_htm,
-                                                       reader_faster) < 0)
-               return -1;
-
-       printf("================\n");
-       printf("Results summary:\n");
-       printf("================\n");
-
-       printf("single read: %u\n", htm_results.single_read);
-       printf("single write: %u\n", htm_results.single_write);
-       for (i = 0; i < NUM_TEST; i++) {
-               printf("+++ core_cnt: %u +++\n", core_cnt[i]);
-               printf("HTM:\n");
-               printf("  read only: %u\n", htm_results.read_only[i]);
-               printf("  write only: %u\n", htm_results.write_only[i]);
-               printf("  read-write read: %u\n", htm_results.read_write_r[i]);
-               printf("  read-write write: %u\n", htm_results.read_write_w[i]);
-
-               printf("non HTM:\n");
-               printf("  read only: %u\n", non_htm_results.read_only[i]);
-               printf("  write only: %u\n", non_htm_results.write_only[i]);
-               printf("  read-write read: %u\n",
-                       non_htm_results.read_write_r[i]);
-               printf("  read-write write: %u\n",
-                       non_htm_results.read_write_w[i]);
-       }
-
-       return 0;
-}
-
-REGISTER_TEST_COMMAND(hash_readwrite_autotest, test_hash_readwrite_main);
 REGISTER_TEST_COMMAND(hash_readwrite_func_autotest, test_hash_rw_func_main);
 REGISTER_TEST_COMMAND(hash_readwrite_perf_autotest, test_hash_rw_perf_main);
--
Quoted 2 lines

2.17.1

I can see that DTS references this test:
https://git.dpdk.org/tools/dts/tree/tests/TestSuite_unit_tests_eal.py#n164

Quoted 3 lines

Travis (and UNH) also runs those unit tests (via the list included in meson).

Is there a reason to keep those in DTS?

I will take this as a no and go ahead with this patch.

Signature · 1 line
David Marchand
#28 lore raw

PATCH v2 3/5 test/hash: add lock free reader writer functional tests

In reply to Honnappa Nagarahalli

Add lock-free reader writer concurrency functional tests. These tests will provide the same coverage that non lock-free APIs have.

---
 app/test/test_hash_readwrite.c | 58 +++++++++++++++++++++-------------
 1 file changed, 36 insertions(+), 22 deletions(-)
app/test/test_hash_readwrite.c +36 -22
index 635ed5a9f..a9429091c 100644
@@ -121,7 +121,7 @@ test_hash_readwrite_worker(__attribute__((unused)) void *arg)
 }
 
 static int
-init_params(int use_ext, int use_htm, int use_jhash)
+init_params(int use_ext, int use_htm, int rw_lf, int use_jhash)
 {
 	unsigned int i;
 
@@ -140,15 +140,16 @@ init_params(int use_ext, int use_htm, int use_jhash)
 	else
 		hash_params.hash_func = rte_hash_crc;
 
+	hash_params.extra_flag = RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD;
 	if (use_htm)
-		hash_params.extra_flag =
-			RTE_HASH_EXTRA_FLAGS_TRANS_MEM_SUPPORT |
-			RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY |
-			RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD;
+		hash_params.extra_flag |=
+			RTE_HASH_EXTRA_FLAGS_TRANS_MEM_SUPPORT;
+	if (rw_lf)
+		hash_params.extra_flag |=
+			RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY_LF;
 	else
-		hash_params.extra_flag =
-			RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY |
-			RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD;
+		hash_params.extra_flag |=
+			RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY;
 
 	if (use_ext)
 		hash_params.extra_flag |=
@@ -195,7 +196,7 @@ init_params(int use_ext, int use_htm, int use_jhash)
 }
 
 static int
-test_hash_readwrite_functional(int use_ext, int use_htm)
+test_hash_readwrite_functional(int use_htm, int use_rw_lf, int use_ext)
 {
 	unsigned int i;
 	const void *next_key;
@@ -214,7 +215,7 @@ test_hash_readwrite_functional(int use_ext, int use_htm)
 	rte_atomic64_init(&ginsertions);
 	rte_atomic64_clear(&ginsertions);
 
-	if (init_params(use_ext, use_htm, use_jhash) != 0)
+	if (init_params(use_ext, use_htm, use_rw_lf, use_jhash) != 0)
 		goto err;
 
 	if (use_ext)
@@ -229,6 +230,8 @@ test_hash_readwrite_functional(int use_ext, int use_htm)
 		tbl_rw_test_param.num_insert
 		* slave_cnt;
 
+	printf("\nHTM = %d, RW-LF = %d, EXT-Table = %d\n",
+		use_htm, use_rw_lf, use_ext);
 	printf("++++++++Start function tests:+++++++++\n");
 
 	/* Fire all threads. */
@@ -379,7 +382,7 @@ test_hash_readwrite_perf(struct perf *perf_results, int use_htm,
 	rte_atomic64_init(&gwrite_cycles);
 	rte_atomic64_clear(&gwrite_cycles);
 
-	if (init_params(0, use_htm, use_jhash) != 0)
+	if (init_params(0, use_htm, 0, use_jhash) != 0)
 		goto err;
 
 	/*
@@ -700,7 +703,6 @@ test_hash_rw_func_main(void)
 	 * than writer threads. This is to timing either reader threads or
 	 * writer threads for performance numbers.
 	 */
-	int use_htm, use_ext;
 	unsigned int i = 0, core_id = 0;
 
 	if (rte_lcore_count() < 3) {
@@ -721,29 +723,41 @@ test_hash_rw_func_main(void)
 
 		printf("Test read-write with Hardware transactional memory\n");
 
-		use_htm = 1;
-		use_ext = 0;
+		/* htm = 1, rw_lf = 0, ext = 0 */
+		if (test_hash_readwrite_functional(1, 0, 0) < 0)
+			return -1;
 
-		if (test_hash_readwrite_functional(use_ext, use_htm) < 0)
+		/* htm = 1, rw_lf = 1, ext = 0 */
+		if (test_hash_readwrite_functional(1, 1, 0) < 0)
 			return -1;
 
-		use_ext = 1;
-		if (test_hash_readwrite_functional(use_ext, use_htm) < 0)
+		/* htm = 1, rw_lf = 0, ext = 1 */
+		if (test_hash_readwrite_functional(1, 0, 1) < 0)
 			return -1;
 
+		/* htm = 1, rw_lf = 1, ext = 1 */
+		if (test_hash_readwrite_functional(1, 1, 1) < 0)
+			return -1;
 	} else {
 		printf("Hardware transactional memory (lock elision) "
 			"is NOT supported\n");
 	}
 
 	printf("Test read-write without Hardware transactional memory\n");
-	use_htm = 0;
-	use_ext = 0;
-	if (test_hash_readwrite_functional(use_ext, use_htm) < 0)
+	/* htm = 0, rw_lf = 0, ext = 0 */
+	if (test_hash_readwrite_functional(0, 0, 0) < 0)
+		return -1;
+
+	/* htm = 0, rw_lf = 1, ext = 0 */
+	if (test_hash_readwrite_functional(0, 1, 0) < 0)
+		return -1;
+
+	/* htm = 0, rw_lf = 0, ext = 1 */
+	if (test_hash_readwrite_functional(0, 0, 1) < 0)
 		return -1;
 
-	use_ext = 1;
-	if (test_hash_readwrite_functional(use_ext, use_htm) < 0)
+	/* htm = 0, rw_lf = 1, ext = 1 */
+	if (test_hash_readwrite_functional(0, 1, 1) < 0)
 		return -1;
 
 	return 0;
Signature · 1 line
2.17.1
#29 lore raw

Re: [dpdk-dev] [PATCH v2 3/5] test/hash: add lock free reader writer functional tests

Quoted 48 lines · Honnappa Nagarahalli

Add lock-free reader writer concurrency functional tests. These tests will provide the same coverage that non lock-free APIs have.

---
 app/test/test_hash_readwrite.c | 58 +++++++++++++++++++++-------------
 1 file changed, 36 insertions(+), 22 deletions(-)
app/test/test_hash_readwrite.c +9 -8
index 635ed5a9f..a9429091c 100644
@@ -121,7 +121,7 @@ test_hash_readwrite_worker(__attribute__((unused)) void *arg)
 }
 
 static int
-init_params(int use_ext, int use_htm, int use_jhash)
+init_params(int use_ext, int use_htm, int rw_lf, int use_jhash)
 {
        unsigned int i;
 
@@ -140,15 +140,16 @@ init_params(int use_ext, int use_htm, int use_jhash)
        else
                hash_params.hash_func = rte_hash_crc;
 
+       hash_params.extra_flag = RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD;
        if (use_htm)
-               hash_params.extra_flag =
-                       RTE_HASH_EXTRA_FLAGS_TRANS_MEM_SUPPORT |
-                       RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY |
-                       RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD;
+               hash_params.extra_flag |=
+                       RTE_HASH_EXTRA_FLAGS_TRANS_MEM_SUPPORT;
+       if (rw_lf)
+               hash_params.extra_flag |=
+                       RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY_LF;
        else
-               hash_params.extra_flag =
-                       RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY |
-                       RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD;
+               hash_params.extra_flag |=
+                       RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY;
 
        if (use_ext)
                hash_params.extra_flag |=

app/test/test_hash_readwrite.c init_params(int use_ext, int use_htm, int use_jhash) · line 199

Quoted 5 lines
app/test/test_hash_readwrite.c +1 -1
@@ -195,7 +196,7 @@ init_params(int use_ext, int use_htm, int use_jhash)
 }
 
 static int
-test_hash_readwrite_functional(int use_ext, int use_htm)
+test_hash_readwrite_functional(int use_htm, int use_rw_lf, int use_ext)

This is a bit hard to read, please keep the same order than init_params.

Quoted 31 lines
app/test/test_hash_readwrite.c +4 -2
 {
        unsigned int i;
        const void *next_key;
@@ -214,7 +215,7 @@ test_hash_readwrite_functional(int use_ext, int use_htm)
        rte_atomic64_init(&ginsertions);
        rte_atomic64_clear(&ginsertions);
 
-       if (init_params(use_ext, use_htm, use_jhash) != 0)
+       if (init_params(use_ext, use_htm, use_rw_lf, use_jhash) != 0)
                goto err;
 
        if (use_ext)
@@ -229,6 +230,8 @@ test_hash_readwrite_functional(int use_ext, int use_htm)
                tbl_rw_test_param.num_insert
                * slave_cnt;
 
+       printf("\nHTM = %d, RW-LF = %d, EXT-Table = %d\n",
+               use_htm, use_rw_lf, use_ext);
        printf("++++++++Start function tests:+++++++++\n");
 
        /* Fire all threads. */
@@ -379,7 +382,7 @@ test_hash_readwrite_perf(struct perf *perf_results, int use_htm,
        rte_atomic64_init(&gwrite_cycles);
        rte_atomic64_clear(&gwrite_cycles);
 
-       if (init_params(0, use_htm, use_jhash) != 0)
+       if (init_params(0, use_htm, 0, use_jhash) != 0)
                goto err;
 
        /*

app/test/test_hash_readwrite.c test_hash_rw_func_main(void) · line 703

Quoted 4 lines
app/test/test_hash_readwrite.c +0 -1
@@ -700,7 +703,6 @@ test_hash_rw_func_main(void)
         * than writer threads. This is to timing either reader threads or
         * writer threads for performance numbers.
         */
-       int use_htm, use_ext;

The comments block just before is out of sync.

app/test/test_hash_readwrite.c test_hash_rw_func_main(void) · line 726

Quoted 10 lines
app/test/test_hash_readwrite.c +1 -2
        unsigned int i = 0, core_id = 0;
 
        if (rte_lcore_count() < 3) {
@@ -721,29 +723,41 @@ test_hash_rw_func_main(void)
 
                printf("Test read-write with Hardware transactional memory\n");
 
-               use_htm = 1;
-               use_ext = 0;
+               /* htm = 1, rw_lf = 0, ext = 0 */

I didn't like those local variables.
But comments tend to get out of sync fairly easily, please remove too.

Quoted 48 lines
app/test/test_hash_readwrite.c +21 -9
+               if (test_hash_readwrite_functional(1, 0, 0) < 0)
+                       return -1;
 
-               if (test_hash_readwrite_functional(use_ext, use_htm) < 0)
+               /* htm = 1, rw_lf = 1, ext = 0 */
+               if (test_hash_readwrite_functional(1, 1, 0) < 0)
                        return -1;
 
-               use_ext = 1;
-               if (test_hash_readwrite_functional(use_ext, use_htm) < 0)
+               /* htm = 1, rw_lf = 0, ext = 1 */
+               if (test_hash_readwrite_functional(1, 0, 1) < 0)
                        return -1;
 
+               /* htm = 1, rw_lf = 1, ext = 1 */
+               if (test_hash_readwrite_functional(1, 1, 1) < 0)
+                       return -1;
        } else {
                printf("Hardware transactional memory (lock elision) "
                        "is NOT supported\n");
        }
 
        printf("Test read-write without Hardware transactional memory\n");
-       use_htm = 0;
-       use_ext = 0;
-       if (test_hash_readwrite_functional(use_ext, use_htm) < 0)
+       /* htm = 0, rw_lf = 0, ext = 0 */
+       if (test_hash_readwrite_functional(0, 0, 0) < 0)
+               return -1;
+
+       /* htm = 0, rw_lf = 1, ext = 0 */
+       if (test_hash_readwrite_functional(0, 1, 0) < 0)
+               return -1;
+
+       /* htm = 0, rw_lf = 0, ext = 1 */
+       if (test_hash_readwrite_functional(0, 0, 1) < 0)
                return -1;
 
-       use_ext = 1;
-       if (test_hash_readwrite_functional(use_ext, use_htm) < 0)
+       /* htm = 0, rw_lf = 1, ext = 1 */
+       if (test_hash_readwrite_functional(0, 1, 1) < 0)
                return -1;
 
        return 0;
--

2.17.1

Signature · 1 line
David Marchand
#30 lore raw

Re: [dpdk-dev] [PATCH v2 3/5] test/hash: add lock free reader writer functional tests

Quoted 56 lines

app/test/test_hash_readwrite.c

Quoted 16 lines · Honnappa Nagarahalli

Add lock-free reader writer concurrency functional tests. These tests will provide the same coverage that non lock-free APIs have.

---
 app/test/test_hash_readwrite.c | 58
+++++++++++++++++++++-------------
 1 file changed, 36 insertions(+), 22 deletions(-)
(quoted diff) +0 -0

b/app/test/test_hash_readwrite.c index 635ed5a9f..a9429091c 100644

app/test/test_hash_readwrite.c +0 -0
@@ -121,7 +121,7 @@

test_hash_readwrite_worker(__attribute__((unused))

app/test/test_hash_readwrite.c init_params(int use_ext, int use_htm, int

Quoted 9 lines
app/test/test_hash_readwrite.c +1 -1
 void *arg)  }
 
 static int
-init_params(int use_ext, int use_htm, int use_jhash)
+init_params(int use_ext, int use_htm, int rw_lf, int use_jhash)
 {
        unsigned int i;
 
@@ -140,15 +140,16 @@ init_params(int use_ext, int use_htm, int

use_jhash)

Quoted 26 lines
app/test/test_hash_readwrite.c +9 -7
        else
                hash_params.hash_func = rte_hash_crc;
 
+       hash_params.extra_flag =
+ RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD;
        if (use_htm)
-               hash_params.extra_flag =
-                       RTE_HASH_EXTRA_FLAGS_TRANS_MEM_SUPPORT |
-                       RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY |
-                       RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD;
+               hash_params.extra_flag |=
+                       RTE_HASH_EXTRA_FLAGS_TRANS_MEM_SUPPORT;
+       if (rw_lf)
+               hash_params.extra_flag |=
+                       RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY_LF;
        else
-               hash_params.extra_flag =
-                       RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY |
-                       RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD;
+               hash_params.extra_flag |=
+                       RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY;
 
        if (use_ext)
                hash_params.extra_flag |= @@ -195,7 +196,7 @@

init_params(int use_ext, int use_htm, int use_jhash) }

Quoted 6 lines

app/test/test_hash_readwrite.c

Quoted 4 lines

static int

app/test/test_hash_readwrite.c +2 -1
-test_hash_readwrite_functional(int use_ext, int use_htm)
+test_hash_readwrite_functional(int use_htm, int use_rw_lf, int
+use_ext)

This is a bit hard to read, please keep the same order than init_params.

It looks like it is better to change the init_params. Otherwise, the code in test_hash_rw_func_main becomes hard to read. See the comment below.

Quoted 98 lines

app/test/test_hash_readwrite.c test_hash_readwrite_functional(int use_ext, int

Quoted 6 lines

 {
        unsigned int i;
        const void *next_key;
app/test/test_hash_readwrite.c +0 -0
@@ -214,7 +215,7 @@ test_hash_readwrite_functional(int use_ext, int

use_htm)

app/test/test_hash_readwrite.c test_hash_readwrite_functional(int use_ext, int

Quoted 9 lines
app/test/test_hash_readwrite.c +1 -1
        rte_atomic64_init(&ginsertions);
        rte_atomic64_clear(&ginsertions);
 
-       if (init_params(use_ext, use_htm, use_jhash) != 0)
+       if (init_params(use_ext, use_htm, use_rw_lf, use_jhash) != 0)
                goto err;
 
        if (use_ext)
@@ -229,6 +230,8 @@ test_hash_readwrite_functional(int use_ext, int

use_htm)

app/test/test_hash_readwrite.c test_hash_readwrite_perf(struct perf *perf_results,

Quoted 9 lines
app/test/test_hash_readwrite.c +2 -0
                tbl_rw_test_param.num_insert
                * slave_cnt;
 
+       printf("\nHTM = %d, RW-LF = %d, EXT-Table = %d\n",
+               use_htm, use_rw_lf, use_ext);
        printf("++++++++Start function tests:+++++++++\n");
 
        /* Fire all threads. */
@@ -379,7 +382,7 @@ test_hash_readwrite_perf(struct perf *perf_results,

int use_htm,

app/test/test_hash_readwrite.c test_hash_rw_func_main(void) · line 703

Quoted 13 lines
app/test/test_hash_readwrite.c +1 -2
        rte_atomic64_init(&gwrite_cycles);
        rte_atomic64_clear(&gwrite_cycles);
 
-       if (init_params(0, use_htm, use_jhash) != 0)
+       if (init_params(0, use_htm, 0, use_jhash) != 0)
                goto err;
 
        /*
@@ -700,7 +703,6 @@ test_hash_rw_func_main(void)
         * than writer threads. This is to timing either reader threads or
         * writer threads for performance numbers.
         */
-       int use_htm, use_ext;

The comments block just before is out of sync.

app/test/test_hash_readwrite.c test_hash_rw_func_main(void) · line 727

Quoted 11 lines
app/test/test_hash_readwrite.c +1 -2
        unsigned int i = 0, core_id = 0;
 
        if (rte_lcore_count() < 3) {
@@ -721,29 +723,41 @@ test_hash_rw_func_main(void)
 
                printf("Test read-write with Hardware transactional
 memory\n");
 
-               use_htm = 1;
-               use_ext = 0;
+               /* htm = 1, rw_lf = 0, ext = 0 */

I didn't like those local variables.
But comments tend to get out of sync fairly easily, please remove too.

Quoted 38 lines
app/test/test_hash_readwrite.c +19 -6
+               if (test_hash_readwrite_functional(1, 0, 0) < 0)
+                       return -1;
 
-               if (test_hash_readwrite_functional(use_ext, use_htm) < 0)
+               /* htm = 1, rw_lf = 1, ext = 0 */
+               if (test_hash_readwrite_functional(1, 1, 0) < 0)
                        return -1;
 
-               use_ext = 1;
-               if (test_hash_readwrite_functional(use_ext, use_htm) < 0)
+               /* htm = 1, rw_lf = 0, ext = 1 */
+               if (test_hash_readwrite_functional(1, 0, 1) < 0)
                        return -1;
 
+               /* htm = 1, rw_lf = 1, ext = 1 */
+               if (test_hash_readwrite_functional(1, 1, 1) < 0)
+                       return -1;
        } else {
                printf("Hardware transactional memory (lock elision) "
                        "is NOT supported\n");
        }
 
        printf("Test read-write without Hardware transactional memory\n");
-       use_htm = 0;
-       use_ext = 0;
-       if (test_hash_readwrite_functional(use_ext, use_htm) < 0)
+       /* htm = 0, rw_lf = 0, ext = 0 */
+       if (test_hash_readwrite_functional(0, 0, 0) < 0)
+               return -1;
+
+       /* htm = 0, rw_lf = 1, ext = 0 */
+       if (test_hash_readwrite_functional(0, 1, 0) < 0)
+               return -1;
+
+       /* htm = 0, rw_lf = 0, ext = 1 */
+       if (test_hash_readwrite_functional(0, 0, 1) < 0)
                return -1;
 
Quoted 5 lines

app/test/test_hash_readwrite.c test_hash_rw_func_main(void) · line 761

Quoted 5 lines
app/test/test_hash_readwrite.c +2 -2
-       use_ext = 1;
-       if (test_hash_readwrite_functional(use_ext, use_htm) < 0)
+       /* htm = 0, rw_lf = 1, ext = 1 */
+       if (test_hash_readwrite_functional(0, 1, 1) < 0)
                return -1;

The ordering of bits (0-0-0, 0-1-0, 0-0-1, 0-1-1) looks better here.

Quoted 9 lines
Quoted 5 lines
app/test/test_hash_readwrite.c +0 -1
        return 0;
--

2.17.1

--
David Marchand

#31 lore raw

Re: [dpdk-dev] [PATCH v2 3/5] test/hash: add lock free reader writer functional tests

Quoted 163 lines · Honnappa Nagarahalli
Quoted 57 lines

app/test/test_hash_readwrite.c

Quoted 16 lines · Honnappa Nagarahalli

Add lock-free reader writer concurrency functional tests. These tests will provide the same coverage that non lock-free APIs have.

---
 app/test/test_hash_readwrite.c | 58
+++++++++++++++++++++-------------
 1 file changed, 36 insertions(+), 22 deletions(-)
(quoted diff) +0 -0

b/app/test/test_hash_readwrite.c index 635ed5a9f..a9429091c 100644

app/test/test_hash_readwrite.c +0 -0
@@ -121,7 +121,7 @@

test_hash_readwrite_worker(__attribute__((unused))

app/test/test_hash_readwrite.c init_params(int use_ext, int use_htm, int

Quoted 9 lines
app/test/test_hash_readwrite.c +1 -1
 void *arg)  }
 
 static int
-init_params(int use_ext, int use_htm, int use_jhash)
+init_params(int use_ext, int use_htm, int rw_lf, int use_jhash)
 {
        unsigned int i;
 
@@ -140,15 +140,16 @@ init_params(int use_ext, int use_htm, int

use_jhash)

Quoted 26 lines
app/test/test_hash_readwrite.c +9 -7
        else
                hash_params.hash_func = rte_hash_crc;
 
+       hash_params.extra_flag =
+ RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD;
        if (use_htm)
-               hash_params.extra_flag =
-                       RTE_HASH_EXTRA_FLAGS_TRANS_MEM_SUPPORT |
-                       RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY |
-                       RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD;
+               hash_params.extra_flag |=
+                       RTE_HASH_EXTRA_FLAGS_TRANS_MEM_SUPPORT;
+       if (rw_lf)
+               hash_params.extra_flag |=
+                       RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY_LF;
        else
-               hash_params.extra_flag =
-                       RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY |
-                       RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD;
+               hash_params.extra_flag |=
+                       RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY;
 
        if (use_ext)
                hash_params.extra_flag |= @@ -195,7 +196,7 @@

init_params(int use_ext, int use_htm, int use_jhash) }

Quoted 6 lines

app/test/test_hash_readwrite.c

Quoted 4 lines

static int

app/test/test_hash_readwrite.c +2 -1
-test_hash_readwrite_functional(int use_ext, int use_htm)
+test_hash_readwrite_functional(int use_htm, int use_rw_lf, int
+use_ext)

This is a bit hard to read, please keep the same order than init_params.

It looks like it is better to change the init_params. Otherwise, the code in test_hash_rw_func_main becomes hard to read. See the comment below.

Quoted 98 lines

app/test/test_hash_readwrite.c test_hash_readwrite_functional(int use_ext, int

Quoted 6 lines

 {
        unsigned int i;
        const void *next_key;
app/test/test_hash_readwrite.c +0 -0
@@ -214,7 +215,7 @@ test_hash_readwrite_functional(int use_ext, int

use_htm)

app/test/test_hash_readwrite.c test_hash_readwrite_functional(int use_ext, int

Quoted 9 lines
app/test/test_hash_readwrite.c +1 -1
        rte_atomic64_init(&ginsertions);
        rte_atomic64_clear(&ginsertions);
 
-       if (init_params(use_ext, use_htm, use_jhash) != 0)
+       if (init_params(use_ext, use_htm, use_rw_lf, use_jhash) != 0)
                goto err;
 
        if (use_ext)
@@ -229,6 +230,8 @@ test_hash_readwrite_functional(int use_ext, int

use_htm)

app/test/test_hash_readwrite.c test_hash_readwrite_perf(struct perf *perf_results,

Quoted 9 lines
app/test/test_hash_readwrite.c +2 -0
                tbl_rw_test_param.num_insert
                * slave_cnt;
 
+       printf("\nHTM = %d, RW-LF = %d, EXT-Table = %d\n",
+               use_htm, use_rw_lf, use_ext);
        printf("++++++++Start function tests:+++++++++\n");
 
        /* Fire all threads. */
@@ -379,7 +382,7 @@ test_hash_readwrite_perf(struct perf *perf_results,

int use_htm,

app/test/test_hash_readwrite.c test_hash_rw_func_main(void) · line 703

Quoted 13 lines
app/test/test_hash_readwrite.c +1 -2
        rte_atomic64_init(&gwrite_cycles);
        rte_atomic64_clear(&gwrite_cycles);
 
-       if (init_params(0, use_htm, use_jhash) != 0)
+       if (init_params(0, use_htm, 0, use_jhash) != 0)
                goto err;
 
        /*
@@ -700,7 +703,6 @@ test_hash_rw_func_main(void)
         * than writer threads. This is to timing either reader threads or
         * writer threads for performance numbers.
         */
-       int use_htm, use_ext;

The comments block just before is out of sync.

app/test/test_hash_readwrite.c test_hash_rw_func_main(void) · line 727

Quoted 11 lines
app/test/test_hash_readwrite.c +1 -2
        unsigned int i = 0, core_id = 0;
 
        if (rte_lcore_count() < 3) {
@@ -721,29 +723,41 @@ test_hash_rw_func_main(void)
 
                printf("Test read-write with Hardware transactional
 memory\n");
 
-               use_htm = 1;
-               use_ext = 0;
+               /* htm = 1, rw_lf = 0, ext = 0 */

I didn't like those local variables.
But comments tend to get out of sync fairly easily, please remove too.

Quoted 38 lines
app/test/test_hash_readwrite.c +19 -6
+               if (test_hash_readwrite_functional(1, 0, 0) < 0)
+                       return -1;
 
-               if (test_hash_readwrite_functional(use_ext, use_htm) < 0)
+               /* htm = 1, rw_lf = 1, ext = 0 */
+               if (test_hash_readwrite_functional(1, 1, 0) < 0)
                        return -1;
 
-               use_ext = 1;
-               if (test_hash_readwrite_functional(use_ext, use_htm) < 0)
+               /* htm = 1, rw_lf = 0, ext = 1 */
+               if (test_hash_readwrite_functional(1, 0, 1) < 0)
                        return -1;
 
+               /* htm = 1, rw_lf = 1, ext = 1 */
+               if (test_hash_readwrite_functional(1, 1, 1) < 0)
+                       return -1;
        } else {
                printf("Hardware transactional memory (lock elision) "
                        "is NOT supported\n");
        }
 
        printf("Test read-write without Hardware transactional memory\n");
-       use_htm = 0;
-       use_ext = 0;
-       if (test_hash_readwrite_functional(use_ext, use_htm) < 0)
+       /* htm = 0, rw_lf = 0, ext = 0 */
+       if (test_hash_readwrite_functional(0, 0, 0) < 0)
+               return -1;
+
+       /* htm = 0, rw_lf = 1, ext = 0 */
+       if (test_hash_readwrite_functional(0, 1, 0) < 0)
+               return -1;
+
+       /* htm = 0, rw_lf = 0, ext = 1 */
+       if (test_hash_readwrite_functional(0, 0, 1) < 0)
                return -1;
 
Quoted 6 lines
Quoted 5 lines

app/test/test_hash_readwrite.c test_hash_rw_func_main(void) · line 761

Quoted 5 lines
app/test/test_hash_readwrite.c +2 -2
-       use_ext = 1;
-       if (test_hash_readwrite_functional(use_ext, use_htm) < 0)
+       /* htm = 0, rw_lf = 1, ext = 1 */
+       if (test_hash_readwrite_functional(0, 1, 1) < 0)
                return -1;

The ordering of bits (0-0-0, 0-1-0, 0-0-1, 0-1-1) looks better here.

Ok, forget my comment.
I just want to get rid of this series and we stop getting random timeout in the CI.
I will take it as is and cleanup if I find some time later.

Signature · 1 line
David Marchand
#32 lore raw

Re: [dpdk-dev] [PATCH v2 3/5] test/hash: add lock free reader writer functional tests

Quoted 8 lines

-----Original Message-----
From: David Marchand [mailto:[email protected]]
Sent: Wednesday, February 5, 2020 8:42 AM
To: Honnappa Nagarahalli <[email protected]>
Cc: Amit Gupta <[email protected]>; Wang, Yipeng1 <[email protected]>; Gobriel, Sameh <[email protected]>; [email protected]; dev <[email protected]>; nd <[email protected]>
Subject: Re: [PATCH v2 3/5] test/hash: add lock free reader writer functional tests

Quoted 45 lines
Quoted 43 lines · Honnappa Nagarahalli
Quoted 43 lines

app/test/test_hash_readwrite.c

Quoted 16 lines · Honnappa Nagarahalli

Add lock-free reader writer concurrency functional tests. These tests will provide the same coverage that non lock-free APIs have.

---
 app/test/test_hash_readwrite.c | 58
+++++++++++++++++++++-------------
 1 file changed, 36 insertions(+), 22 deletions(-)
(quoted diff) +0 -0

b/app/test/test_hash_readwrite.c index 635ed5a9f..a9429091c 100644

app/test/test_hash_readwrite.c +0 -0
@@ -121,7 +121,7 @@

test_hash_readwrite_worker(__attribute__((unused))

app/test/test_hash_readwrite.c init_params(int use_ext, int use_htm, int

Quoted 9 lines
app/test/test_hash_readwrite.c +1 -1
 void *arg)  }
 
 static int
-init_params(int use_ext, int use_htm, int use_jhash)
+init_params(int use_ext, int use_htm, int rw_lf, int use_jhash)
 {
        unsigned int i;
 
@@ -140,15 +140,16 @@ init_params(int use_ext, int use_htm, int

use_jhash)

Quoted 12 lines
app/test/test_hash_readwrite.c +4 -4
        else
                hash_params.hash_func = rte_hash_crc;
 
+       hash_params.extra_flag =
+ RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD;
        if (use_htm)
-               hash_params.extra_flag =
-                       RTE_HASH_EXTRA_FLAGS_TRANS_MEM_SUPPORT |
-                       RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY |
-                       RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD;
+               hash_params.extra_flag |=
+                       RTE_HASH_EXTRA_FLAGS_TRANS_MEM_SUPPORT;

[Wang, Yipeng] Thanks for the patch Honnappa. Here I think we still need the RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY Flag even with HTM.

Other commits in this series look good to me and seems David already applied.

Thanks!

#33 lore raw

Re: [dpdk-dev] [PATCH v2 3/5] test/hash: add lock free reader writer functional tests

<snip>

Quoted 42 lines
Quoted 32 lines
Quoted 32 lines
Quoted 32 lines

app/test/test_hash_readwrite.c

Quoted 18 lines

Add lock-free reader writer concurrency functional tests. These tests will provide the same coverage that non lock-free APIs have.

Signed-off-by: Honnappa Nagarahalli
<[email protected]>

---
 app/test/test_hash_readwrite.c | 58
+++++++++++++++++++++-------------
 1 file changed, 36 insertions(+), 22 deletions(-)
(quoted diff) +0 -0

b/app/test/test_hash_readwrite.c index 635ed5a9f..a9429091c 100644

app/test/test_hash_readwrite.c +0 -0
@@ -121,7 +121,7 @@

test_hash_readwrite_worker(__attribute__((unused))

app/test/test_hash_readwrite.c init_params(int use_ext, int use_htm, int

Quoted 9 lines
app/test/test_hash_readwrite.c +1 -1
 void *arg)  }
 
 static int
-init_params(int use_ext, int use_htm, int use_jhash)
+init_params(int use_ext, int use_htm, int rw_lf, int use_jhash)
 {
        unsigned int i;
 
@@ -140,15 +140,16 @@ init_params(int use_ext, int use_htm, int

use_jhash)

Quoted 3 lines
app/test/test_hash_readwrite.c +0 -0
        else
                hash_params.hash_func = rte_hash_crc;
 
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines

app/test/test_hash_readwrite.c init_params(int use_ext, int use_htm, int use_jhash) · line 146

Quoted 9 lines
app/test/test_hash_readwrite.c +4 -4
+       hash_params.extra_flag =
+ RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD;
        if (use_htm)
-               hash_params.extra_flag =
-                       RTE_HASH_EXTRA_FLAGS_TRANS_MEM_SUPPORT |
-                       RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY |
-                       RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD;
+               hash_params.extra_flag |=
+                       RTE_HASH_EXTRA_FLAGS_TRANS_MEM_SUPPORT;
Quoted 3 lines

[Wang, Yipeng] Thanks for the patch Honnappa. Here I think we still need the RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY
Flag even with HTM.

I have made RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY depend on 'rw_lf' flag. The test case HTM + RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY will still run when 'rw_lf' is set to 0.

Quoted 5 lines

Other commits in this series look good to me and seems David already applied.

Thanks!

#34 lore raw

Re: [dpdk-dev] [PATCH v2 3/5] test/hash: add lock free reader writer functional tests

Quoted 52 lines

-----Original Message-----
From: Honnappa Nagarahalli [mailto:[email protected]]
Sent: Wednesday, February 5, 2020 11:52 AM
To: Wang, Yipeng1 <[email protected]>; David Marchand <[email protected]>
Cc: Amit Gupta <[email protected]>; Gobriel, Sameh <[email protected]>; [email protected]; dev <[email protected]>; nd <[email protected]>; Honnappa Nagarahalli <[email protected]>; nd <[email protected]>
Subject: RE: [PATCH v2 3/5] test/hash: add lock free reader writer functional tests

<snip>

Quoted 42 lines
Quoted 41 lines
Quoted 41 lines
Quoted 41 lines

app/test/test_hash_readwrite.c

Quoted 18 lines

Add lock-free reader writer concurrency functional tests. These tests will provide the same coverage that non lock-free APIs have.

Signed-off-by: Honnappa Nagarahalli
<[email protected]>

---
 app/test/test_hash_readwrite.c | 58
+++++++++++++++++++++-------------
 1 file changed, 36 insertions(+), 22 deletions(-)
(quoted diff) +0 -0

b/app/test/test_hash_readwrite.c index 635ed5a9f..a9429091c 100644

app/test/test_hash_readwrite.c +0 -0
@@ -121,7 +121,7 @@

test_hash_readwrite_worker(__attribute__((unused))

app/test/test_hash_readwrite.c init_params(int use_ext, int use_htm, int

Quoted 9 lines
app/test/test_hash_readwrite.c +1 -1
 void *arg)  }
 
 static int
-init_params(int use_ext, int use_htm, int use_jhash)
+init_params(int use_ext, int use_htm, int rw_lf, int use_jhash)
 {
        unsigned int i;
 
@@ -140,15 +140,16 @@ init_params(int use_ext, int use_htm, int

use_jhash)

Quoted 12 lines
app/test/test_hash_readwrite.c +4 -4
        else
                hash_params.hash_func = rte_hash_crc;
 
+       hash_params.extra_flag =
+ RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD;
        if (use_htm)
-               hash_params.extra_flag =
-                       RTE_HASH_EXTRA_FLAGS_TRANS_MEM_SUPPORT |
-                       RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY |
-                       RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD;
+               hash_params.extra_flag |=
+                       RTE_HASH_EXTRA_FLAGS_TRANS_MEM_SUPPORT;
Quoted 6 lines
Quoted 3 lines

[Wang, Yipeng] Thanks for the patch Honnappa. Here I think we still need the RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY
Flag even with HTM.

I have made RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY depend on 'rw_lf' flag. The test case HTM + RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY will still run when 'rw_lf' is set to 0.

[Wang, Yipeng]
I see, thought was an "else if". It is correct then, Thanks!

#35 lore raw

PATCH v2 4/5 test/hash: move reader writer lock free tests to perf tests

In reply to Honnappa Nagarahalli

Move reader writer lock free tests to performance tests.

---
 app/test/Makefile                                          | 2 +-
 app/test/autotest_data.py                                  | 4 ++--
 app/test/meson.build                                       | 4 ++--
 ...t_hash_readwrite_lf.c => test_hash_readwrite_lf_perf.c} | 7 ++++---
 4 files changed, 9 insertions(+), 8 deletions(-)
 rename app/test/{test_hash_readwrite_lf.c => test_hash_readwrite_lf_perf.c} (99%)
app/test/Makefile +1 -1
index 57930c00b..d955dbb03 100644
@@ -122,7 +122,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash_perf.c
 SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash_functions.c
 SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash_multiwriter.c
 SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash_readwrite.c
-SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash_readwrite_lf.c
+SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash_readwrite_lf_perf.c
 
 SRCS-$(CONFIG_RTE_LIBRTE_RIB) += test_rib.c
 SRCS-$(CONFIG_RTE_LIBRTE_RIB) += test_rib6.c
app/test/autotest_data.py +2 -2
index 71db4b3f6..7b1d01389 100644
@@ -676,8 +676,8 @@
         "Report":  None,
     },
     {
-        "Name":    "Hash read-write lock-free concurrency autotest",
-        "Command": "hash_readwrite_lf_autotest",
+        "Name":    "Hash read-write lock-free concurrency perf autotest",
+        "Command": "hash_readwrite_lf_perf_autotest",
         "Func":    default_autotest,
         "Report":  None,
     },
app/test/meson.build +2 -2
index 08c0ecb3f..07cf675a4 100644
@@ -59,7 +59,7 @@ test_sources = files('commands.c',
 	'test_hash_multiwriter.c',
 	'test_hash_readwrite.c',
 	'test_hash_perf.c',
-	'test_hash_readwrite_lf.c',
+	'test_hash_readwrite_lf_perf.c',
 	'test_interrupts.c',
 	'test_ipsec.c',
 	'test_ipsec_sad.c',
@@ -234,7 +234,6 @@ fast_test_names = [
         'eventdev_common_autotest',
         'fbarray_autotest',
         'hash_readwrite_func_autotest',
-        'hash_readwrite_lf_autotest',
         'ipsec_autotest',
         'kni_autotest',
         'kvargs_autotest',
@@ -283,6 +282,7 @@ perf_test_names = [
         'stack_lf_perf_autotest',
         'rand_perf_autotest',
         'hash_readwrite_perf_autotest',
+        'hash_readwrite_lf_perf_autotest'
 ]
 
 driver_test_names = [
app/test/test_hash_readwrite_lf_perf.c renamed from app/test/test_hash_readwrite_lf.c +4 -3
similarity index 99%
rename from app/test/test_hash_readwrite_lf.c
rename to app/test/test_hash_readwrite_lf_perf.c
index 97c304054..a7547bea0 100644
@@ -1241,7 +1241,7 @@ test_hash_add_ks_lookup_hit_extbkt(struct rwc_perf *rwc_perf_results,
 }
 
 static int
-test_hash_readwrite_lf_main(void)
+test_hash_readwrite_lf_perf_main(void)
 {
 	/*
 	 * Variables used to choose different tests.
@@ -1254,7 +1254,7 @@ test_hash_readwrite_lf_main(void)
 	int ext_bkt = 0;
 
 	if (rte_lcore_count() < 2) {
-		printf("Not enough cores for hash_readwrite_lf_autotest, expecting at least 2\n");
+		printf("Not enough cores for hash_readwrite_lf_perf_autotest, expecting at least 2\n");
 		return TEST_SKIPPED;
 	}
 
@@ -1431,4 +1431,5 @@ test_hash_readwrite_lf_main(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(hash_readwrite_lf_autotest, test_hash_readwrite_lf_main);
+REGISTER_TEST_COMMAND(hash_readwrite_lf_perf_autotest,
+				test_hash_readwrite_lf_perf_main);
Signature · 1 line
2.17.1
#36 lore raw

PATCH v2 5/5 hash: correct lock free extendable table support

In reply to Honnappa Nagarahalli

Lock-free extendable table is supported. Correct the comments.

Fixes f401363d984a ("hash: support lock-free extendable bucket")
---
 lib/librte_hash/rte_hash.h | 2 --
 1 file changed, 2 deletions(-)
lib/librte_hash/rte_hash.h +0 -2
index 063701173..ed0673b73 100644
@@ -51,8 +51,6 @@ extern "C" {
 
 /** Flag to support lock free reader writer concurrency. Both single writer
  * and multi writer use cases are supported.
- * Currently, extendable bucket table feature is not supported with
- * this feature.
  */
 #define RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY_LF 0x20
 
Signature · 1 line
2.17.1
#37 lore raw
In reply to Honnappa Nagarahalli
Quoted 23 lines · Honnappa Nagarahalli

V2 changes:
- Remove duplicated code in the existing patch
- Add lock-free option to hash read-write functional test cases
- Move existing loack-free test cases to performance tests
- A typo fix in the comments for lock-free extendable table feature

V1 changes:
- hash_readwrite and hash_readwrite lockfree meson test was taking longer time to complete. The test always get TIMEOUT.
- hash readwrtie test is split into functional and perf tests and moved to dpdk fast and perf testsuite accordingly.
- hash readwrite lockfree is moved to dpdk perf testsuite.

Amit Gupta (1):
test/meson: hash test split into shorter subtests

Honnappa Nagarahalli (4):
test/hash: remove duplicated test code
test/hash: add lock free reader writer functional tests test/hash: move reader writer lock free tests to perf tests
hash: correct lock free extendable table support

Quoted 8 lines
 app/test/Makefile                             |   2 +-
 app/test/autotest_data.py                     |  14 ++-
 app/test/meson.build                          |   7 +-
 app/test/test_hash_readwrite.c                | 117 +++++++++++++-----
 ...ite_lf.c => test_hash_readwrite_lf_perf.c} |   7 +-
 lib/librte_hash/rte_hash.h                    |   2 -
 6 files changed, 107 insertions(+), 42 deletions(-)
 rename app/test/{test_hash_readwrite_lf.c => test_hash_readwrite_lf_perf.c} (99%)

Squashed patch 2 in patch 1.
Series applied, thanks.

Signature · 1 line
David Marchand