[dpdk-dev] [PATCH v2 4/5] lib/stack: reload head when pop fails

2020-09-25 Thread Steven Lariau
om Cc: sta...@dpdk.org Signed-off-by: Steven Lariau Reviewed-by: Dharmik Thakkar Reviewed-by: Ruifeng Wang Acked-by: Gage Eads --- lib/librte_stack/rte_stack_lf_c11.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/librte_stack/rte_stack_lf_c11.h b/lib/librte_stack/rte_stac

[dpdk-dev] [PATCH v2 5/5] lib/stack: remove pop cas release ordering

2020-09-25 Thread Steven Lariau
e list, and the store-release in push makes sure the items are read before they are visible in the free list. Signed-off-by: Steven Lariau Reviewed-by: Dharmik Thakkar Reviewed-by: Ruifeng Wang --- lib/librte_stack/rte_stack_lf_c11.h | 16 +++- 1 file changed, 15 insertions(+), 1 de

[dpdk-dev] [PATCH v2 1/5] lib/stack: fix inconsistent weak / strong cas

2020-09-25 Thread Steven Lariau
inside a loop, because there may be a lot of operations to do in a loop iteration (locate the new head). Signed-off-by: Steven Lariau Reviewed-by: Dharmik Thakkar Reviewed-by: Ruifeng Wang Acked-by: Gage Eads --- lib/librte_stack/rte_stack_lf_c11.h | 4 ++-- 1 file changed, 2 insertions(+), 2

[dpdk-dev] [PATCH v2 2/5] lib/stack: remove push acquire fence

2020-09-25 Thread Steven Lariau
rrier. Signed-off-by: Steven Lariau Reviewed-by: Dharmik Thakkar Reviewed-by: Ruifeng Wang Acked-by: Gage Eads --- lib/librte_stack/rte_stack_lf_c11.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/lib/librte_stack/rte_stack_lf_c11.h b/lib/librte_stack/rte_stack_lf_c11.h index 1e0e

[dpdk-dev] [PATCH v2 3/5] lib/stack: remove redundant orderings for list->len

2020-09-25 Thread Steven Lariau
but the old list, which doesn't have enough items yet for pop to succeed. Signed-off-by: Steven Lariau Reviewed-by: Dharmik Thakkar Reviewed-by: Ruifeng Wang Acked-by: Gage Eads --- lib/librte_stack/rte_stack_lf_c11.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --g

[dpdk-dev] [PATCH v2 0/5] lib/stack: improve lockfree C11 implementation

2020-09-25 Thread Steven Lariau
+00.48% v2: add comment to explain why pop head CAS relaxed is valid added Fixes information Steven Lariau (5): lib/stack: fix inconsistent weak / strong cas lib/stack: remove push acquire fence lib/stack: remove redundant orderings for list->len lib/stack: reload head when pop fa

[dpdk-dev] [PATCH 2/5] lib/stack: remove push acquire fence

2020-09-11 Thread Steven Lariau
rrier. Signed-off-by: Steven Lariau Reviewed-by: Dharmik Thakkar Reviewed-by: Ruifeng Wang --- lib/librte_stack/rte_stack_lf_c11.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/lib/librte_stack/rte_stack_lf_c11.h b/lib/librte_stack/rte_stack_lf_c11.h index 1e0ea0bef..82b7287f1 100644 ---

[dpdk-dev] [PATCH 5/5] lib/stack: remove pop cas release ordering

2020-09-11 Thread Steven Lariau
e list, and the store-release in push makes sure the items are read before they are visible in the free list. Signed-off-by: Steven Lariau Reviewed-by: Dharmik Thakkar Reviewed-by: Ruifeng Wang --- lib/librte_stack/rte_stack_lf_c11.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) d

[dpdk-dev] [PATCH 4/5] lib/stack: reload head when pop fails

