Per-worker '&thread_tbl[i]' instance should be initialized
by 'odph_linux_pthread_create()'.

However, 'thread_tbl' (the array itself) was accidentally passed to
'odph_linux_pthread_create', re-initializing 'thread_tbl[0]' on each
iteration.

Fix by passing '&thread_tbl[i]' instead.

Signed-off-by: Shmulik Ladkani <[email protected]>
---
 example/ipsec/odp_ipsec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/example/ipsec/odp_ipsec.c b/example/ipsec/odp_ipsec.c
index ec115fc39e..40b34d09c7 100644
--- a/example/ipsec/odp_ipsec.c
+++ b/example/ipsec/odp_ipsec.c
@@ -1314,7 +1314,7 @@ main(int argc, char *argv[])
                 * because each thread might get different arguments.
                 * Calls odp_thread_create(cpu) for each thread
                 */
-               odph_linux_pthread_create(thread_tbl, 1, core, pktio_thread,
+               odph_linux_pthread_create(&thread_tbl[i], 1, core, pktio_thread,
                                          NULL);
        }
 
-- 
1.9.1


_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to