[PATCH v8 00/25] remove legacy atomic functions

David Marchand david.marchand at redhat.com
Tue Sep 29 11:17:19 CEST 2026


On Thu, 17 Sept 2026 at 22:11, Stephen Hemminger
<stephen at networkplumber.org> wrote:
>
> The rte_atomicNN_* family was flagged for deprecation in 2021 by
> commit 3ec965b6de12 ("doc: update atomic operation deprecation")
> but removal had stalled and usage continued to grow.
>
> This series finishes converting every remaining in-tree caller to
> the C11-style rte_atomic_*_explicit() / RTE_ATOMIC() API, then
> removes the legacy functions. The deprecation has been out there
> long enough so not a big surprise to users.
>
> Series-acked-by: Morten Brørup <mb at smartsharesystems.com>
>
> v8 - drop unused in_use flag in dpaa
>    - consolidate fslmc changes
>    - vmbus: use acquire ordering on the wait for the previous
>      producer so an earlier producer's data writes are carried by
>      this thread's release store (Long Li)
>    - collect review tags
>    - more AI review comments
>
> v7 - fix some review comments
>    - remove unused macros
>    - remove ret_atomicNN functions (rather than deprecating them).
>
> v6 - rebase for 26.11
>    - address some more AI review comments
>
> Stephen Hemminger (25):
>   bpf: use C11 atomics in BPF_ST_ATOMIC_REG
>   net/bonding: use stdatomic
>   net/nbl: remove unused rte_atomic16 field
>   net/ena: replace use of rte_atomicNN
>   net/failsafe: convert to stdatomic
>   net/enic: do not use deprecated rte_atomic64
>   net/pfe: use ethdev linkstatus helpers
>   net/sfc: replace rte_atomic with stdatomic
>   crypto/ccp: replace use of rte_atomic64 with stdatomic
>   bus/dpaa: remove unused in_use field
>   bus/dpaa: replace rte_atomic16 with stdatomic
>   bus/fslmc: replace rte_atomic with stdatomic
>   common/dpaax: remove unused atomic wrappers
>   net/netvsc: replace rte_atomic32 with stdatomic
>   event/sw: convert from rte_atomic32 to stdatomic
>   bus/vmbus: convert from rte_atomic to stdatomic
>   net/bnx2x: convert from rte_atomic32 to stdatomic
>   drivers/event: replace rte_atomic32 in selftests
>   net/hinic: replace rte_atomic32 with stdatomic
>   net/txgbe: replace rte_atomic32 with stdatomic
>   net/vhost: use stdatomic for state flags
>   net/vhost: use stdatomic instead of rte_atomic32
>   vdpa/ifc: replace rte_atomic32 with stdatomic
>   test/atomic: drop old rte_atomicNN tests
>   eal: remove rte_atomicNN functions
>
>  app/test/test_atomic.c                        | 523 +---------
>  devtools/checkpatches.sh                      |   8 -
>  .../prog_guide/writing_efficient_code.rst     |   9 +-
>  doc/guides/rel_notes/deprecation.rst          |   7 -
>  doc/guides/rel_notes/release_26_11.rst        |   7 +
>  drivers/bus/dpaa/base/qbman/bman.c            |   7 +-
>  drivers/bus/dpaa/base/qbman/qman.c            |   9 +-
>  drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c      |  11 +-
>  drivers/bus/fslmc/portal/dpaa2_hw_dpci.c      |  11 +-
>  drivers/bus/fslmc/portal/dpaa2_hw_dpcon.c     |  11 +-
>  drivers/bus/fslmc/portal/dpaa2_hw_dpio.c      |  14 +-
>  drivers/bus/fslmc/portal/dpaa2_hw_pvt.h       |   9 +-
>  drivers/bus/fslmc/qbman/include/compat.h      |  18 +-
>  drivers/bus/vmbus/private.h                   |   2 +-
>  drivers/bus/vmbus/vmbus_bufring.c             |  40 +-
>  drivers/common/dpaax/compat.h                 |  14 -
>  drivers/crypto/ccp/ccp_crypto.c               |  11 +-
>  drivers/crypto/ccp/ccp_crypto.h               |   2 +-
>  drivers/crypto/ccp/ccp_dev.c                  |  10 +-
>  drivers/crypto/ccp/ccp_dev.h                  |   4 +-
>  drivers/event/dpaa2/dpaa2_eventdev_selftest.c |  26 +-
>  drivers/event/octeontx/ssovf_evdev_selftest.c |  57 +-
>  drivers/event/sw/sw_evdev.c                   |   8 +-
>  drivers/event/sw/sw_evdev.h                   |   4 +-
>  drivers/event/sw/sw_evdev_worker.c            |  16 +-
>  drivers/net/bnx2x/bnx2x.c                     |   6 +-
>  drivers/net/bnx2x/bnx2x.h                     |   2 +-
>  drivers/net/bnx2x/ecore_sp.c                  |   6 +-
>  drivers/net/bonding/eth_bond_8023ad_private.h |   6 +-
>  drivers/net/bonding/rte_eth_bond_8023ad.c     |  35 +-
>  drivers/net/ena/base/ena_plat_dpdk.h          |  14 +-
>  drivers/net/ena/ena_ethdev.c                  |  21 +-
>  drivers/net/ena/ena_ethdev.h                  |   7 +-
>  drivers/net/enic/enic.h                       |   6 +-
>  drivers/net/enic/enic_compat.h                |   1 -
>  drivers/net/enic/enic_main.c                  |  17 +-
>  drivers/net/enic/enic_rxtx.c                  |  14 +-
>  drivers/net/enic/enic_rxtx_vec_avx2.c         |   4 +-
>  drivers/net/failsafe/failsafe_ops.c           |  12 +-
>  drivers/net/failsafe/failsafe_private.h       |  29 +-
>  drivers/net/failsafe/failsafe_rxtx.c          |   2 +-
>  drivers/net/hinic/base/hinic_compat.h         |   2 +-
>  drivers/net/hinic/base/hinic_pmd_hwdev.c      |  24 +-
>  drivers/net/hinic/base/hinic_pmd_hwdev.h      |   4 +-
>  drivers/net/nbl/nbl_hw/nbl_resource.h         |   1 -
>  drivers/net/netvsc/hn_rndis.c                 |  28 +-
>  drivers/net/netvsc/hn_rxtx.c                  |  12 +-
>  drivers/net/netvsc/hn_var.h                   |   6 +-
>  drivers/net/pfe/pfe_ethdev.c                  |  32 +-
>  drivers/net/sfc/sfc.c                         |   9 +-
>  drivers/net/sfc/sfc.h                         |   4 +-
>  drivers/net/sfc/sfc_port.c                    |   7 +-
>  drivers/net/sfc/sfc_stats.h                   |   2 +-
>  drivers/net/txgbe/base/txgbe_mng.c            |   4 +-
>  drivers/net/txgbe/base/txgbe_type.h           |   2 +-
>  drivers/net/vhost/rte_eth_vhost.c             |  92 +-
>  drivers/vdpa/ifc/ifcvf_vdpa.c                 |  37 +-
>  lib/bpf/bpf_exec.c                            |  13 +-
>  lib/eal/arm/include/rte_atomic_32.h           |   4 -
>  lib/eal/arm/include/rte_atomic_64.h           |   4 -
>  lib/eal/include/generic/rte_atomic.h          | 928 ------------------
>  lib/eal/loongarch/include/rte_atomic.h        |   4 -
>  lib/eal/ppc/include/rte_atomic.h              | 175 ----
>  lib/eal/riscv/include/rte_atomic.h            |   4 -
>  lib/eal/x86/include/meson.build               |   1 -
>  lib/eal/x86/include/rte_atomic.h              | 187 +---
>  lib/eal/x86/include/rte_atomic_32.h           | 212 ----
>  lib/eal/x86/include/rte_atomic_64.h           | 157 ---
>  68 files changed, 416 insertions(+), 2559 deletions(-)
>  delete mode 100644 lib/eal/x86/include/rte_atomic_32.h

AI review spots that concurrent non atomic increments is undefined
behavior (in at least net/ena).
There is also one nit in net/enic.

There may be some leftover, but I spotted nothing more for now.
The series lgtm on the principle.


-- 
David Marchand



More information about the dev mailing list