DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 20.05 00/15] clean-up use of __attribute__
@ 2020-02-10 16:20 Thomas Monjalon
  2020-02-10 16:20 ` [dpdk-dev] [PATCH 20.05 01/15] app/bbdev: replace constructor syntax with common macro Thomas Monjalon
                   ` (15 more replies)
  0 siblings, 16 replies; 20+ messages in thread
From: Thomas Monjalon @ 2020-02-10 16:20 UTC (permalink / raw)
  To: dev

Almost all usages of __attribute__ keyword are replaced
by a macro (existing or new) with prefix __rte_.
It makes code more consistent and will help changing
compiler behaviour, or adapting to new compilers,
in a central place.

Kernel and BPF files cannot use macros from rte_common.h.
Some rare attributes are also kept unchanged.


Thomas Monjalon (15):
  app/bbdev: replace constructor syntax with common macro
  net/mlx5: replace destructor syntax with common macro
  net/memif: use common macros for cache line marker
  common/mlx5: replace alignas keyword
  replace alignment attributes
  replace packed attributes
  replace always-inline attributes
  replace no-inline attributes
  replace unused attributes
  replace used attributes
  replace hot attributes
  replace cold attributes
  replace no-return attributes
  replace printf format attributes
  devtools: check use of compiler attributes

 app/test-acl/main.c                           |   2 +-
 app/test-bbdev/main.h                         |   3 +-
 app/test-cmdline/cmdline_test.c               |   4 +-
 app/test-cmdline/commands.c                   |  40 +-
 app/test-crypto-perf/cperf_test_common.c      |   2 +-
 app/test-eventdev/test_order_atq.c            |   2 +-
 app/test-eventdev/test_order_common.h         |   4 +-
 app/test-eventdev/test_order_queue.c          |   2 +-
 app/test-eventdev/test_perf_atq.c             |   4 +-
 app/test-eventdev/test_perf_common.h          |   4 +-
 app/test-eventdev/test_perf_queue.c           |   4 +-
 app/test-pipeline/main.c                      |   2 +-
 app/test-pipeline/pipeline_hash.c             |  10 +-
 app/test-pmd/bpf_cmd.c                        |   8 +-
 app/test-pmd/cmdline.c                        | 832 ++++++++---------
 app/test-pmd/cmdline_mtr.c                    |  56 +-
 app/test-pmd/cmdline_tm.c                     |  88 +-
 app/test-pmd/csumonly.c                       |   2 +-
 app/test-pmd/txonly.c                         |   2 +-
 app/test/commands.c                           |  20 +-
 app/test/test_atomic.c                        |  14 +-
 app/test/test_cmdline_lib.c                   |  18 +-
 app/test/test_efd.c                           |   2 +-
 app/test/test_func_reentrancy.c               |  14 +-
 app/test/test_hash.c                          |   8 +-
 app/test/test_hash_readwrite.c                |   2 +-
 app/test/test_hash_readwrite_lf_perf.c        |   8 +-
 app/test/test_malloc.c                        |   6 +-
 app/test/test_mcslock.c                       |   4 +-
 app/test/test_member.c                        |   2 +-
 app/test/test_mempool.c                       |   6 +-
 app/test/test_mempool_perf.c                  |   2 +-
 app/test/test_per_lcore.c                     |   6 +-
 app/test/test_rwlock.c                        |   4 +-
 app/test/test_spinlock.c                      |   6 +-
 app/test/test_table.c                         |  10 +-
 app/test/test_table.h                         |  10 +-
 app/test/test_table_pipeline.c                |  22 +-
 app/test/test_ticketlock.c                    |   6 +-
 app/test/test_timer.c                         |  10 +-
 app/test/test_timer_racecond.c                |   2 +-
 devtools/checkpatches.sh                      |   8 +
 .../prog_guide/packet_classif_access_ctrl.rst |   2 +-
 doc/guides/sample_app_ug/cmd_line.rst         |   2 +-
 doc/guides/sample_app_ug/flow_classify.rst    |   2 +-
 doc/guides/sample_app_ug/hello_world.rst      |   2 +-
 .../sample_app_ug/l3_forward_power_man.rst    |   2 +-
 .../sample_app_ug/performance_thread.rst      |   2 +-
 doc/guides/sample_app_ug/skeleton.rst         |   2 +-
 doc/guides/sample_app_ug/timer.rst            |   4 +-
 drivers/baseband/fpga_lte_fec/fpga_lte_fec.c  |   6 +-
 drivers/bus/dpaa/base/qbman/qman.c            |   2 +-
 drivers/bus/dpaa/include/fsl_bman.h           |   2 +-
 drivers/bus/dpaa/include/fsl_fman.h           |   2 +-
 drivers/bus/dpaa/include/fsl_qman.h           |   2 +-
 drivers/bus/fslmc/portal/dpaa2_hw_pvt.h       |   4 +-
 drivers/bus/ifpga/rte_bus_ifpga.h             |   6 +-
 drivers/common/cpt/cpt_common.h               |   4 -
 drivers/common/cpt/cpt_ucode.h                |   2 +-
 drivers/common/cpt/cpt_ucode_asym.h           |   4 +-
 drivers/common/dpaax/caamflib/compat.h        |   4 +-
 drivers/common/dpaax/compat.h                 |   4 +-
 drivers/common/dpaax/dpaax_iova_table.h       |   2 +-
 drivers/common/iavf/iavf_osdep.h              |   4 +-
 drivers/common/mlx5/mlx5_glue.c               |   4 +-
 drivers/common/mlx5/mlx5_nl.c                 |   2 +-
 drivers/common/octeontx2/otx2_common.h        |   5 -
 drivers/crypto/caam_jr/caam_jr_desc.h         |   4 +-
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c   |   4 +-
 drivers/crypto/octeontx/otx_cryptodev_ops.c   |  18 +-
 drivers/crypto/octeontx2/otx2_cryptodev_ops.c |   8 +-
 drivers/crypto/qat/qat_asym.h                 |   2 +-
 drivers/event/octeontx/ssovf_worker.c         |  16 +-
 drivers/event/octeontx/ssovf_worker.h         |   4 -
 drivers/event/octeontx2/otx2_worker.c         |  28 +-
 drivers/event/octeontx2/otx2_worker_dual.c    |  28 +-
 drivers/mempool/octeontx/octeontx_fpavf.c     |   8 +-
 drivers/mempool/octeontx2/otx2_mempool_ops.c  |   6 +-
 drivers/net/ark/ark_pktchkr.h                 |   4 +-
 drivers/net/ark/ark_pktdir.h                  |   2 +-
 drivers/net/ark/ark_pktgen.h                  |   2 +-
 drivers/net/atlantic/atl_types.h              |   2 +
 drivers/net/atlantic/hw_atl/hw_atl_utils.h    |  60 +-
 .../net/atlantic/hw_atl/hw_atl_utils_fw2x.c   |   4 +-
 drivers/net/avp/rte_avp_common.h              |   6 +-
 drivers/net/bnxt/bnxt.h                       |   4 +-
 drivers/net/bnxt/bnxt_rxtx_vec_sse.c          |   2 +-
 drivers/net/bnxt/hsi_struct_def_dpdk.h        | 854 +++++++++---------
 drivers/net/bonding/rte_eth_bond_8023ad.h     |  16 +-
 drivers/net/bonding/rte_eth_bond_pmd.c        |   4 +-
 drivers/net/dpaa/dpaa_rxtx.h                  |  14 +-
 drivers/net/dpaa2/base/dpaa2_hw_dpni_annot.h  |   2 +-
 drivers/net/dpaa2/dpaa2_ethdev.h              |   2 +-
 drivers/net/dpaa2/dpaa2_rxtx.c                |  30 +-
 drivers/net/enetc/enetc_rxtx.c                |   2 +-
 drivers/net/enic/base/vnic_dev.c              |   4 +-
 drivers/net/enic/base/vnic_devcmd.h           |  20 +-
 drivers/net/fm10k/fm10k_ethdev.c              |   4 +-
 drivers/net/fm10k/fm10k_rxtx_vec.c            |  12 +-
 drivers/net/hinic/hinic_pmd_rx.c              |   2 +-
 drivers/net/hns3/hns3_ethdev.c                |   2 +-
 drivers/net/hns3/hns3_ethdev_vf.c             |   4 +-
 drivers/net/hns3/hns3_fdir.c                  |   4 +-
 drivers/net/i40e/base/i40e_osdep.h            |   4 +-
 drivers/net/i40e/i40e_ethdev.c                |  10 +-
 drivers/net/i40e/i40e_rxtx.c                  |  10 +-
 drivers/net/i40e/i40e_rxtx_vec_altivec.c      |   8 +-
 drivers/net/i40e/i40e_rxtx_vec_neon.c         |   8 +-
 drivers/net/i40e/i40e_rxtx_vec_sse.c          |   8 +-
 drivers/net/iavf/iavf_rxtx_vec_sse.c          |  12 +-
 drivers/net/ice/base/ice_osdep.h              |  16 +-
 drivers/net/ice/ice_rxtx.c                    |  10 +-
 drivers/net/ice/ice_rxtx_vec_sse.c            |   8 +-
 drivers/net/ionic/ionic_rxtx.c                |  24 +-
 drivers/net/ixgbe/ixgbe_ethdev.c              |   6 +-
 drivers/net/ixgbe/ixgbe_rxtx.c                |  58 +-
 drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c       |  14 +-
 drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c        |  14 +-
 drivers/net/memif/memif.h                     |   2 +-
 drivers/net/mlx5/mlx5.h                       |   1 -
 drivers/net/mlx5/mlx5_rxtx_vec.c              |   4 +-
 drivers/net/mlx5/mlx5_rxtx_vec_altivec.h      |  16 +-
 drivers/net/mlx5/mlx5_socket.c                |   3 +-
 drivers/net/nfp/nfp_net_pmd.h                 |  10 +-
 drivers/net/octeontx/octeontx_rxtx.c          |   4 +-
 drivers/net/octeontx/octeontx_rxtx.h          |   4 -
 drivers/net/octeontx2/otx2_rx.c               |   6 +-
 drivers/net/octeontx2/otx2_tx.c               |   6 +-
 drivers/net/pfe/base/pfe.h                    |   2 +-
 drivers/net/qede/base/bcm_osal.h              |   2 +-
 drivers/net/qede/qede_filter.c                |   6 +-
 drivers/net/softnic/rte_eth_softnic_cli.c     |  10 +-
 drivers/net/tap/tap_bpf.h                     |   2 +-
 drivers/net/tap/tap_bpf_program.c             |   4 +-
 drivers/net/tap/tap_rss.h                     |   2 +-
 drivers/net/thunderx/base/nicvf_mbox.c        |   2 +-
 drivers/net/thunderx/nicvf_rxtx.c             |  46 +-
 drivers/net/thunderx/nicvf_rxtx.h             |   8 +-
 drivers/net/virtio/virtio_pci.h               |   2 +-
 drivers/net/virtio/virtio_rxtx_simple.c       |   2 +-
 drivers/net/virtio/virtio_user/vhost_user.c   |   2 +-
 drivers/net/virtio/virtqueue.h                |   6 +-
 drivers/raw/dpaa2_qdma/dpaa2_qdma.h           |   2 +-
 drivers/raw/ifpga/base/ifpga_compat.h         |   2 +-
 drivers/raw/ifpga/base/opae_hw_api.h          |   2 +-
 drivers/raw/ioat/rte_ioat_spec.h              |   2 +-
 drivers/vdpa/ifc/base/ifcvf.h                 |   2 +-
 examples/bond/main.c                          |  28 +-
 examples/cmdline/commands.c                   |   8 +-
 examples/cmdline/parse_obj_list.c             |   2 +-
 examples/ethtool/ethtool-app/main.c           |   2 +-
 .../fips_validation/fips_validation_aes.c     |   4 +-
 .../fips_validation/fips_validation_hmac.c    |   4 +-
 .../fips_validation/fips_validation_sha.c     |   4 +-
 .../fips_validation/fips_validation_tdes.c    |   6 +-
 examples/flow_classify/flow_classify.c        |   2 +-
 examples/helloworld/main.c                    |   2 +-
 examples/ip_fragmentation/main.c              |   2 +-
 examples/ip_pipeline/cli.c                    |  10 +-
 examples/ip_reassembly/main.c                 |   2 +-
 examples/ipsec-secgw/ipsec-secgw.c            |   2 +-
 examples/ipsec-secgw/ipsec.h                  |   2 +-
 examples/l2fwd-cat/l2fwd-cat.c                |   2 +-
 examples/l2fwd-jobstats/main.c                |   2 +-
 examples/l2fwd-keepalive/main.c               |   6 +-
 examples/l2fwd/main.c                         |   2 +-
 examples/l3fwd-acl/main.c                     |   2 +-
 examples/l3fwd-power/main.c                   |  18 +-
 examples/l3fwd/l3fwd.h                        |  20 +-
 examples/l3fwd/l3fwd_em.c                     |  14 +-
 examples/l3fwd/l3fwd_lpm.c                    |  10 +-
 examples/link_status_interrupt/main.c         |   2 +-
 .../client_server_mp/mp_server/main.c         |   2 +-
 examples/multi_process/hotplug_mp/commands.c  |  16 +-
 examples/multi_process/simple_mp/main.c       |   2 +-
 .../multi_process/simple_mp/mp_commands.c     |  12 +-
 examples/multi_process/symmetric_mp/main.c    |   2 +-
 examples/ntb/ntb_fwd.c                        |  34 +-
 .../performance-thread/l3fwd-thread/main.c    |  12 +-
 .../performance-thread/pthread_shim/main.c    |   4 +-
 .../pthread_shim/pthread_shim.h               |   2 +-
 examples/ptpclient/ptpclient.c                |  18 +-
 examples/qos_meter/main.c                     |   4 +-
 examples/qos_sched/cmdline.c                  |  46 +-
 examples/qos_sched/main.c                     |   2 +-
 examples/rxtx_callbacks/main.c                |   2 +-
 examples/server_node_efd/server/main.c        |   2 +-
 examples/skeleton/basicfwd.c                  |   2 +-
 examples/timer/main.c                         |  12 +-
 examples/vdpa/main.c                          |  14 +-
 examples/vhost_blk/blk_spec.h                 |   2 +-
 .../guest_cli/vm_power_cli_guest.h            |   2 +-
 examples/vm_power_manager/main.c              |   4 +-
 examples/vm_power_manager/oob_monitor_nop.c   |   8 +-
 examples/vm_power_manager/vm_power_cli.c      |  20 +-
 examples/vm_power_manager/vm_power_cli.h      |   2 +-
 examples/vmdq/main.c                          |   2 +-
 lib/librte_acl/acl_run.h                      |   2 +-
 lib/librte_acl/acl_run_altivec.h              |   2 +-
 lib/librte_acl/acl_run_neon.h                 |   2 +-
 lib/librte_cmdline/cmdline.c                  |   2 +-
 lib/librte_cmdline/cmdline.h                  |   3 +-
 lib/librte_cmdline/cmdline_parse_etheraddr.c  |   4 +-
 lib/librte_cmdline/cmdline_parse_portlist.c   |   4 +-
 lib/librte_eal/common/eal_common_options.c    |   2 +-
 lib/librte_eal/common/eal_private.h           |   2 +-
 lib/librte_eal/common/eal_thread.h            |   2 +-
 .../common/include/arch/arm/rte_vect.h        |   2 +-
 .../common/include/arch/ppc_64/rte_vect.h     |   2 +-
 .../common/include/arch/x86/rte_rtm.h         |   6 +-
 lib/librte_eal/common/include/rte_common.h    |  41 +-
 lib/librte_eal/common/include/rte_debug.h     |   6 +-
 lib/librte_eal/common/include/rte_dev.h       |   8 +-
 lib/librte_eal/common/include/rte_devargs.h   |   2 +-
 .../common/include/rte_function_versioning.h  |   2 +-
 lib/librte_eal/common/include/rte_log.h       |   6 +-
 lib/librte_eal/common/include/rte_memzone.h   |   2 +-
 lib/librte_eal/freebsd/eal/eal.c              |   2 +-
 lib/librte_eal/freebsd/eal/eal_thread.c       |   4 +-
 lib/librte_eal/linux/eal/eal.c                |   2 +-
 lib/librte_eal/linux/eal/eal_interrupts.c     |   2 +-
 lib/librte_eal/linux/eal/eal_log.c            |   2 +-
 lib/librte_eal/linux/eal/eal_thread.c         |   4 +-
 lib/librte_eal/linux/eal/eal_timer.c          |   2 +-
 lib/librte_efd/rte_efd.c                      |   4 +-
 lib/librte_ethdev/rte_ethdev.h                |   2 +-
 lib/librte_hash/rte_thash.h                   |   2 +-
 lib/librte_ip_frag/rte_ip_frag.h              |   2 +-
 lib/librte_ipsec/crypto.h                     |   8 +-
 lib/librte_mbuf/rte_mbuf.c                    |   6 +-
 lib/librte_net/rte_arp.h                      |   4 +-
 lib/librte_net/rte_esp.h                      |   4 +-
 lib/librte_net/rte_ether.h                    |   6 +-
 lib/librte_net/rte_gre.h                      |   2 +-
 lib/librte_net/rte_gtp.h                      |   2 +-
 lib/librte_net/rte_icmp.h                     |   2 +-
 lib/librte_net/rte_ip.h                       |   4 +-
 lib/librte_net/rte_mpls.h                     |   2 +-
 lib/librte_net/rte_sctp.h                     |   2 +-
 lib/librte_net/rte_tcp.h                      |   2 +-
 lib/librte_net/rte_udp.h                      |   2 +-
 lib/librte_net/rte_vxlan.h                    |   4 +-
 lib/librte_pipeline/rte_table_action.c        |  34 +-
 lib/librte_power/power_kvm_vm.c               |  14 +-
 lib/librte_power/rte_power_empty_poll.c       |  18 +-
 lib/librte_sched/rte_sched_common.h           |   2 +-
 lib/librte_vhost/vhost_user.h                 |   2 +-
 247 files changed, 1776 insertions(+), 1758 deletions(-)

