On Wed, 14 Oct 2026 at 00:35, Stephen Hemminger <[email protected]> wrote: > > This patch series completes the removal of rte_smp_XX barrier > functions that was announced over five years ago (20.05). > > In the process several race conditions were found and fixed. See > patches 3, 4 and 17, marked with Fixes: and Cc: stable. Patch 2 is > also marked for stable because 3 and 4 do not build with clang > without it. > > Most of this is mechanical with AI assistance, so strongly encourage > maintainers to take a good look. > > Barriers ordering memory writes against a device doorbell now use > rte_io_wmb() rather than an SMP barrier; on arm64 that is dmb oshst > instead of dmb ishst. In some cases the C11 form gives marginal > performance gains. > > The lock-free stack patch measured faster than the generic version it > replaces, up to 63% on a 32-core x86 box; the numbers are in that > patch's commit message. > > Patch 19 keeps the Peterson lock test, converted to C11 atomics, with > the seq_cst fence and rte_mb() as its two cases. It comes before > patch 20, which holds the last rte_smp_mb() caller, so x86 builds > with tests enabled stay bisectable. Tested on x86, arm and riscv; > still untested on ppc and loongarch. > > Patch 18 has no ack. Bruce, yours landed on 17; 18 changed since. > > Left for follow-up: device read barriers in patches 6, 8 and 14 are > acquire fences where rte_io_rmb() would match the write side (same > generated code today, so no regression). And the net/thunderx mailbox > flags in patch 10 are plain bitfields that need to be atomic, which > is pre-existing. > > v4 - rebase on main, which obsoleted the netvsc patch; address review > comments from Konstantin, Marat, David and Wei Hu; collect tags > > Stephen Hemminger (29): > bpf: replace deprecated SMP barriers with C11 fences > bus/vmbus: remove packed attribute from ring buffer > bus/vmbus: fix ring buffer ordering on weakly ordered CPUs > bus/vmbus: fix missing acquire on receive ring index > bus/vmbus: replace SMP barriers with C11 memory fences > drivers/baseband: convert rte_smp_rmb to fence > net/hinic: replace rte_smp_rmb > net/intel: replace rte_smp_rmb > net/virtio: replace rte_smp_rmb > net/thunderx: replace deprecated SMP barriers > stack: always use C11 memory model implementation > ring: replace SMP read barrier with C11 acquire fence > crypto/virtio: update comment reference to rte_smp_rmb > crypto/caam_jr: replace rte_smp_rmb > crypto/caam_jr: use IO barrier before job ring doorbell > crypto/octeontx: use IO barrier before doorbell > event/sw: fix unlinks in progress counter races > event/sw: replace SMP barriers with C11 atomics > test/barrier: convert to C11 atomics > eal/x86: move optimized fence out of SMP barrier > common/octeontx: remove redundant barrier in mbox > mempool/octeontx: use IO barrier in pool destroy > event/octeontx: replace deprecated SMP barriers > event/dpaa2: replace deprecated barrier in selftest > event/dsw: replace SMP barriers with release fences > event/opdl: replace SMP barriers with C11 atomics > net/virtio: replace deprecated barrier in avail index update > eal: remove stale SMP barrier in rte_service > eal: remove rte_smp_XX > > app/test/test_barrier.c | 71 ++++---- > devtools/checkpatches.sh | 8 - > doc/guides/rel_notes/deprecation.rst | 8 - > doc/guides/rel_notes/release_26_11.rst | 11 ++ > .../fpga_5gnr_fec/rte_fpga_5gnr_fec.c | 8 +- > drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 12 +- > drivers/bus/vmbus/private.h | 12 +- > drivers/bus/vmbus/rte_vmbus_reg.h | 4 +- > drivers/bus/vmbus/vmbus_bufring.c | 22 +-- > drivers/bus/vmbus/vmbus_channel.c | 13 +- > drivers/common/octeontx/octeontx_mbox.c | 6 +- > drivers/crypto/caam_jr/caam_jr.c | 5 +- > .../crypto/octeontx/otx_cryptodev_hw_access.h | 4 +- > drivers/crypto/virtio/virtqueue.h | 8 +- > drivers/event/dpaa2/dpaa2_eventdev_selftest.c | 4 +- > drivers/event/dsw/dsw_event.c | 8 +- > drivers/event/octeontx/ssovf_evdev_selftest.c | 6 +- > drivers/event/octeontx/ssovf_worker.c | 8 +- > drivers/event/opdl/opdl_evdev.c | 8 +- > drivers/event/sw/sw_evdev.c | 37 +++-- > drivers/event/sw/sw_evdev.h | 11 +- > drivers/event/sw/sw_evdev_scheduler.c | 24 ++- > drivers/mempool/octeontx/octeontx_fpavf.c | 4 +- > drivers/net/hinic/base/hinic_pmd_cmdq.c | 3 +- > drivers/net/hinic/base/hinic_pmd_mgmt.c | 2 +- > drivers/net/intel/ice/ice_rxtx.c | 2 +- > drivers/net/intel/ixgbe/ixgbe_rxtx.c | 2 +- > drivers/net/thunderx/base/nicvf_hw.c | 3 +- > drivers/net/thunderx/base/nicvf_plat.h | 5 +- > drivers/net/virtio/virtqueue.h | 22 +-- > lib/bpf/bpf_pkt.c | 26 +-- > lib/eal/arm/include/rte_atomic_32.h | 6 - > lib/eal/arm/include/rte_atomic_64.h | 6 - > lib/eal/common/rte_service.c | 1 - > lib/eal/include/generic/rte_atomic.h | 61 ------- > lib/eal/loongarch/include/rte_atomic.h | 6 - > lib/eal/ppc/include/rte_atomic.h | 6 - > lib/eal/riscv/include/rte_atomic.h | 6 - > lib/eal/x86/include/rte_atomic.h | 41 ++--- > lib/ring/rte_ring_gcc_pvt.h | 6 +- > lib/stack/meson.build | 1 - > lib/stack/rte_stack_lf.h | 4 - > lib/stack/rte_stack_lf_generic.h | 153 ------------------ > 43 files changed, 226 insertions(+), 438 deletions(-) > delete mode 100644 lib/stack/rte_stack_lf_generic.h
Thank you for this big cleanup. Series applied. -- David Marchand

