stack: remove redundant orderings on pop
authorSteven Lariau <steven.lariau@arm.com>
Fri, 25 Sep 2020 17:43:37 +0000 (18:43 +0100)
committerDavid Marchand <david.marchand@redhat.com>
Wed, 30 Sep 2020 19:08:39 +0000 (21:08 +0200)
commit2cdfe4e57765e46eed03e42c7c3f78cf22d7dc61
treec074445a923faabf8ff3fd55dd85095fdaeb630d
parent9e90bc9c712c4afc96ad9d08a1c9fbc87f481513
stack: remove redundant orderings on pop

The load-acquire of list->len on pop function is redundant.
Only the CAS success needs to be load-acquire.
It synchronizes with the store release in push, to ensure that the
updated head is visible when the new length is visible.
Without this, one thread in pop could see the increased length but the
old list, which doesn't have enough items yet for pop to succeed.

Signed-off-by: Steven Lariau <steven.lariau@arm.com>
Reviewed-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Gage Eads <gage.eads@intel.com>
lib/librte_stack/rte_stack_lf_c11.h