stack: fix reload head when pop fails
authorJulien Meunier <julien.meunier@nokia.com>
Tue, 21 Sep 2021 16:17:24 +0000 (18:17 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 27 Sep 2021 15:28:55 +0000 (17:28 +0200)
commit6ded44bce4d3e5f4fce66f00ce0638ebc866911f
tree1f04062e211790cac529a1edf54a5d849be96793
parent6e914454d5083046497bbd764ff5ae1547e8c6b1
stack: fix reload head when pop fails

The previous commit 18effad9cfa7 ("stack: reload head when pop fails")
only changed C11 implementation, not generic implementation.

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.

Fixes: 3340202f5954 ("stack: add lock-free implementation")
Cc: stable@dpdk.org
Signed-off-by: Julien Meunier <julien.meunier@nokia.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
lib/stack/rte_stack_lf_generic.h