[v4,00/45] use stdatomic API

Message ID 1713568003-30453-1-git-send-email-roretzla@linux.microsoft.com (mailing list archive)
Headers
Series use stdatomic API |

Message

Tyler Retzlaff April 19, 2024, 11:05 p.m. UTC
s series converts all non-generic built atomics to use the rte_atomic
macros that allow optional enablement of standard C11 atomics.

Use of generic atomics for non-scalar types are not converted in this
change and will be evaluated as a part of a separate series.

Note if this series ends up requiring too much rebasing due to tree
churn before it is merged i will break it up into smaller series.

v4:
  * rebase after merge of move alignment attribute on types for MSVC,
    no other changes.

v3:
  * event/dsw, wrap all lines <= 80 chars, align arguments to
    opening parenthesis.
  * event/dlb2, wrap changed lines <= 80 chars, remove comments
    referencing gcc __atomic built-ins.
  * bus/vmbus, remove comment referencing gcc atomic built-ins,
    fix mistake where monitor_mask was declared RTE_ATOMIC(uint32_t),
    fix mistake where pending was not declared RTE_ATOMIC(uint32_t),
    remove now unnecessary cast to __rte_atomic of pending (since
    the field is now properly declare RTE_ATOMIC).

v2:
  * drop the net/sfc driver from the series. the sfc driver
    uses generic __atomic_store not handled by the current macros.
    the cases where generic __atomic_xxx are used on objects that
    can't be accepted by __atomic_xxx_n will be addressed in a
    separate series.