-- 
2.25.0


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2020-04-16 16:34 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-10 16:20 [dpdk-dev] [PATCH 20.05 00/15] clean-up use of __attribute__ Thomas Monjalon
2020-02-10 16:20 ` [dpdk-dev] [PATCH 20.05 01/15] app/bbdev: replace constructor syntax with common macro Thomas Monjalon
2020-02-10 21:06   ` Chautru, Nicolas
2020-02-10 16:20 ` [dpdk-dev] [PATCH 20.05 02/15] net/mlx5: replace destructor " Thomas Monjalon
2020-02-10 16:20 ` [dpdk-dev] [PATCH 20.05 03/15] net/memif: use common macros for cache line marker Thomas Monjalon
2020-02-10 16:20 ` [dpdk-dev] [PATCH 20.05 04/15] common/mlx5: replace alignas keyword Thomas Monjalon
2020-02-10 16:20 ` [dpdk-dev] [PATCH 20.05 05/15] replace alignment attributes Thomas Monjalon
2020-02-10 19:11   ` David Christensen
2020-02-10 16:20 ` [dpdk-dev] [PATCH 20.05 06/15] replace packed attributes Thomas Monjalon
2020-02-10 16:20 ` [dpdk-dev] [PATCH 20.05 07/15] replace always-inline attributes Thomas Monjalon
2020-02-10 16:20 ` [dpdk-dev] [PATCH 20.05 08/15] replace no-inline attributes Thomas Monjalon
2020-02-10 16:20 ` [dpdk-dev] [PATCH 20.05 09/15] replace unused attributes Thomas Monjalon
2020-02-10 16:20 ` [dpdk-dev] [PATCH 20.05 10/15] replace used attributes Thomas Monjalon
2020-02-10 16:20 ` [dpdk-dev] [PATCH 20.05 11/15] replace hot attributes Thomas Monjalon
2020-02-10 16:20 ` [dpdk-dev] [PATCH 20.05 12/15] replace cold attributes Thomas Monjalon
2020-02-10 19:14   ` David Christensen
2020-02-10 16:20 ` [dpdk-dev] [PATCH 20.05 13/15] replace no-return attributes Thomas Monjalon
2020-02-10 16:20 ` [dpdk-dev] [PATCH 20.05 14/15] replace printf format attributes Thomas Monjalon
2020-02-10 16:20 ` [dpdk-dev] [PATCH 20.05 15/15] devtools: check use of compiler attributes Thomas Monjalon
2020-04-16 16:34 ` [dpdk-dev] [PATCH 20.05 00/15] clean-up use of __attribute__ Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).