2020-09-11 Thread Steven Lariau
List head must be loaded right before continue (when failed to find the new head). Without this, one thread might keep trying and failing to pop items without ever loading the new correct head. Signed-off-by: Steven Lariau Reviewed-by: Dharmik Thakkar Reviewed-by: Ruifeng Wang --- lib

[dpdk-dev] [PATCH 1/5] lib/stack: fix inconsistent weak / strong cas

2020-09-11 Thread Steven Lariau
inside a loop, because there may be a lot of operations to do in a loop iteration (locate the new head). Signed-off-by: Steven Lariau Reviewed-by: Dharmik Thakkar Reviewed-by: Ruifeng Wang --- lib/librte_stack/rte_stack_lf_c11.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[dpdk-dev] [PATCH 3/5] lib/stack: remove redundant orderings for list->len

2020-09-11 Thread Steven Lariau
but the old list, which doesn't have enough items yet for pop to succeed. Signed-off-by: Steven Lariau Reviewed-by: Dharmik Thakkar Reviewed-by: Ruifeng Wang --- lib/librte_stack/rte_stack_lf_c11.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libr

[dpdk-dev] [PATCH 0/5] lib/stack: improve lockfree C11 implementation

2020-09-11 Thread Steven Lariau
+00.48% Steven Lariau (5): lib/stack: fix inconsistent weak / strong cas lib/stack: remove push acquire fence lib/stack: remove redundant orderings for list->len lib/stack: reload head when pop fails lib/stack: remove pop cas release ordering lib/librte_stack/rte_stack_lf_c

[dpdk-dev] [PATCH v2 1/4] test/stack: avoid trivial memory allocations

2020-08-12 Thread Steven Lariau
eeded either, because MAX_BULK is small. The allocation can instead be replaced with a static array. Signed-off-by: Steven Lariau Reviewed-by: Dharmik Thakkar Reviewed-by: Phil Yang Reviewed-by: Ruifeng Wang --- app/test/test_stack.c | 53 +++ 1 file change

[dpdk-dev] [PATCH v2 4/4] test/stack: remove atomics operations

2020-08-12 Thread Steven Lariau
the way of the actual stack testing. Signed-off-by: Steven Lariau Reviewed-by: Dharmik Thakkar Reviewed-by: Phil Yang Reviewed-by: Ruifeng Wang Acked-by: Gage Eads --- app/test/test_stack.c | 24 +++- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/

[dpdk-dev] [PATCH v2 0/4] test/stack: improve multithreaded test

2020-08-12 Thread Steven Lariau
rmore, this patch uses more appropriate functions to start / wait cores in order to simplify the code. The patch also adds code to propagate errors on any slave core to the master. v2: replace stack variable for arguments with a global variable. Steven Lariau (4): test/stack: avoid trivial m

[dpdk-dev] [PATCH v2 3/4] test/stack: propagate errors to main core

2020-08-12 Thread Steven Lariau
Use rte_eal_wait_lcore to wait and get the return value for all cores. This is used to propagate any error to the main core. Signed-off-by: Steven Lariau Reviewed-by: Dharmik Thakkar Reviewed-by: Phil Yang Reviewed-by: Ruifeng Wang Acked-by: Gage Eads --- app/test/test_stack.c | 10

[dpdk-dev] [PATCH v2 2/4] test/stack: launch tests with mp remote launch API

2020-08-12 Thread Steven Lariau
All the cores use the same argument object, so there is no need to use a loop to launch the test on every core one by one. Replace loop with one call to rte_eal_mp_remote_launch Signed-off-by: Steven Lariau Reviewed-by: Dharmik Thakkar Reviewed-by: Phil Yang Reviewed-by: Ruifeng Wang Acked-by

[dpdk-dev] [PATCH 4/4] test/stack: remove atomics operations

2020-08-06 Thread Steven Lariau
the way of the actual stack testing. Signed-off-by: Steven Lariau Reviewed-by: Dharmik Thakkar Reviewed-by: Phil Yang Reviewed-by: Ruifeng Wang --- app/test/test_stack.c | 23 +++ 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/app/test/test_stack.c b/

