This patch fixes a subtle ordering issue in the ring code that can lead to incorrect behavior under certain conditions. The change adopts a solution that balances performance with compatibility for dependent libraries.
For background, motivation, and validation (including Herd7 litmus tests), see the accompanying write-up: https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/when-a-barrier-does-not-block-the-pitfalls-of-partial-order V1->V2: * Switched from squashing unsafe partial orders (solution #3) to * establishing a pairwise happens-before relationship between the * producer and consumer heads (solution #2). V2->V3 (Konstantin): * Added Fixes and CC to stable * Extend patch to cover HTS and RTS mode Wathsala Vithanage (1): ring: fix unsafe ordering for head/tail update lib/ring/rte_ring_c11_pvt.h | 9 +++------ lib/ring/rte_ring_hts_elem_pvt.h | 6 ++++-- lib/ring/rte_ring_rts_elem_pvt.h | 6 ++++-- 3 files changed, 11 insertions(+), 10 deletions(-) -- 2.51.0