Tyler Retzlaff (45):
  net/mlx5: use rte stdatomic API
  net/ixgbe: use rte stdatomic API
  net/iavf: use rte stdatomic API
  net/ice: use rte stdatomic API
  net/i40e: use rte stdatomic API
  net/hns3: use rte stdatomic API
  net/bnxt: use rte stdatomic API
  net/cpfl: use rte stdatomic API
  net/af_xdp: use rte stdatomic API
  net/octeon_ep: use rte stdatomic API
  net/octeontx: use rte stdatomic API
  net/cxgbe: use rte stdatomic API
  net/gve: use rte stdatomic API
  net/memif: use rte stdatomic API
  net/thunderx: use rte stdatomic API
  net/virtio: use rte stdatomic API
  net/hinic: use rte stdatomic API
  net/idpf: use rte stdatomic API
  net/qede: use rte stdatomic API
  net/ring: use rte stdatomic API
  vdpa/mlx5: use rte stdatomic API
  raw/ifpga: use rte stdatomic API
  event/opdl: use rte stdatomic API
  event/octeontx: use rte stdatomic API
  event/dsw: use rte stdatomic API
  dma/skeleton: use rte stdatomic API
  crypto/octeontx: use rte stdatomic API
  common/mlx5: use rte stdatomic API
  common/idpf: use rte stdatomic API
  common/iavf: use rte stdatomic API
  baseband/acc: use rte stdatomic API
  net/txgbe: use rte stdatomic API
  net/null: use rte stdatomic API
  event/dlb2: use rte stdatomic API
  dma/idxd: use rte stdatomic API
  crypto/ccp: use rte stdatomic API
  common/cpt: use rte stdatomic API
  bus/vmbus: use rte stdatomic API
  examples: use rte stdatomic API
  app/dumpcap: use rte stdatomic API
  app/test: use rte stdatomic API
  app/test-eventdev: use rte stdatomic API
  app/test-crypto-perf: use rte stdatomic API
  app/test-compress-perf: use rte stdatomic API
  app/test-bbdev: use rte stdatomic API

 app/dumpcap/main.c                                 |  12 +-
 app/test-bbdev/test_bbdev_perf.c                   | 183 +++++++++++++--------
 app/test-compress-perf/comp_perf_test_common.h     |   2 +-
 app/test-compress-perf/comp_perf_test_cyclecount.c |   4 +-
 app/test-compress-perf/comp_perf_test_throughput.c |  10 +-
 app/test-compress-perf/comp_perf_test_verify.c     |   6 +-
 app/test-crypto-perf/cperf_test_latency.c          |   6 +-
 app/test-crypto-perf/cperf_test_pmd_cyclecount.c   |  10 +-
 app/test-crypto-perf/cperf_test_throughput.c       |  10 +-
 app/test-crypto-perf/cperf_test_verify.c           |  10 +-
 app/test-eventdev/test_order_atq.c                 |   4 +-
 app/test-eventdev/test_order_common.c              |   5 +-
 app/test-eventdev/test_order_common.h              |   8 +-
 app/test-eventdev/test_order_queue.c               |   4 +-
 app/test-eventdev/test_perf_common.h               |   6 +-
 app/test/test_bpf.c                                |  46 ++++--
 app/test/test_distributor.c                        | 114 ++++++-------
 app/test/test_distributor_perf.c                   |   4 +-
 app/test/test_func_reentrancy.c                    |  28 ++--
 app/test/test_hash_multiwriter.c                   |  16 +-
 app/test/test_hash_readwrite.c                     |  74 ++++-----
 app/test/test_hash_readwrite_lf_perf.c             |  88 +++++-----
 app/test/test_lcores.c                             |  25 +--
 app/test/test_lpm_perf.c                           |  14 +-
 app/test/test_mcslock.c                            |  12 +-
 app/test/test_mempool_perf.c                       |   9 +-
 app/test/test_pflock.c                             |  13 +-
 app/test/test_pmd_perf.c                           |  10 +-
 app/test/test_rcu_qsbr_perf.c                      | 114 ++++++-------
 app/test/test_ring_perf.c                          |  11 +-
 app/test/test_ring_stress_impl.h                   |  10 +-
 app/test/test_rwlock.c                             |   9 +-
 app/test/test_seqlock.c                            |   6 +-
 app/test/test_service_cores.c                      |  24 +--
 app/test/test_spinlock.c                           |   9 +-
 app/test/test_stack_perf.c                         |  12 +-
 app/test/test_threads.c                            |  33 ++--
 app/test/test_ticketlock.c                         |   9 +-
 app/test/test_timer.c                              |  31 ++--
 drivers/baseband/acc/rte_acc100_pmd.c              |  36 ++--
 drivers/baseband/acc/rte_vrb_pmd.c                 |  46 ++++--
 drivers/bus/vmbus/rte_vmbus_reg.h                  |   2 +-
 drivers/bus/vmbus/vmbus_channel.c                  |   8 +-
 drivers/common/cpt/cpt_common.h                    |   2 +-
 drivers/common/iavf/iavf_impl.c                    |   4 +-
 drivers/common/idpf/idpf_common_device.h           |   6 +-
 drivers/common/idpf/idpf_common_rxtx.c             |  14 +-
 drivers/common/idpf/idpf_common_rxtx.h             |   2 +-
 drivers/common/idpf/idpf_common_rxtx_avx512.c      |  16 +-
 drivers/common/mlx5/linux/mlx5_nl.c                |   5 +-
 drivers/common/mlx5/mlx5_common.h                  |   2 +-
 drivers/common/mlx5/mlx5_common_mr.c               |  16 +-
 drivers/common/mlx5/mlx5_common_mr.h               |   2 +-
 drivers/common/mlx5/mlx5_common_utils.c            |  32 ++--
 drivers/common/mlx5/mlx5_common_utils.h            |   6 +-
 drivers/common/mlx5/mlx5_malloc.c                  |  58 +++----
 drivers/crypto/ccp/ccp_dev.c                       |   8 +-
 drivers/crypto/octeontx/otx_cryptodev_ops.c        |   4 +-
 drivers/dma/idxd/idxd_internal.h                   |   2 +-
 drivers/dma/idxd/idxd_pci.c                        |   9 +-
 drivers/dma/skeleton/skeleton_dmadev.c             |   5 +-
 drivers/dma/skeleton/skeleton_dmadev.h             |   2 +-
 drivers/event/dlb2/dlb2.c                          |  34 ++--
 drivers/event/dlb2/dlb2_priv.h                     |  13 +-
 drivers/event/dlb2/dlb2_xstats.c                   |   2 +-
 drivers/event/dsw/dsw_evdev.h                      |   6 +-
 drivers/event/dsw/dsw_event.c                      |  47 ++++--
 drivers/event/dsw/dsw_xstats.c                     |   4 +-
 drivers/event/octeontx/timvf_evdev.h               |   8 +-
 drivers/event/octeontx/timvf_worker.h              |  36 ++--
 drivers/event/opdl/opdl_ring.c                     |  80 ++++-----
 drivers/net/af_xdp/rte_eth_af_xdp.c                |  20 ++-
 drivers/net/bnxt/bnxt_cpr.h                        |   4 +-
 drivers/net/bnxt/bnxt_rxq.h                        |   2 +-
 drivers/net/bnxt/bnxt_rxr.c                        |  13 +-
 drivers/net/bnxt/bnxt_rxtx_vec_neon.c              |   2 +-
 drivers/net/bnxt/bnxt_stats.c                      |   4 +-
 drivers/net/cpfl/cpfl_ethdev.c                     |   8 +-
 drivers/net/cxgbe/clip_tbl.c                       |  12 +-
 drivers/net/cxgbe/clip_tbl.h                       |   2 +-
 drivers/net/cxgbe/cxgbe_main.c                     |  20 +--
 drivers/net/cxgbe/cxgbe_ofld.h                     |   6 +-
 drivers/net/cxgbe/l2t.c                            |  12 +-
 drivers/net/cxgbe/l2t.h                            |   2 +-
 drivers/net/cxgbe/mps_tcam.c                       |  21 +--
 drivers/net/cxgbe/mps_tcam.h                       |   2 +-
 drivers/net/cxgbe/smt.c                            |  12 +-
 drivers/net/cxgbe/smt.h                            |   2 +-
 drivers/net/gve/base/gve_osdep.h                   |   4 +-
 drivers/net/hinic/hinic_pmd_rx.c                   |   2 +-
 drivers/net/hinic/hinic_pmd_rx.h                   |   2 +-
 drivers/net/hns3/hns3_cmd.c                        |  18 +-
 drivers/net/hns3/hns3_dcb.c                        |   2 +-
 drivers/net/hns3/hns3_ethdev.c                     |  36 ++--
 drivers/net/hns3/hns3_ethdev.h                     |  32 ++--
 drivers/net/hns3/hns3_ethdev_vf.c                  |  60 +++----
 drivers/net/hns3/hns3_intr.c                       |  36 ++--
 drivers/net/hns3/hns3_intr.h                       |   4 +-
 drivers/net/hns3/hns3_mbx.c                        |   6 +-
 drivers/net/hns3/hns3_mp.c                         |   6 +-
 drivers/net/hns3/hns3_rxtx.c                       |  10 +-
 drivers/net/hns3/hns3_tm.c                         |   4 +-
 drivers/net/i40e/i40e_ethdev.c                     |   4 +-
 drivers/net/i40e/i40e_rxtx.c                       |   6 +-
 drivers/net/i40e/i40e_rxtx_vec_neon.c              |   2 +-
 drivers/net/iavf/iavf.h                            |  16 +-
 drivers/net/iavf/iavf_rxtx.c                       |   4 +-
 drivers/net/iavf/iavf_rxtx_vec_neon.c              |   2 +-
 drivers/net/iavf/iavf_vchnl.c                      |  14 +-
 drivers/net/ice/base/ice_osdep.h                   |   4 +-
 drivers/net/ice/ice_dcf.c                          |   6 +-
 drivers/net/ice/ice_dcf.h                          |   2 +-
 drivers/net/ice/ice_dcf_ethdev.c                   |   8 +-
 drivers/net/ice/ice_dcf_parent.c                   |  16 +-
 drivers/net/ice/ice_ethdev.c                       |  12 +-
 drivers/net/ice/ice_ethdev.h                       |   2 +-
 drivers/net/idpf/idpf_ethdev.c                     |   7 +-
 drivers/net/ixgbe/ixgbe_ethdev.c                   |  14 +-
 drivers/net/ixgbe/ixgbe_ethdev.h                   |   2 +-
 drivers/net/ixgbe/ixgbe_rxtx.c                     |   4 +-
 drivers/net/memif/memif.h                          |   4 +-
 drivers/net/memif/rte_eth_memif.c                  |  50 +++---
 drivers/net/mlx5/linux/mlx5_ethdev_os.c            |   6 +-
 drivers/net/mlx5/linux/mlx5_verbs.c                |   9 +-
 drivers/net/mlx5/mlx5.c                            |   9 +-
 drivers/net/mlx5/mlx5.h                            |  66 ++++----
 drivers/net/mlx5/mlx5_flow.c                       |  37 +++--
 drivers/net/mlx5/mlx5_flow.h                       |   8 +-
 drivers/net/mlx5/mlx5_flow_aso.c                   |  43 +++--
 drivers/net/mlx5/mlx5_flow_dv.c                    | 126 +++++++-------
 drivers/net/mlx5/mlx5_flow_flex.c                  |  14 +-
 drivers/net/mlx5/mlx5_flow_hw.c                    |  61 +++----
 drivers/net/mlx5/mlx5_flow_meter.c                 |  30 ++--
 drivers/net/mlx5/mlx5_flow_quota.c                 |  32 ++--
 drivers/net/mlx5/mlx5_hws_cnt.c                    |  71 ++++----
 drivers/net/mlx5/mlx5_hws_cnt.h                    |  10 +-
 drivers/net/mlx5/mlx5_rx.h                         |  14 +-
 drivers/net/mlx5/mlx5_rxq.c                        |  30 ++--
 drivers/net/mlx5/mlx5_trigger.c                    |   2 +-
 drivers/net/mlx5/mlx5_tx.h                         |  18 +-
 drivers/net/mlx5/mlx5_txpp.c                       |  84 +++++-----
 drivers/net/mlx5/mlx5_txq.c                        |  12 +-
 drivers/net/mlx5/mlx5_utils.c                      |  10 +-
 drivers/net/mlx5/mlx5_utils.h                      |   4 +-
 drivers/net/null/rte_eth_null.c                    |  12 +-
 drivers/net/octeon_ep/cnxk_ep_rx.h                 |   5 +-
 drivers/net/octeon_ep/cnxk_ep_tx.c                 |   5 +-
 drivers/net/octeon_ep/cnxk_ep_vf.c                 |   8 +-
 drivers/net/octeon_ep/otx2_ep_vf.c                 |   8 +-
 drivers/net/octeon_ep/otx_ep_common.h              |   4 +-
 drivers/net/octeon_ep/otx_ep_rxtx.c                |   6 +-
 drivers/net/octeontx/octeontx_ethdev.c             |   8 +-
 drivers/net/qede/base/bcm_osal.c                   |   6 +-
 drivers/net/ring/rte_eth_ring.c                    |   8 +-
 drivers/net/thunderx/nicvf_rxtx.c                  |   9 +-
 drivers/net/thunderx/nicvf_struct.h                |   4 +-
 drivers/net/txgbe/txgbe_ethdev.c                   |  12 +-
 drivers/net/txgbe/txgbe_ethdev.h                   |   2 +-
 drivers/net/txgbe/txgbe_ethdev_vf.c                |   2 +-
 drivers/net/virtio/virtio_ring.h                   |   4 +-
 drivers/net/virtio/virtio_user/virtio_user_dev.c   |  12 +-
 drivers/net/virtio/virtqueue.h                     |  32 ++--
 drivers/raw/ifpga/ifpga_rawdev.c                   |   9 +-
 drivers/vdpa/mlx5/mlx5_vdpa.c                      |  24 +--
 drivers/vdpa/mlx5/mlx5_vdpa.h                      |  14 +-
 drivers/vdpa/mlx5/mlx5_vdpa_cthread.c              |  46 +++---
 drivers/vdpa/mlx5/mlx5_vdpa_lm.c                   |   4 +-
 drivers/vdpa/mlx5/mlx5_vdpa_mem.c                  |   4 +-
 drivers/vdpa/mlx5/mlx5_vdpa_virtq.c                |   4 +-
 examples/bbdev_app/main.c                          |  13 +-
 examples/l2fwd-event/l2fwd_common.h                |   4 +-
 examples/l2fwd-event/l2fwd_event.c                 |  24 +--
 examples/l2fwd-jobstats/main.c                     |  11 +-
 .../client_server_mp/mp_server/main.c              |   6 +-
 examples/server_node_efd/efd_server/main.c         |   6 +-
 examples/vhost/main.c                              |  32 ++--
 examples/vhost/main.h                              |   4 +-
 examples/vhost/virtio_net.c                        |  13 +-
 examples/vhost_blk/vhost_blk.c                     |   8 +-
 examples/vm_power_manager/channel_monitor.c        |   9 +-
 180 files changed, 1641 insertions(+), 1500 deletions(-)