[dpdk-dev] [PATCH 1/4] test/stack: avoid trivial memory allocations

2020-08-06 Thread Steven Lariau
eeded either, because MAX_BULK is small. The allocation can instead be replaced with a static array. Signed-off-by: Steven Lariau Reviewed-by: Dharmik Thakkar Reviewed-by: Phil Yang Reviewed-by: Ruifeng Wang --- app/test/test_stack.c | 39 ++- 1 file chang

[dpdk-dev] [PATCH 3/4] test/stack: propagate errors to main core

2020-08-06 Thread Steven Lariau
Use rte_eal_wait_lcore to wait and get the return value for all cores. This is used to propagate any error to the main core. Signed-off-by: Steven Lariau Reviewed-by: Dharmik Thakkar Reviewed-by: Phil Yang Reviewed-by: Ruifeng Wang --- app/test/test_stack.c | 10 -- 1 file changed, 8

[dpdk-dev] [PATCH 0/4] test/stack: improve multithreaded test

2020-08-06 Thread Steven Lariau
brary. Furthermore, this patch uses more appropriate functions to start / wait cores in order to simplify the code. The patch also adds code to propagate errors on any slave core to the master. Steven Lariau (4): test/stack: avoid trivial memory allocations test/stack: launch tests with mp remote launc

[dpdk-dev] [PATCH 2/4] test/stack: launch tests with mp remote launch API

2020-08-06 Thread Steven Lariau
All the cores use the same argument object, so there is no need to use a loop to launch the test on every core one by one. Replace loop with one call to rte_eal_mp_remote_launch Signed-off-by: Steven Lariau Reviewed-by: Dharmik Thakkar Reviewed-by: Phil Yang Reviewed-by: Ruifeng Wang

[dpdk-dev] [PATCH 1/4] test/stack: avoid trivial memory allocations

2020-08-05 Thread Steven Lariau
eeded either, because MAX_BULK is small. The allocation can instead be replaced with a static array. Signed-off-by: Steven Lariau Reviewed-by: Dharmik Thakkar Reviewed-by: Phil Yang Reviewed-by: Ruifeng Wang --- app/test/test_stack.c | 39 ++- 1 file chang

[dpdk-dev] [PATCH 4/4] test/stack: remove atomics operations

2020-08-05 Thread Steven Lariau
the way of the actual stack testing. Signed-off-by: Steven Lariau Reviewed-by: Dharmik Thakkar Reviewed-by: Phil Yang Reviewed-by: Ruifeng Wang --- app/test/test_stack.c | 23 +++ 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/app/test/test_stack.c b/

[dpdk-dev] [PATCH 3/4] test/stack: propagate errors to main core

2020-08-05 Thread Steven Lariau
Use rte_eal_wait_lcore to wait and get the return value for all cores. This is used to propagate any error to the main core. Signed-off-by: Steven Lariau Reviewed-by: Dharmik Thakkar Reviewed-by: Phil Yang Reviewed-by: Ruifeng Wang --- app/test/test_stack.c | 10 -- 1 file changed, 8

[dpdk-dev] [PATCH 2/4] test/stack: launch tests with mp remote launch API

2020-08-05 Thread Steven Lariau
All the cores use the same argument object, so there is no need to use a loop to launch the test on every core one by one. Replace loop with one call to rte_eal_mp_remote_launch Signed-off-by: Steven Lariau Reviewed-by: Dharmik Thakkar Reviewed-by: Phil Yang Reviewed-by: Ruifeng Wang

[dpdk-dev] [PATCH 0/4] test/stack: improve multithreaded test

2020-08-05 Thread Steven Lariau
brary. Furthermore, this patch uses more appropriate functions to start / wait cores in order to simplify the code. The patch also adds code to propagate errors on any slave core to the master. Steven Lariau (4): test/stack: avoid trivial memory allocations test/stack: launch tests with mp remote launc