provide a complete set of BSD list macros
Subsystems (8)
cover provide a complete set of BSD list macros
DPDK uses the BSD <sys/queue.h> macros everywhere, but what you get depends on the platform: FreeBSD has the full set, glibc has a subset, musl and Windows have no such header.
The big gap is _FOREACH_SAFE, which glibc lacks. So it can't be used in common code, and workarounds have spread: RTE_TAILQ_FOREACH_SAFE in rte_tailq.h, plus ten files with private copies of LIST_, SLIST_, STAILQ_ or TAILQ_FOREACH_SAFE. The RTE_TAILQ_*/RTE_STAILQ_* wrappers exist only because Windows had no <sys/queue.h> to alias to.
Windows already carries a copy of the FreeBSD header. Move it to lib/eal/include/rte_queue.h, use it on all platforms, and drop the workarounds.
Patch 3 has to be one step. rte_queue.h deliberately uses the same include guard as <sys/queue.h> so that the two suppress each other instead of redefining macros. That means a single leftover include of <sys/queue.h>, direct or via another header, turns rte_queue.h into a no-op for that translation unit. Patch 6 adds a checkpatch test to keep them from coming back.
Patch 1 is an unrelated use after free, found when the macros became visible to the compiler and it reported -Wuse-after-free. Marked for stable, independent of the rest.
Patch 5 converts the RTE_TAILQ_*/RTE_STAILQ_* wrappers to the plain names but keeps them as deprecated aliases, scheduled for removal in 27.11: out of tree code on Windows had no alternative until now.
Stephen Hemminger (6):
net/bnxt: fix use after free when freeing filters
eal: add rte_queue.h with full set of list macros
build: use rte_queue.h instead of sys/queue.h
build: remove private FOREACH_SAFE definitions
eal: deprecate RTE_TAILQ and RTE_STAILQ macro wrappers
devtools: forbid direct use of sys/queue.h
app/dumpcap/main.c | 2 +-
app/proc-info/main.c | 2 +-
app/test-bbdev/main.h | 2 +-
app/test-cmdline/cmdline_test.c | 2 +-
app/test-eventdev/evt_test.c | 2 +-
app/test-eventdev/evt_test.h | 2 +-
app/test-mldev/ml_test.h | 2 +-
app/test-pipeline/config.c | 2 +-
app/test-pipeline/init.c | 2 +-
app/test-pipeline/main.c | 2 +-
app/test-pipeline/runtime.c | 2 +-
app/test-pmd/5tswap.c | 2 +-
app/test-pmd/cmdline.c | 2 +-
app/test-pmd/config.c | 2 +-
app/test-pmd/csumonly.c | 2 +-
app/test-pmd/flowgen.c | 2 +-
app/test-pmd/hairpin.c | 2 +-
app/test-pmd/icmpecho.c | 2 +-
app/test-pmd/iofwd.c | 2 +-
app/test-pmd/macfwd.c | 2 +-
app/test-pmd/macswap.c | 2 +-
app/test-pmd/noisy_vnf.c | 2 +-
app/test-pmd/parameters.c | 2 +-
app/test-pmd/rxonly.c | 2 +-
app/test-pmd/testpmd.c | 2 +-
app/test-pmd/testpmd.h | 2 +-
app/test-pmd/txonly.c | 2 +-
app/test/commands.c | 2 +-
app/test/test.c | 2 +-
app/test/test.h | 2 +-
app/test/test_atomic.c | 2 +-
app/test/test_cmdline_lib.c | 2 +-
app/test/test_func_reentrancy.c | 2 +-
app/test/test_hash.c | 2 +-
app/test/test_hash_functions.c | 2 +-
app/test/test_link_bonding.c | 2 +-
app/test/test_link_bonding_mode4.c | 2 +-
app/test/test_link_bonding_rssconf.c | 2 +-
app/test/test_logs.c | 2 +-
app/test/test_malloc.c | 2 +-
app/test/test_mbuf.c | 2 +-
app/test/test_mcslock.c | 2 +-
app/test/test_mempool.c | 2 +-
app/test/test_mempool_perf.c | 2 +-
app/test/test_memzone.c | 2 +-
app/test/test_mp_secondary.c | 2 +-
app/test/test_per_lcore.c | 2 +-
app/test/test_pflock.c | 2 +-
app/test/test_ring.c | 2 +-
app/test/test_rwlock.c | 2 +-
app/test/test_soring.c | 2 +-
app/test/test_spinlock.c | 2 +-
app/test/test_tailq.c | 2 +-
app/test/test_ticketlock.c | 2 +-
app/test/test_timer.c | 2 +-
devtools/checkpatches.sh | 9 +
doc/guides/contributing/coding_style.rst | 5 +-
doc/guides/rel_notes/deprecation.rst | 8 +
doc/guides/rel_notes/release_26_11.rst | 15 ++
drivers/bus/auxiliary/auxiliary_common.c | 2 +-
drivers/bus/auxiliary/private.h | 2 +-
drivers/bus/fslmc/bus_fslmc_driver.h | 2 +-
drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 9 +-
drivers/bus/ifpga/ifpga_bus.c | 2 +-
drivers/bus/pci/bsd/pci.c | 2 +-
drivers/bus/pci/pci_common.c | 2 +-
drivers/bus/pci/pci_params.c | 2 +-
drivers/bus/pci/windows/pci.c | 2 +-
drivers/bus/pci/windows/pci_netuio.c | 2 +-
drivers/bus/platform/platform.c | 2 +-
drivers/bus/vdev/vdev.c | 4 +-
drivers/bus/vmbus/vmbus_common.c | 2 +-
drivers/common/cnxk/roc_bphy_irq.c | 1 -
drivers/common/cnxk/roc_npc.h | 2 -
drivers/common/cnxk/roc_platform.h | 3 +-
drivers/common/mlx5/mlx5_common_mr.h | 2 +-
drivers/common/sxe2/sxe2_osal.h | 8 +-
drivers/crypto/bcmfs/bcmfs_device.c | 2 +-
drivers/crypto/bcmfs/bcmfs_device.h | 2 +-
drivers/crypto/ccp/ccp_crypto.c | 2 +-
drivers/crypto/ccp/ccp_dev.c | 2 +-
drivers/event/dlb2/dlb2_selftest.c | 2 +-
drivers/event/opdl/opdl_test.c | 2 +-
drivers/event/sw/sw_evdev_selftest.c | 2 +-
drivers/net/axgbe/axgbe_common.h | 2 +-
drivers/net/bnx2x/bnx2x_ethdev.h | 2 +-
drivers/net/bnxt/bnxt.h | 2 +-
drivers/net/bnxt/bnxt_filter.c | 9 +-
drivers/net/bnxt/bnxt_flow.c | 2 +-
drivers/net/bnxt/bnxt_vnic.h | 2 +-
drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 4 +-
drivers/net/bnxt/tf_ulp/bnxt_ulp.h | 2 +-
drivers/net/bnxt/tf_ulp/bnxt_ulp_meter.c | 2 +-
drivers/net/bonding/eth_bond_private.h | 2 +-
drivers/net/bonding/rte_eth_bond_flow.c | 4 +-
drivers/net/cnxk/cnxk_eswitch_flow.c | 2 +-
drivers/net/cnxk/cnxk_ethdev.c | 6 +-
drivers/net/cnxk/cnxk_ethdev_sec_telemetry.c | 8 +-
drivers/net/cxgbe/cxgbe_ethdev.c | 2 +-
drivers/net/cxgbe/cxgbe_main.c | 2 +-
drivers/net/cxgbe/sge.c | 2 +-
drivers/net/dpaa2/dpaa2_flow.c | 2 +-
drivers/net/dpaa2/dpaa2_mux.c | 2 +-
drivers/net/dpaa2/dpaa2_ptp.c | 2 +-
drivers/net/enic/enic.h | 2 +-
drivers/net/failsafe/failsafe_flow.c | 4 +-
drivers/net/failsafe/failsafe_private.h | 2 +-
drivers/net/intel/cpfl/cpfl_flow.c | 8 +-
drivers/net/intel/cpfl/cpfl_flow_engine_fxp.c | 2 +-
drivers/net/intel/e1000/e1000_ethdev.h | 2 +-
drivers/net/intel/e1000/em_ethdev.c | 2 +-
drivers/net/intel/e1000/em_rxtx.c | 2 +-
drivers/net/intel/e1000/igb_ethdev.c | 2 +-
drivers/net/intel/e1000/igb_flow.c | 2 +-
drivers/net/intel/e1000/igb_rxtx.c | 2 +-
drivers/net/intel/i40e/i40e_ethdev.c | 10 +-
drivers/net/intel/i40e/i40e_ethdev.h | 2 +-
drivers/net/intel/i40e/i40e_fdir.c | 2 +-
drivers/net/intel/i40e/i40e_flow.c | 8 +-
drivers/net/intel/i40e/i40e_hash.c | 4 +-
drivers/net/intel/i40e/i40e_pf.c | 2 +-
drivers/net/intel/i40e/i40e_rxtx.c | 2 +-
drivers/net/intel/i40e/rte_pmd_i40e.c | 6 +-
drivers/net/intel/iavf/iavf.h | 2 +-
drivers/net/intel/iavf/iavf_ethdev.c | 2 +-
drivers/net/intel/iavf/iavf_fdir.c | 2 +-
drivers/net/intel/iavf/iavf_fsub.c | 2 +-
drivers/net/intel/iavf/iavf_generic_flow.c | 18 +-
drivers/net/intel/iavf/iavf_hash.c | 2 +-
drivers/net/intel/iavf/iavf_rxtx.c | 2 +-
drivers/net/intel/iavf/iavf_vchnl.c | 8 +-
drivers/net/intel/ice/base/ice_osdep.h | 2 +-
drivers/net/intel/ice/ice_acl_filter.c | 2 +-
drivers/net/intel/ice/ice_dcf.c | 2 +-
drivers/net/intel/ice/ice_dcf_ethdev.c | 2 +-
drivers/net/intel/ice/ice_ethdev.c | 4 +-
drivers/net/intel/ice/ice_generic_flow.c | 10 +-
drivers/net/intel/ice/ice_hash.c | 2 +-
drivers/net/intel/ice/ice_switch_filter.c | 2 +-
drivers/net/intel/idpf/base/idpf_osdep.h | 9 +-
drivers/net/intel/ipn3ke/ipn3ke_ethdev.h | 2 +-
drivers/net/intel/ipn3ke/ipn3ke_flow.c | 4 +-
drivers/net/intel/ixgbe/ixgbe_ethdev.c | 2 +-
drivers/net/intel/ixgbe/ixgbe_ethdev.h | 2 +-
drivers/net/intel/ixgbe/ixgbe_fdir.c | 2 +-
drivers/net/intel/ixgbe/ixgbe_flow.c | 4 +-
drivers/net/intel/ixgbe/ixgbe_rxtx.c | 2 +-
drivers/net/memif/memif_socket.h | 2 +-
drivers/net/memif/rte_eth_memif.h | 2 +-
drivers/net/mlx4/mlx4.h | 2 +-
drivers/net/mlx4/mlx4_flow.c | 2 +-
drivers/net/mlx4/mlx4_flow.h | 2 +-
drivers/net/mlx4/mlx4_mr.h | 2 +-
drivers/net/mlx4/mlx4_rxtx.h | 2 +-
drivers/net/mlx5/hws/mlx5dr_internal.h | 2 +-
drivers/net/mlx5/linux/mlx5_verbs.c | 2 +-
drivers/net/mlx5/mlx5.h | 2 +-
drivers/net/mlx5/mlx5_devx.c | 2 +-
drivers/net/mlx5/mlx5_driver_event.c | 2 +-
drivers/net/mlx5/mlx5_flow.c | 2 +-
drivers/net/mlx5/mlx5_flow.h | 2 +-
drivers/net/mlx5/mlx5_flow_dv.c | 4 +-
drivers/net/mlx5/mlx5_flow_meter.c | 2 +-
drivers/net/mlx5/mlx5_flow_verbs.c | 2 +-
drivers/net/mlx5/mlx5_rx.h | 2 +-
drivers/net/mlx5/mlx5_rxq.c | 2 +-
drivers/net/mlx5/mlx5_rxtx.h | 2 +-
drivers/net/mlx5/mlx5_tx.h | 2 +-
drivers/net/nbl/nbl_common/nbl_userdev.c | 4 +-
drivers/net/netvsc/hn_ethdev.c | 8 +-
drivers/net/nfb/nfb_ethdev.c | 4 +-
drivers/net/nfp/nfp_mtr.c | 8 +-
drivers/net/ngbe/ngbe_ethdev_vf.c | 2 +-
drivers/net/ngbe/ngbe_rxtx.c | 2 +-
drivers/net/ntnic/ntnic_ethdev.c | 2 +-
drivers/net/qede/qede_ethdev.h | 2 +-
drivers/net/qede/qede_filter.c | 8 +-
drivers/net/sfc/sfc_dp.c | 2 +-
drivers/net/sfc/sfc_dp.h | 2 +-
drivers/net/sfc/sfc_flow.c | 4 +-
.../net/softnic/rte_eth_softnic_internals.h | 2 +-
drivers/net/softnic/rte_eth_softnic_swq.c | 2 +-
drivers/net/sxe2/sxe2_dump.c | 6 +-
drivers/net/sxe2/sxe2_filter.c | 22 +-
drivers/net/sxe2/sxe2_flow.c | 2 +-
drivers/net/sxe2/sxe2_vsi.c | 2 +-
drivers/net/tap/rte_eth_tap.h | 2 +-
drivers/net/tap/tap_flow.c | 2 +-
drivers/net/thunderx/base/nicvf_bsvf.h | 2 +-
drivers/net/thunderx/nicvf_ethdev.c | 2 +-
drivers/net/txgbe/txgbe_ethdev_vf.c | 2 +-
drivers/net/txgbe/txgbe_fdir.c | 2 +-
drivers/net/txgbe/txgbe_flow.c | 2 +-
drivers/net/txgbe/txgbe_rxtx.c | 2 +-
drivers/net/vdev_netvsc/vdev_netvsc.c | 2 +-
drivers/net/vmxnet3/vmxnet3_ethdev.c | 2 +-
drivers/net/vmxnet3/vmxnet3_rxtx.c | 2 +-
drivers/net/zxdh/zxdh_flow.c | 4 +-
drivers/net/zxdh/zxdh_flow.h | 2 +-
drivers/net/zxdh/zxdh_mtr.c | 6 +-
drivers/net/zxdh/zxdh_mtr.h | 2 +-
drivers/raw/ifpga/base/opae_hw_api.h | 2 +-
drivers/raw/ifpga/base/opae_intel_max10.c | 8 +-
drivers/vdpa/mlx5/mlx5_vdpa.h | 2 +-
drivers/vdpa/sfc/sfc_vdpa.c | 2 +-
drivers/vdpa/sfc/sfc_vdpa.h | 2 +-
examples/bbdev_app/main.c | 2 +-
examples/bond/main.c | 2 +-
examples/cmdline/main.c | 2 +-
examples/cmdline/parse_obj_list.h | 2 +-
examples/flow_filtering/main.c | 2 +-
examples/helloworld/main.c | 2 +-
examples/ip_fragmentation/main.c | 2 +-
examples/ip_pipeline/action.h | 2 +-
examples/ip_pipeline/cryptodev.h | 2 +-
examples/ip_pipeline/link.h | 2 +-
examples/ip_pipeline/mempool.h | 2 +-
examples/ip_pipeline/pipeline.h | 2 +-
examples/ip_pipeline/swq.h | 2 +-
examples/ip_pipeline/tap.h | 2 +-
examples/ip_pipeline/tmgr.h | 2 +-
examples/ip_reassembly/main.c | 2 +-
examples/ipsec-secgw/ipsec-secgw.c | 2 +-
examples/ipv4_multicast/main.c | 2 +-
examples/l2fwd-crypto/main.c | 2 +-
examples/l2fwd-event/l2fwd_common.h | 2 +-
examples/l2fwd-keepalive/ka-agent/main.c | 2 +-
examples/l2fwd-keepalive/main.c | 2 +-
examples/l2fwd-macsec/main.c | 2 +-
examples/l2fwd/main.c | 2 +-
examples/l3fwd-graph/main.c | 2 +-
examples/l3fwd-power/main.c | 2 +-
examples/l3fwd/l3fwd_em.c | 2 +-
examples/l3fwd/l3fwd_lpm.c | 2 +-
examples/l3fwd/main.c | 2 +-
examples/link_status_interrupt/main.c | 2 +-
.../client_server_mp/mp_client/client.c | 2 +-
.../client_server_mp/mp_server/init.c | 2 +-
.../client_server_mp/mp_server/main.c | 2 +-
examples/multi_process/hotplug_mp/main.c | 2 +-
examples/multi_process/simple_mp/main.c | 2 +-
examples/multi_process/symmetric_mp/main.c | 2 +-
examples/server_node_efd/efd_node/node.c | 2 +-
examples/server_node_efd/efd_server/init.c | 2 +-
examples/server_node_efd/efd_server/main.c | 2 +-
examples/service_cores/main.c | 2 +-
examples/timer/main.c | 2 +-
examples/vhost/main.h | 2 +-
examples/vm_power_manager/channel_manager.c | 10 +-
examples/vm_power_manager/channel_monitor.c | 2 +-
examples/vm_power_manager/main.c | 2 +-
examples/vmdq/main.c | 2 +-
examples/vmdq_dcb/main.c | 2 +-
lib/acl/rte_acl_osdep.h | 2 +-
lib/bbdev/rte_bbdev.c | 2 +-
lib/bbdev/rte_bbdev.h | 2 +-
lib/bpf/bpf_load_elf.c | 2 +-
lib/bpf/bpf_pkt.c | 2 +-
lib/bpf/bpf_validate_debug.c | 9 +-
lib/cryptodev/cryptodev_pmd.c | 2 +-
lib/cryptodev/cryptodev_pmd.h | 2 +-
lib/cryptodev/rte_cryptodev.c | 2 +-
lib/cryptodev/rte_cryptodev.h | 2 +-
lib/distributor/rte_distributor.c | 2 +-
lib/distributor/rte_distributor_single.c | 2 +-
lib/eal/common/eal_common_bus.c | 2 +-
lib/eal/common/eal_common_class.c | 2 +-
lib/eal/common/eal_common_dev.c | 2 +-
lib/eal/common/eal_common_devargs.c | 4 +-
lib/eal/common/eal_common_options.c | 4 +-
lib/eal/common/eal_common_proc.c | 2 +-
lib/eal/common/eal_common_tailqs.c | 2 +-
lib/eal/common/eal_common_trace.c | 2 +-
lib/eal/common/eal_private.h | 2 +-
lib/eal/common/malloc_elem.c | 2 +-
lib/eal/common/malloc_heap.c | 2 +-
lib/eal/common/malloc_heap.h | 2 +-
lib/eal/common/rte_malloc.c | 2 +-
lib/eal/freebsd/eal.c | 2 +-
lib/eal/freebsd/eal_interrupts.c | 2 +-
lib/eal/freebsd/eal_thread.c | 2 +-
lib/eal/freebsd/include/rte_os.h | 14 +-
lib/eal/include/bus_driver.h | 8 +-
lib/eal/include/dev_driver.h | 4 +-
lib/eal/include/meson.build | 1 +
lib/eal/include/rte_class.h | 4 +-
lib/eal/include/rte_devargs.h | 2 +-
.../sys/queue.h => include/rte_queue.h} | 235 ++++--------------
lib/eal/include/rte_tailq.h | 35 ++-
lib/eal/linux/eal_alarm.c | 2 +-
lib/eal/linux/eal_interrupts.c | 2 +-
lib/eal/linux/include/rte_os.h | 14 +-
lib/eal/windows/eal_alarm.c | 2 +-
lib/eal/windows/include/rte_os.h | 31 +--
lib/efd/rte_efd.c | 4 +-
lib/ethdev/ethdev_private.h | 2 +-
lib/ethdev/rte_ethdev.c | 2 +-
lib/ethdev/rte_ethdev_core.h | 2 +-
lib/eventdev/rte_event_vector_adapter.c | 2 +-
lib/fib/rte_fib.c | 2 +-
lib/fib/rte_fib6.c | 2 +-
lib/gpudev/gpudev.c | 6 +-
lib/gpudev/gpudev_driver.h | 2 +-
lib/graph/graph_private.h | 2 +-
lib/hash/rte_cuckoo_hash.c | 2 +-
lib/hash/rte_fbk_hash.c | 2 +-
lib/hash/rte_thash.c | 2 +-
lib/ip_frag/ip_frag_common.h | 2 +-
lib/ip_frag/ip_reassembly.h | 4 +-
lib/ip_frag/rte_ip_frag_common.c | 2 +-
lib/log/log.c | 2 +-
lib/lpm/rte_lpm.c | 2 +-
lib/lpm/rte_lpm6.c | 2 +-
lib/mbuf/rte_mbuf_dyn.c | 2 +-
lib/mempool/rte_mempool.c | 6 +-
lib/mempool/rte_mempool.h | 8 +-
lib/pipeline/rte_swx_ctl.c | 2 +-
lib/pipeline/rte_swx_pipeline_internal.h | 2 +-
lib/pmu/pmu.c | 4 +-
lib/power/power_cpufreq.h | 2 +-
lib/power/power_uncore_ops.h | 2 +-
lib/power/rte_power_cpufreq.c | 8 +-
lib/power/rte_power_uncore.c | 6 +-
lib/reorder/rte_reorder.c | 2 +-
lib/rib/rte_rib.c | 2 +-
lib/rib/rte_rib6.c | 2 +-
lib/ring/rte_ring.c | 2 +-
lib/stack/rte_stack.c | 2 +-
lib/table/rte_swx_table.h | 4 +-
lib/table/rte_swx_table_selector.h | 4 +-
lib/vhost/fd_man.h | 2 +-
lib/vhost/iotlb.c | 14 +-
lib/vhost/socket.c | 2 +-
lib/vhost/vdpa.c | 4 +-
lib/vhost/vdpa_driver.h | 2 +-
lib/vhost/vhost.h | 2 +-
336 files changed, 540 insertions(+), 725 deletions(-)
rename lib/eal/{windows/include/sys/queue.h => include/rte_queue.h} (76%)Signature · 1 line
2.53.0
PATCH 1/6 net/bnxt: fix use after free when freeing filters
bnxt_free_filter_mem() freed each filter and then passed the freed pointer to STAILQ_REMOVE, which walks the list to unlink it. STAILQ_FOREACH also read the next pointer out of the freed element.
Remove the entry from the list before freeing it, and use STAILQ_FOREACH_SAFE so that the iteration does not depend on the element that was just freed. glibc does not provide the _SAFE variants, so define it locally the same way several other drivers already do.
Found while moving the list macros into a DPDK header, where the compiler could see them and report -Wuse-after-free. The fix does not depend on that work.
--- drivers/net/bnxt/bnxt_filter.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-)
drivers/net/bnxt/bnxt_filter.c +11 -3
@@ -18,6 +18,13 @@#include "bnxt_vnic.h" #include "hsi_struct_def_dpdk.h" +#ifndef STAILQ_FOREACH_SAFE +#define STAILQ_FOREACH_SAFE (var, head, field, tvar) \ + for ((var) = STAILQ_FIRST((head)); \ + (var) && ((tvar) = STAILQ_NEXT((var), field), 1); \ + (var) = (tvar)) +#endif +/* * Filter Functions */
@@ -110,7 +117,7 @@ void bnxt_free_all_filters(struct bnxt *bp)void bnxt_free_filter_mem (struct bnxt *bp) { -struct bnxt_filter_info *filter; +struct bnxt_filter_info *filter, *temp_filter;uint16_t max_filters, i;int rc =0 ;
@@ -151,10 +158,11 @@ void bnxt_free_filter_mem(struct bnxt *bp) bp->filter_info =NULL ;for (i =0 ; i < bp->pf->max_vfs; i++) { - STAILQ_FOREACH(filter, &bp->pf->vf_info[i].filter, next) { -rte_free (filter); +STAILQ_FOREACH_SAFE (filter, &bp->pf->vf_info[i].filter, next, + temp_filter) {STAILQ_REMOVE (&bp->pf->vf_info[i].filter, filter, bnxt_filter_info, next); +rte_free (filter); } } }
Signature · 1 line
2.53.0
PATCH 2/6 eal: add rte_queue.h with full set of list macros
In reply to Stephen HemmingerDPDK code uses the BSD <sys/queue.h> macros, but the available set differs per platform. FreeBSD has the complete set, glibc provides only a subset (notably none of the _FOREACH_SAFE variants), and musl has no such header at all, nor does Windows.
The result is that the _SAFE variants cannot be used in common code. RTE_TAILQ_FOREACH_SAFE was added to rte_tailq.h to work around this for tail queues, and nine other files carry their own private copy of LIST_FOREACH_SAFE, SLIST_FOREACH_SAFE or TAILQ_FOREACH_SAFE.
Windows already bundles a copy of the FreeBSD header for its own use. Move it to lib/eal/include/rte_queue.h and use it on all platforms, so that the same complete set of macros is available everywhere.
The FreeBSD queue macro debugging support (QUEUE_MACRO_DEBUG and the _KERNEL INVARIANTS checks) is dropped: it is there to debug the list macros themselves, which is not something DPDK does.
Leave a stub at the old Windows path that includes the new header, so that the existing <sys/queue.h> includes keep building on Windows until they are converted. It is removed in the next commit.
Define __containerof when the platform does not provide it (it is a FreeBSD extension used by STAILQ_LAST, LIST_PREV, TAILQ_LAST_FAST and TAILQ_PREV_FAST) and include <stddef.h> for offsetof and NULL, so that the full set really is usable everywhere.
--- doc/guides/rel_notes/release_26_11.rst | 7 + lib/eal/include/meson.build | 1 + lib/eal/include/rte_queue.h | 684 ++++++++++++++++++++ lib/eal/windows/include/sys/queue.h | 839 +------------------------ 4 files changed, 697 insertions(+), 834 deletions(-) create mode 100644 lib/eal/include/rte_queue.h
doc/guides/rel_notes/release_26_11.rst +7 -0
@@ -55,6 +55,13 @@ New Features Also, make sure to start the actual text at the margin. ======================================================= +* **Added rte_queue.h with the full set of list macros.** + + Added ``rte_queue.h``, providing the complete set of BSD queue(3) list + macros on all platforms, including the ``_FOREACH_SAFE`` variants which + are not available in the system header on Linux. + Use it instead of ``<sys/queue.h>``. + Removed Items -------------
lib/eal/include/meson.build +1 -0
@@ -38,6 +38,7 @@ headers += files( 'rte_pci_dev_features.h', 'rte_per_lcore.h', 'rte_pflock.h', + 'rte_queue.h', 'rte_random.h', 'rte_reciprocal.h', 'rte_seqcount.h',
lib/eal/include/rte_queue.h new file +684 -0
684 lines not on this page · raw message
lib/eal/windows/include/sys/queue.h +5 -834
845 lines not on this page · raw message
Signature · 1 line
2.53.0
PATCH 3/6 build: use rte_queue.h instead of sys/queue.h
In reply to Stephen HemmingerReplace every direct include of <sys/queue.h> with <rte_queue.h> and remove the Windows stub left by the previous commit, so that all platforms get the same set of list macros.
This has to be done in one step rather than one subsystem at a time. Both headers use the same multiple inclusion guard, deliberately, so that this header and a system <sys/queue.h> pulled in by an application suppress each other instead of defining the same macros twice. The consequence in tree is that a single remaining direct include, whether in the file itself or reached through another header, silently turns rte_queue.h into a no-op for that whole translation unit.
--- app/dumpcap/main.c | 2 +- app/proc-info/main.c | 2 +- app/test-bbdev/main.h | 2 +- app/test-cmdline/cmdline_test.c | 2 +- app/test-eventdev/evt_test.c | 2 +- app/test-eventdev/evt_test.h | 2 +- app/test-mldev/ml_test.h | 2 +- app/test-pipeline/config.c | 2 +- app/test-pipeline/init.c | 2 +- app/test-pipeline/main.c | 2 +- app/test-pipeline/runtime.c | 2 +- app/test-pmd/5tswap.c | 2 +- app/test-pmd/cmdline.c | 2 +- app/test-pmd/config.c | 2 +- app/test-pmd/csumonly.c | 2 +- app/test-pmd/flowgen.c | 2 +- app/test-pmd/hairpin.c | 2 +- app/test-pmd/icmpecho.c | 2 +- app/test-pmd/iofwd.c | 2 +- app/test-pmd/macfwd.c | 2 +- app/test-pmd/macswap.c | 2 +- app/test-pmd/noisy_vnf.c | 2 +- app/test-pmd/parameters.c | 2 +- app/test-pmd/rxonly.c | 2 +- app/test-pmd/testpmd.c | 2 +- app/test-pmd/testpmd.h | 2 +- app/test-pmd/txonly.c | 2 +- app/test/commands.c | 2 +- app/test/test.c | 2 +- app/test/test.h | 2 +- app/test/test_atomic.c | 2 +- app/test/test_cmdline_lib.c | 2 +- app/test/test_func_reentrancy.c | 2 +- app/test/test_hash.c | 2 +- app/test/test_hash_functions.c | 2 +- app/test/test_link_bonding.c | 2 +- app/test/test_link_bonding_mode4.c | 2 +- app/test/test_link_bonding_rssconf.c | 2 +- app/test/test_logs.c | 2 +- app/test/test_malloc.c | 2 +- app/test/test_mbuf.c | 2 +- app/test/test_mcslock.c | 2 +- app/test/test_mempool.c | 2 +- app/test/test_mempool_perf.c | 2 +- app/test/test_memzone.c | 2 +- app/test/test_mp_secondary.c | 2 +- app/test/test_per_lcore.c | 2 +- app/test/test_pflock.c | 2 +- app/test/test_ring.c | 2 +- app/test/test_rwlock.c | 2 +- app/test/test_soring.c | 2 +- app/test/test_spinlock.c | 2 +- app/test/test_tailq.c | 2 +- app/test/test_ticketlock.c | 2 +- app/test/test_timer.c | 2 +- drivers/bus/auxiliary/auxiliary_common.c | 2 +- drivers/bus/auxiliary/private.h | 2 +- drivers/bus/fslmc/bus_fslmc_driver.h | 2 +- drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 2 +- drivers/bus/ifpga/ifpga_bus.c | 2 +- drivers/bus/pci/bsd/pci.c | 2 +- drivers/bus/pci/pci_common.c | 2 +- drivers/bus/pci/pci_params.c | 2 +- drivers/bus/pci/windows/pci.c | 2 +- drivers/bus/pci/windows/pci_netuio.c | 2 +- drivers/bus/platform/platform.c | 2 +- drivers/bus/vdev/vdev.c | 2 +- drivers/bus/vmbus/vmbus_common.c | 2 +- drivers/common/cnxk/roc_bphy_irq.c | 1 - drivers/common/cnxk/roc_npc.h | 2 -- drivers/common/cnxk/roc_platform.h | 1 + drivers/common/mlx5/mlx5_common_mr.h | 2 +- drivers/crypto/bcmfs/bcmfs_device.c | 2 +- drivers/crypto/bcmfs/bcmfs_device.h | 2 +- drivers/crypto/ccp/ccp_crypto.c | 2 +- drivers/crypto/ccp/ccp_dev.c | 2 +- drivers/event/dlb2/dlb2_selftest.c | 2 +- drivers/event/opdl/opdl_test.c | 2 +- drivers/event/sw/sw_evdev_selftest.c | 2 +- drivers/net/axgbe/axgbe_common.h | 2 +- drivers/net/bnx2x/bnx2x_ethdev.h | 2 +- drivers/net/bnxt/bnxt.h | 2 +- drivers/net/bnxt/bnxt_filter.c | 2 +- drivers/net/bnxt/bnxt_flow.c | 2 +- drivers/net/bnxt/bnxt_vnic.h | 2 +- drivers/net/bnxt/tf_ulp/bnxt_ulp.h | 2 +- drivers/net/bnxt/tf_ulp/bnxt_ulp_meter.c | 2 +- drivers/net/bonding/eth_bond_private.h | 2 +- drivers/net/bonding/rte_eth_bond_flow.c | 2 +- drivers/net/cxgbe/cxgbe_ethdev.c | 2 +- drivers/net/cxgbe/cxgbe_main.c | 2 +- drivers/net/cxgbe/sge.c | 2 +- drivers/net/dpaa2/dpaa2_flow.c | 2 +- drivers/net/dpaa2/dpaa2_mux.c | 2 +- drivers/net/dpaa2/dpaa2_ptp.c | 2 +- drivers/net/enic/enic.h | 2 +- drivers/net/failsafe/failsafe_flow.c | 2 +- drivers/net/failsafe/failsafe_private.h | 2 +- drivers/net/intel/cpfl/cpfl_flow_engine_fxp.c | 2 +- drivers/net/intel/e1000/e1000_ethdev.h | 2 +- drivers/net/intel/e1000/em_ethdev.c | 2 +- drivers/net/intel/e1000/em_rxtx.c | 2 +- drivers/net/intel/e1000/igb_ethdev.c | 2 +- drivers/net/intel/e1000/igb_flow.c | 2 +- drivers/net/intel/e1000/igb_rxtx.c | 2 +- drivers/net/intel/i40e/i40e_ethdev.h | 2 +- drivers/net/intel/i40e/i40e_fdir.c | 2 +- drivers/net/intel/i40e/i40e_flow.c | 2 +- drivers/net/intel/i40e/i40e_hash.c | 2 +- drivers/net/intel/i40e/i40e_pf.c | 2 +- drivers/net/intel/i40e/i40e_rxtx.c | 2 +- drivers/net/intel/iavf/iavf.h | 2 +- drivers/net/intel/iavf/iavf_ethdev.c | 2 +- drivers/net/intel/iavf/iavf_fdir.c | 2 +- drivers/net/intel/iavf/iavf_fsub.c | 2 +- drivers/net/intel/iavf/iavf_generic_flow.c | 2 +- drivers/net/intel/iavf/iavf_hash.c | 2 +- drivers/net/intel/iavf/iavf_rxtx.c | 2 +- drivers/net/intel/ice/base/ice_osdep.h | 2 +- drivers/net/intel/ice/ice_acl_filter.c | 2 +- drivers/net/intel/ice/ice_dcf.c | 2 +- drivers/net/intel/ice/ice_dcf_ethdev.c | 2 +- drivers/net/intel/ice/ice_generic_flow.c | 2 +- drivers/net/intel/ice/ice_hash.c | 2 +- drivers/net/intel/ice/ice_switch_filter.c | 2 +- drivers/net/intel/idpf/base/idpf_osdep.h | 2 +- drivers/net/intel/ipn3ke/ipn3ke_ethdev.h | 2 +- drivers/net/intel/ipn3ke/ipn3ke_flow.c | 2 +- drivers/net/intel/ixgbe/ixgbe_ethdev.c | 2 +- drivers/net/intel/ixgbe/ixgbe_ethdev.h | 2 +- drivers/net/intel/ixgbe/ixgbe_fdir.c | 2 +- drivers/net/intel/ixgbe/ixgbe_flow.c | 2 +- drivers/net/intel/ixgbe/ixgbe_rxtx.c | 2 +- drivers/net/memif/memif_socket.h | 2 +- drivers/net/memif/rte_eth_memif.h | 2 +- drivers/net/mlx4/mlx4.h | 2 +- drivers/net/mlx4/mlx4_flow.c | 2 +- drivers/net/mlx4/mlx4_flow.h | 2 +- drivers/net/mlx4/mlx4_mr.h | 2 +- drivers/net/mlx4/mlx4_rxtx.h | 2 +- drivers/net/mlx5/hws/mlx5dr_internal.h | 2 +- drivers/net/mlx5/linux/mlx5_verbs.c | 2 +- drivers/net/mlx5/mlx5.h | 2 +- drivers/net/mlx5/mlx5_devx.c | 2 +- drivers/net/mlx5/mlx5_driver_event.c | 2 +- drivers/net/mlx5/mlx5_flow.c | 2 +- drivers/net/mlx5/mlx5_flow.h | 2 +- drivers/net/mlx5/mlx5_flow_dv.c | 2 +- drivers/net/mlx5/mlx5_flow_verbs.c | 2 +- drivers/net/mlx5/mlx5_rx.h | 2 +- drivers/net/mlx5/mlx5_rxq.c | 2 +- drivers/net/mlx5/mlx5_rxtx.h | 2 +- drivers/net/mlx5/mlx5_tx.h | 2 +- drivers/net/nfb/nfb_ethdev.c | 2 +- drivers/net/ngbe/ngbe_ethdev_vf.c | 2 +- drivers/net/ngbe/ngbe_rxtx.c | 2 +- drivers/net/ntnic/ntnic_ethdev.c | 2 +- drivers/net/qede/qede_ethdev.h | 2 +- drivers/net/sfc/sfc_dp.c | 2 +- drivers/net/sfc/sfc_dp.h | 2 +- drivers/net/softnic/rte_eth_softnic_internals.h | 2 +- drivers/net/sxe2/sxe2_flow.c | 2 +- drivers/net/tap/rte_eth_tap.h | 2 +- drivers/net/tap/tap_flow.c | 2 +- drivers/net/thunderx/base/nicvf_bsvf.h | 2 +- drivers/net/thunderx/nicvf_ethdev.c | 2 +- drivers/net/txgbe/txgbe_ethdev_vf.c | 2 +- drivers/net/txgbe/txgbe_fdir.c | 2 +- drivers/net/txgbe/txgbe_flow.c | 2 +- drivers/net/txgbe/txgbe_rxtx.c | 2 +- drivers/net/vdev_netvsc/vdev_netvsc.c | 2 +- drivers/net/vmxnet3/vmxnet3_ethdev.c | 2 +- drivers/net/vmxnet3/vmxnet3_rxtx.c | 2 +- drivers/net/zxdh/zxdh_flow.c | 2 +- drivers/net/zxdh/zxdh_flow.h | 2 +- drivers/net/zxdh/zxdh_mtr.h | 2 +- drivers/raw/ifpga/base/opae_hw_api.h | 2 +- drivers/vdpa/mlx5/mlx5_vdpa.h | 2 +- drivers/vdpa/sfc/sfc_vdpa.c | 2 +- drivers/vdpa/sfc/sfc_vdpa.h | 2 +- examples/bbdev_app/main.c | 2 +- examples/bond/main.c | 2 +- examples/cmdline/main.c | 2 +- examples/cmdline/parse_obj_list.h | 2 +- examples/flow_filtering/main.c | 2 +- examples/helloworld/main.c | 2 +- examples/ip_fragmentation/main.c | 2 +- examples/ip_pipeline/action.h | 2 +- examples/ip_pipeline/cryptodev.h | 2 +- examples/ip_pipeline/link.h | 2 +- examples/ip_pipeline/mempool.h | 2 +- examples/ip_pipeline/pipeline.h | 2 +- examples/ip_pipeline/swq.h | 2 +- examples/ip_pipeline/tap.h | 2 +- examples/ip_pipeline/tmgr.h | 2 +- examples/ip_reassembly/main.c | 2 +- examples/ipsec-secgw/ipsec-secgw.c | 2 +- examples/ipv4_multicast/main.c | 2 +- examples/l2fwd-crypto/main.c | 2 +- examples/l2fwd-event/l2fwd_common.h | 2 +- examples/l2fwd-keepalive/ka-agent/main.c | 2 +- examples/l2fwd-keepalive/main.c | 2 +- examples/l2fwd-macsec/main.c | 2 +- examples/l2fwd/main.c | 2 +- examples/l3fwd-graph/main.c | 2 +- examples/l3fwd-power/main.c | 2 +- examples/l3fwd/l3fwd_em.c | 2 +- examples/l3fwd/l3fwd_lpm.c | 2 +- examples/l3fwd/main.c | 2 +- examples/link_status_interrupt/main.c | 2 +- .../multi_process/client_server_mp/mp_client/client.c | 2 +- .../multi_process/client_server_mp/mp_server/init.c | 2 +- .../multi_process/client_server_mp/mp_server/main.c | 2 +- examples/multi_process/hotplug_mp/main.c | 2 +- examples/multi_process/simple_mp/main.c | 2 +- examples/multi_process/symmetric_mp/main.c | 2 +- examples/server_node_efd/efd_node/node.c | 2 +- examples/server_node_efd/efd_server/init.c | 2 +- examples/server_node_efd/efd_server/main.c | 2 +- examples/service_cores/main.c | 2 +- examples/timer/main.c | 2 +- examples/vhost/main.h | 2 +- examples/vm_power_manager/channel_manager.c | 2 +- examples/vm_power_manager/channel_monitor.c | 2 +- examples/vm_power_manager/main.c | 2 +- examples/vmdq/main.c | 2 +- examples/vmdq_dcb/main.c | 2 +- lib/acl/rte_acl_osdep.h | 2 +- lib/bbdev/rte_bbdev.c | 2 +- lib/bpf/bpf_load_elf.c | 2 +- lib/bpf/bpf_pkt.c | 2 +- lib/cryptodev/cryptodev_pmd.c | 2 +- lib/cryptodev/rte_cryptodev.c | 2 +- lib/distributor/rte_distributor.c | 2 +- lib/distributor/rte_distributor_single.c | 2 +- lib/eal/common/eal_common_bus.c | 2 +- lib/eal/common/eal_common_class.c | 2 +- lib/eal/common/eal_common_dev.c | 2 +- lib/eal/common/eal_common_options.c | 2 +- lib/eal/common/eal_common_tailqs.c | 2 +- lib/eal/common/eal_common_trace.c | 2 +- lib/eal/common/eal_private.h | 2 +- lib/eal/common/malloc_elem.c | 2 +- lib/eal/common/malloc_heap.c | 2 +- lib/eal/common/malloc_heap.h | 2 +- lib/eal/common/rte_malloc.c | 2 +- lib/eal/freebsd/eal.c | 2 +- lib/eal/freebsd/eal_interrupts.c | 2 +- lib/eal/freebsd/eal_thread.c | 2 +- lib/eal/freebsd/include/rte_os.h | 2 +- lib/eal/linux/eal_alarm.c | 2 +- lib/eal/linux/eal_interrupts.c | 2 +- lib/eal/linux/include/rte_os.h | 2 +- lib/eal/windows/eal_alarm.c | 2 +- lib/eal/windows/include/sys/queue.h | 11 ----------- lib/efd/rte_efd.c | 2 +- lib/ethdev/ethdev_private.h | 2 +- lib/ethdev/rte_ethdev.c | 2 +- lib/fib/rte_fib.c | 2 +- lib/fib/rte_fib6.c | 2 +- lib/gpudev/gpudev.c | 2 +- lib/graph/graph_private.h | 2 +- lib/hash/rte_cuckoo_hash.c | 2 +- lib/hash/rte_fbk_hash.c | 2 +- lib/hash/rte_thash.c | 2 +- lib/ip_frag/ip_frag_common.h | 2 +- lib/log/log.c | 2 +- lib/lpm/rte_lpm.c | 2 +- lib/lpm/rte_lpm6.c | 2 +- lib/mbuf/rte_mbuf_dyn.c | 2 +- lib/mempool/rte_mempool.c | 2 +- lib/pipeline/rte_swx_ctl.c | 2 +- lib/pipeline/rte_swx_pipeline_internal.h | 2 +- lib/pmu/pmu.c | 2 +- lib/reorder/rte_reorder.c | 2 +- lib/rib/rte_rib.c | 2 +- lib/rib/rte_rib6.c | 2 +- lib/ring/rte_ring.c | 2 +- lib/stack/rte_stack.c | 2 +- lib/vhost/fd_man.h | 2 +- lib/vhost/socket.c | 2 +- lib/vhost/vdpa.c | 2 +- lib/vhost/vhost.h | 2 +- 283 files changed, 280 insertions(+), 293 deletions(-) delete mode 100644 lib/eal/windows/include/sys/queue.h
app/dumpcap/main.c +1 -1
@@ -17,7 +17,7 @@#include <stdio.h> #include <stdlib.h> #include <string.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <sys/types.h> #include <sys/utsname.h> #include <time.h>
app/proc-info/main.c +1 -1
@@ -9,7 +9,7 @@#include <errno.h> #include <stdarg.h> #include <inttypes.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <stdlib.h> #include <getopt.h> #include <unistd.h>
app/test-bbdev/main.h +1 -1
@@ -6,7 +6,7 @@#define _MAIN_H_#include <stddef.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_common.h> #include <rte_hexdump.h>
app/test-cmdline/cmdline_test.c +1 -1
@@ -9,7 +9,7 @@#include <stdlib.h> #include <errno.h> #include <ctype.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_common.h>
app/test-eventdev/evt_test.c +1 -1
@@ -4,7 +4,7 @@#include <stdio.h> #include <unistd.h> -#include <sys/queue.h> +#include <rte_queue.h> #include "evt_test.h"
app/test-eventdev/evt_test.h +1 -1
@@ -7,7 +7,7 @@#include <string.h> #include <stdbool.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_eal.h>
app/test-mldev/ml_test.h +1 -1
@@ -8,7 +8,7 @@#include <stdio.h> #include <stdlib.h> #include <string.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_common.h>
app/test-pipeline/config.c +1 -1
@@ -8,7 +8,7 @@#include <inttypes.h> #include <sys/types.h> #include <string.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <stdarg.h> #include <errno.h> #include <getopt.h>
app/test-pipeline/init.c +1 -1
@@ -8,7 +8,7 @@#include <inttypes.h> #include <sys/types.h> #include <string.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <stdarg.h> #include <errno.h> #include <getopt.h>
app/test-pipeline/main.c +1 -1
@@ -8,7 +8,7 @@#include <inttypes.h> #include <sys/types.h> #include <string.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <stdarg.h> #include <signal.h> #include <errno.h>
app/test-pipeline/runtime.c +1 -1
@@ -8,7 +8,7 @@#include <inttypes.h> #include <sys/types.h> #include <string.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <stdarg.h> #include <errno.h> #include <getopt.h>
app/test-pmd/5tswap.c +1 -1
@@ -8,7 +8,7 @@#include <unistd.h> #include <inttypes.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <sys/stat.h> #include <rte_common.h>
app/test-pmd/cmdline.c +1 -1
@@ -13,7 +13,7 @@#include <string.h> #include <unistd.h> #include <inttypes.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_common.h> #include <rte_byteorder.h>
app/test-pmd/config.c +1 -1
@@ -13,7 +13,7 @@#include <stdint.h> #include <inttypes.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h>
app/test-pmd/csumonly.c +1 -1
@@ -10,7 +10,7 @@#include <unistd.h> #include <inttypes.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <sys/stat.h> #include <rte_common.h>
app/test-pmd/flowgen.c +1 -1
@@ -10,7 +10,7 @@#include <unistd.h> #include <inttypes.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <sys/stat.h> #include <rte_common.h>
app/test-pmd/hairpin.c +1 -1
@@ -8,7 +8,7 @@#include <stdbool.h> #include <stdint.h> -#include <sys/queue.h> +#include <rte_queue.h> #include "testpmd.h"
app/test-pmd/icmpecho.c +1 -1
@@ -10,7 +10,7 @@#include <unistd.h> #include <inttypes.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <sys/stat.h> #include <rte_common.h>
app/test-pmd/iofwd.c +1 -1
@@ -10,7 +10,7 @@#include <unistd.h> #include <inttypes.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <sys/stat.h> #include <rte_common.h>
app/test-pmd/macfwd.c +1 -1
@@ -10,7 +10,7 @@#include <unistd.h> #include <inttypes.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <sys/stat.h> #include <rte_common.h>
app/test-pmd/macswap.c +1 -1
@@ -10,7 +10,7 @@#include <unistd.h> #include <inttypes.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <sys/stat.h> #include <rte_common.h>
app/test-pmd/noisy_vnf.c +1 -1
@@ -12,7 +12,7 @@#include <unistd.h> #include <inttypes.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <sys/stat.h> #include <rte_common.h>
app/test-pmd/parameters.c +1 -1
@@ -13,7 +13,7 @@#include <fcntl.h> #include <sys/types.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <sys/stat.h> #include <stdint.h>
app/test-pmd/rxonly.c +1 -1
@@ -10,7 +10,7 @@#include <unistd.h> #include <inttypes.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <sys/stat.h> #include <rte_common.h>
app/test-pmd/testpmd.c +1 -1
@@ -16,7 +16,7 @@#include <errno.h> #include <stdbool.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <sys/stat.h> #include <stdint.h>
app/test-pmd/testpmd.h +1 -1
@@ -21,7 +21,7 @@#include <cmdline.h> #include <cmdline_parse.h> -#include <sys/queue.h> +#include <rte_queue.h> #ifdef RTE_HAS_JANSSON #include <jansson.h> #endif
app/test-pmd/txonly.c +1 -1
@@ -10,7 +10,7 @@#include <unistd.h> #include <inttypes.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <sys/stat.h> #include <rte_common.h>
app/test/commands.c +1 -1
@@ -10,7 +10,7 @@#include <stdlib.h> #include <inttypes.h> #include <errno.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_common.h> #include <rte_log.h>
app/test/test.c +1 -1
@@ -9,7 +9,7 @@#include <stdlib.h> #include <errno.h> #include <ctype.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <cmdline_rdline.h> #include <cmdline_parse.h>
app/test/test.h +1 -1
@@ -12,7 +12,7 @@#include <stdio.h> #include <stdlib.h> #include <string.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_bitops.h> #include <rte_common.h>
app/test/test_atomic.c +1 -1
@@ -7,7 +7,7 @@#include <stdint.h> #include <unistd.h> #include <inttypes.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_memory.h> #include <rte_common.h>
app/test/test_cmdline_lib.c +1 -1
@@ -9,7 +9,7 @@#include <stdlib.h> #include <errno.h> #include <ctype.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_common.h>
app/test/test_func_reentrancy.c +1 -1
@@ -9,7 +9,7 @@#include <inttypes.h> #include <stdarg.h> #include <errno.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_common.h> #include <rte_log.h>
app/test/test_hash.c +1 -1
@@ -8,7 +8,7 @@#include <stdlib.h> #include <stdarg.h> #include <errno.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_common.h> #include <rte_malloc.h>
app/test/test_hash_functions.c +1 -1
@@ -8,7 +8,7 @@#include <stdlib.h> #include <stdarg.h> #include <errno.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_cycles.h> #include <rte_random.h>
app/test/test_link_bonding.c +1 -1
@@ -11,7 +11,7 @@#include <inttypes.h> #include <errno.h> #include <pthread.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <sys/time.h> #include <rte_cycles.h>
app/test/test_link_bonding_mode4.c +1 -1
@@ -10,7 +10,7 @@#include <inttypes.h> #include <errno.h> #include <rte_cycles.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_byteorder.h> #include <rte_common.h>
app/test/test_link_bonding_rssconf.c +1 -1
@@ -10,7 +10,7 @@#include <inttypes.h> #include <errno.h> #include <rte_cycles.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_byteorder.h> #include <rte_common.h>
app/test/test_logs.c +1 -1
@@ -5,7 +5,7 @@#include <stdio.h> #include <stdint.h> #include <stdarg.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_log.h> #include <rte_memory.h>
app/test/test_malloc.c +1 -1
@@ -13,7 +13,7 @@#ifndef RTE_EXEC_ENV_WINDOWS #include <sys/mman.h> #endif -#include <sys/queue.h> +#include <rte_queue.h> #include <unistd.h> #include <rte_common.h>
app/test/test_mbuf.c +1 -1
@@ -12,7 +12,7 @@#include <stdint.h> #include <inttypes.h> #include <errno.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_common.h> #include <rte_errno.h>
app/test/test_mcslock.c +1 -1
@@ -7,7 +7,7 @@#include <inttypes.h> #include <string.h> #include <unistd.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_common.h> #include <rte_memory.h>
app/test/test_mempool.c +1 -1
@@ -9,7 +9,7 @@#include <inttypes.h> #include <stdarg.h> #include <errno.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_common.h> #include <rte_eal_paging.h>
app/test/test_mempool_perf.c +1 -1
@@ -10,7 +10,7 @@#include <inttypes.h> #include <stdarg.h> #include <errno.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_common.h> #include <rte_log.h>
app/test/test_memzone.c +1 -1
@@ -6,7 +6,7 @@#include <stdint.h> #include <string.h> #include <inttypes.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_random.h> #include <rte_cycles.h>
app/test/test_mp_secondary.c +1 -1
@@ -10,7 +10,7 @@#include <stdlib.h> #include <stdarg.h> #include <inttypes.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <errno.h> #include <string.h> #include <unistd.h>
app/test/test_per_lcore.c +1 -1
@@ -4,7 +4,7 @@#include <stdio.h> #include <stdint.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_common.h> #include <rte_memory.h>
app/test/test_pflock.c +1 -1
@@ -6,7 +6,7 @@#include <stdint.h> #include <inttypes.h> #include <unistd.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <string.h> #include <rte_common.h>
app/test/test_ring.c +1 -1
@@ -10,7 +10,7 @@#include <stdint.h> #include <inttypes.h> #include <errno.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_common.h> #include <rte_log.h>
app/test/test_rwlock.c +1 -1
@@ -6,7 +6,7 @@#include <stdint.h> #include <inttypes.h> #include <unistd.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <string.h> #include <rte_common.h>
app/test/test_soring.c +1 -1
@@ -9,7 +9,7 @@#include <stdint.h> #include <inttypes.h> #include <errno.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_common.h> #include <rte_log.h>
app/test/test_spinlock.c +1 -1
@@ -7,7 +7,7 @@#include <inttypes.h> #include <string.h> #include <unistd.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_common.h> #include <rte_memory.h>
app/test/test_tailq.c +1 -1
@@ -7,7 +7,7 @@#include <stdarg.h> #include <string.h> #include <errno.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_eal.h> #include <rte_string_fns.h>
app/test/test_ticketlock.c +1 -1
@@ -6,7 +6,7 @@#include <stdint.h> #include <stdio.h> #include <string.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <unistd.h> #include <rte_common.h>
app/test/test_timer.c +1 -1
@@ -91,7 +91,7 @@#include <stdlib.h> #include <stdint.h> #include <inttypes.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <math.h> #include <rte_common.h>
drivers/bus/auxiliary/auxiliary_common.c +1 -1
@@ -8,7 +8,7 @@#include <stdbool.h> #include <stdlib.h> #include <stdio.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <eal_export.h> #include <rte_errno.h> #include <rte_interrupts.h>
drivers/bus/auxiliary/private.h +1 -1
@@ -7,7 +7,7 @@#include <stdbool.h> #include <stdio.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <bus_driver.h>
drivers/bus/fslmc/bus_fslmc_driver.h +1 -1
@@ -17,7 +17,7 @@#include <stdlib.h> #include <limits.h> #include <errno.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <stdint.h> #include <inttypes.h>
drivers/bus/fslmc/portal/dpaa2_hw_dpio.c +1 -1
@@ -17,7 +17,6 @@#include <signal.h> #include <pthread.h> #include <sys/types.h> -#include <sys/queue.h> #include <sys/ioctl.h> #include <sys/stat.h> #include <sys/mman.h>
@@ -26,6 +25,7 @@#include <sys/syscall.h> #include <eal_export.h> +#include <rte_queue.h> #include <rte_mbuf.h> #include <ethdev_driver.h> #include <rte_malloc.h>
drivers/bus/ifpga/ifpga_bus.c +1 -1
@@ -7,7 +7,7 @@#include <stdint.h> #include <stdlib.h> #include <stdio.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <sys/mman.h> #include <sys/types.h> #include <unistd.h>
drivers/bus/pci/bsd/pci.c +1 -1
@@ -15,7 +15,7 @@#include <errno.h> #include <dirent.h> #include <limits.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <sys/mman.h> #include <sys/ioctl.h> #include <sys/pciio.h>
drivers/bus/pci/pci_common.c +1 -1
@@ -9,7 +9,7 @@#include <stdbool.h> #include <stdlib.h> #include <stdio.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <eal_export.h> #include <rte_errno.h> #include <rte_interrupts.h>
drivers/bus/pci/pci_params.c +1 -1
@@ -2,7 +2,7 @@* Copyright 2018 Gaëtan Rivet */ -#include <sys/queue.h> +#include <rte_queue.h> #include <bus_driver.h> #include <rte_bus_pci.h>
drivers/bus/pci/windows/pci.c +1 -1
@@ -2,7 +2,7 @@* Copyright 2020 Mellanox Technologies, Ltd */ -#include <sys/queue.h> +#include <rte_queue.h> #include <eal_export.h> #include <rte_windows.h>
drivers/bus/pci/windows/pci_netuio.c +1 -1
@@ -2,7 +2,7 @@* Copyright(c) 2020 Intel Corporation. */ -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_windows.h> #include <rte_errno.h>
drivers/bus/platform/platform.c +1 -1
@@ -10,7 +10,7 @@#include <string.h> #include <sys/ioctl.h> #include <sys/mman.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <unistd.h> #include <bus_driver.h>
drivers/bus/vdev/vdev.c +1 -1
@@ -8,7 +8,7 @@#include <stdlib.h> #include <stdint.h> #include <stdbool.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_os_shim.h> #include <eal_export.h>
drivers/bus/vmbus/vmbus_common.c +1 -1
@@ -7,7 +7,7 @@#include <unistd.h> #include <dirent.h> #include <fcntl.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <sys/mman.h> #include <eal_export.h>
drivers/common/cnxk/roc_bphy_irq.c +0 -1
@@ -5,7 +5,6 @@#include <pthread.h> #include <sys/ioctl.h> #include <sys/mman.h> -#include <sys/queue.h> #include <unistd.h> #include "roc_api.h"
drivers/common/cnxk/roc_npc.h +0 -2
@@ -5,8 +5,6 @@#ifndef _ROC_NPC_H_#define _ROC_NPC_H_ -#include <sys/queue.h> -enum roc_npc_item_type {ROC_NPC_ITEM_TYPE_VOID , ROC_NPC_ITEM_TYPE_ANY,
drivers/common/cnxk/roc_platform.h +1 -0
@@ -20,6 +20,7 @@#include <rte_malloc.h> #include <rte_memzone.h> #include <rte_pci.h> +#include <rte_queue.h> #include <rte_seqcount.h> #include <rte_spinlock.h> #include <rte_string_fns.h>
drivers/common/mlx5/mlx5_common_mr.h +1 -1
@@ -8,7 +8,7 @@#include <stddef.h> #include <stdint.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_compat.h>
drivers/crypto/bcmfs/bcmfs_device.c +1 -1
@@ -6,7 +6,7 @@#include <dirent.h> #include <stdbool.h> #include <stdlib.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_malloc.h> #include <rte_string_fns.h>
drivers/crypto/bcmfs/bcmfs_device.h +1 -1
@@ -6,7 +6,7 @@#ifndef _BCMFS_DEVICE_H_#define _BCMFS_DEVICE_H_ -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_spinlock.h> #include <bus_vdev_driver.h>
drivers/crypto/ccp/ccp_crypto.c +1 -1
@@ -9,7 +9,7 @@#include <stdio.h> #include <string.h> #include <sys/mman.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <sys/types.h> #include <unistd.h> #include <openssl/sha.h>
drivers/crypto/ccp/ccp_dev.c +1 -1
@@ -7,7 +7,7 @@#include <stdio.h> #include <string.h> #include <sys/mman.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <sys/types.h> #include <sys/file.h> #include <unistd.h>
drivers/event/dlb2/dlb2_selftest.c +1 -1
@@ -7,7 +7,7 @@#include <stdint.h> #include <errno.h> #include <unistd.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_memory.h> #include <rte_memzone.h>
drivers/event/opdl/opdl_test.c +1 -1
@@ -8,7 +8,7 @@#include <stdlib.h> #include <errno.h> #include <unistd.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_memory.h> #include <rte_memzone.h>
drivers/event/sw/sw_evdev_selftest.c +1 -1
@@ -9,7 +9,7 @@#include <stdlib.h> #include <errno.h> #include <unistd.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_memory.h> #include <rte_launch.h>
drivers/net/axgbe/axgbe_common.h +1 -1
@@ -10,7 +10,7 @@#include <stdbool.h> #include <limits.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <stdio.h> #include <stdlib.h> #include <string.h>
drivers/net/bnx2x/bnx2x_ethdev.h +1 -1
@@ -8,7 +8,7 @@#ifndef PMD_BNX2X_ETHDEV_H #define PMD_BNX2X_ETHDEV_H -#include <sys/queue.h> +#include <rte_queue.h> #include <sys/param.h> #include <sys/user.h> #include <sys/stat.h>
drivers/net/bnxt/bnxt.h +1 -1
@@ -9,7 +9,7 @@#include <inttypes.h> #include <stdbool.h> #include <pthread.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_pci.h> #include <bus_pci_driver.h>
drivers/net/bnxt/bnxt_filter.c +1 -1
@@ -3,7 +3,7 @@* All rights reserved. */ -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_byteorder.h> #include <rte_log.h>
drivers/net/bnxt/bnxt_flow.c +1 -1
@@ -3,7 +3,7 @@* All rights reserved. */ -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_log.h> #include <rte_malloc.h>
drivers/net/bnxt/bnxt_vnic.h +1 -1
@@ -6,7 +6,7 @@#ifndef _BNXT_VNIC_H_#define _BNXT_VNIC_H_ -#include <sys/queue.h> +#include <rte_queue.h> #include <stdbool.h> #include <rte_hash.h>
drivers/net/bnxt/tf_ulp/bnxt_ulp.h +1 -1
@@ -8,7 +8,7 @@#include <inttypes.h> #include <stdbool.h> -#include <sys/queue.h> +#include <rte_queue.h> #include "rte_version.h" #include "rte_ethdev.h"
drivers/net/bnxt/tf_ulp/bnxt_ulp_meter.c +1 -1
@@ -4,7 +4,7 @@*/ #include <math.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_log.h> #include <rte_malloc.h>
drivers/net/bonding/eth_bond_private.h +1 -1
@@ -6,7 +6,7 @@#define _ETH_BOND_PRIVATE_H_#include <stdint.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <ethdev_driver.h> #include <rte_flow.h>
drivers/net/bonding/rte_eth_bond_flow.c +1 -1
@@ -4,7 +4,7 @@#include <stddef.h> #include <string.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_errno.h> #include <rte_malloc.h>
drivers/net/cxgbe/cxgbe_ethdev.c +1 -1
@@ -3,7 +3,7 @@* All rights reserved. */ -#include <sys/queue.h> +#include <rte_queue.h> #include <stdio.h> #include <errno.h> #include <stdint.h>
drivers/net/cxgbe/cxgbe_main.c +1 -1
@@ -3,7 +3,7 @@* All rights reserved. */ -#include <sys/queue.h> +#include <rte_queue.h> #include <sys/stat.h> #include <stdio.h> #include <errno.h>
drivers/net/cxgbe/sge.c +1 -1
@@ -3,7 +3,7 @@* All rights reserved. */ -#include <sys/queue.h> +#include <rte_queue.h> #include <stdio.h> #include <errno.h> #include <stdint.h>
drivers/net/dpaa2/dpaa2_flow.c +1 -1
@@ -2,7 +2,7 @@* Copyright 2018-2022 NXP */ -#include <sys/queue.h> +#include <rte_queue.h> #include <stdio.h> #include <errno.h> #include <stdint.h>
drivers/net/dpaa2/dpaa2_mux.c +1 -1
@@ -2,7 +2,7 @@* Copyright 2018-2021,2023 NXP */ -#include <sys/queue.h> +#include <rte_queue.h> #include <stdio.h> #include <errno.h> #include <stdint.h>
drivers/net/dpaa2/dpaa2_ptp.c +1 -1
@@ -2,7 +2,7 @@* Copyright 2019, 2023 NXP */ -#include <sys/queue.h> +#include <rte_queue.h> #include <stdio.h> #include <errno.h> #include <stdint.h>
drivers/net/enic/enic.h +1 -1
@@ -21,7 +21,7 @@#include "enic_res.h" #include "cq_enet_desc.h" #include <stdbool.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_spinlock.h> #define DRV_NAME "enic_pmd"
drivers/net/failsafe/failsafe_flow.c +1 -1
@@ -5,7 +5,7 @@#include <stddef.h> #include <string.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_errno.h> #include <rte_malloc.h>
drivers/net/failsafe/failsafe_private.h +1 -1
@@ -7,7 +7,7 @@#define _ETH_FAILSAFE_PRIVATE_H_#include <stdint.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <pthread.h> #include <rte_atomic.h>
drivers/net/intel/cpfl/cpfl_flow_engine_fxp.c +1 -1
@@ -2,7 +2,7 @@* Copyright(c) 2022 Intel Corporation */ -#include <sys/queue.h> +#include <rte_queue.h> #include <stdio.h> #include <errno.h> #include <stdint.h>
drivers/net/intel/e1000/e1000_ethdev.h +1 -1
@@ -6,7 +6,7 @@#define _E1000_ETHDEV_H_#include <stdint.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_flow.h> #include <rte_time.h>
drivers/net/intel/e1000/em_ethdev.c +1 -1
@@ -2,7 +2,7 @@* Copyright(c) 2010-2016 Intel Corporation */ -#include <sys/queue.h> +#include <rte_queue.h> #include <stdio.h> #include <errno.h> #include <stdint.h>
drivers/net/intel/e1000/em_rxtx.c +1 -1
@@ -2,7 +2,7 @@* Copyright(c) 2010-2016 Intel Corporation */ -#include <sys/queue.h> +#include <rte_queue.h> #include <stdio.h> #include <stdlib.h>
drivers/net/intel/e1000/igb_ethdev.c +1 -1
@@ -2,7 +2,7 @@* Copyright(c) 2010-2016 Intel Corporation */ -#include <sys/queue.h> +#include <rte_queue.h> #include <stdio.h> #include <errno.h> #include <stdint.h>
drivers/net/intel/e1000/igb_flow.c +1 -1
@@ -2,7 +2,7 @@* Copyright(c) 2010-2016 Intel Corporation */ -#include <sys/queue.h> +#include <rte_queue.h> #include <stdio.h> #include <errno.h> #include <stdint.h>
drivers/net/intel/e1000/igb_rxtx.c +1 -1
@@ -2,7 +2,7 @@* Copyright(c) 2010-2016 Intel Corporation */ -#include <sys/queue.h> +#include <rte_queue.h> #include <stdio.h> #include <stdlib.h>
drivers/net/intel/i40e/i40e_ethdev.h +1 -1
@@ -6,7 +6,7 @@#define _I40E_ETHDEV_H_#include <stdint.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_time.h> #include <rte_kvargs.h>
drivers/net/intel/i40e/i40e_fdir.c +1 -1
@@ -2,7 +2,7 @@* Copyright(c) 2010-2015 Intel Corporation */ -#include <sys/queue.h> +#include <rte_queue.h> #include <stdio.h> #include <errno.h> #include <stdint.h>
drivers/net/intel/i40e/i40e_flow.c +1 -1
@@ -2,7 +2,7 @@* Copyright(c) 2016-2017 Intel Corporation */ -#include <sys/queue.h> +#include <rte_queue.h> #include <stdio.h> #include <errno.h> #include <stdint.h>
drivers/net/intel/i40e/i40e_hash.c +1 -1
@@ -2,7 +2,7 @@* Copyright(c) 2020 Intel Corporation */ -#include <sys/queue.h> +#include <rte_queue.h> #include <stdio.h> #include <errno.h> #include <stdint.h>
drivers/net/intel/i40e/i40e_pf.c +1 -1
@@ -2,7 +2,7 @@* Copyright(c) 2010-2017 Intel Corporation */ -#include <sys/queue.h> +#include <rte_queue.h> #include <stdio.h> #include <errno.h> #include <stdint.h>
drivers/net/intel/i40e/i40e_rxtx.c +1 -1
@@ -10,7 +10,7 @@#include <stdarg.h> #include <unistd.h> #include <inttypes.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_string_fns.h> #include <rte_memzone.h>
drivers/net/intel/iavf/iavf.h +1 -1
@@ -5,7 +5,7 @@#ifndef _IAVF_ETHDEV_H_#define _IAVF_ETHDEV_H_ -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_kvargs.h> #include <rte_tm_driver.h>
drivers/net/intel/iavf/iavf_ethdev.c +1 -1
@@ -3,7 +3,7 @@*/ #include <ctype.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <stdalign.h> #include <stdio.h> #include <errno.h>
drivers/net/intel/iavf/iavf_fdir.c +1 -1
@@ -2,7 +2,7 @@* Copyright(c) 2020 Intel Corporation */ -#include <sys/queue.h> +#include <rte_queue.h> #include <stdio.h> #include <errno.h> #include <stdint.h>
drivers/net/intel/iavf/iavf_fsub.c +1 -1
@@ -2,7 +2,7 @@* Copyright(c) 2022 Intel Corporation */ -#include <sys/queue.h> +#include <rte_queue.h> #include <stdio.h> #include <errno.h> #include <stdint.h>
drivers/net/intel/iavf/iavf_generic_flow.c +1 -1
@@ -2,7 +2,7 @@* Copyright(c) 2019 Intel Corporation */ -#include <sys/queue.h> +#include <rte_queue.h> #include <stdio.h> #include <errno.h> #include <stdint.h>
drivers/net/intel/iavf/iavf_hash.c +1 -1
@@ -2,7 +2,7 @@* Copyright(c) 2020 Intel Corporation */ -#include <sys/queue.h> +#include <rte_queue.h> #include <stdio.h> #include <errno.h> #include <stdint.h>
drivers/net/intel/iavf/iavf_rxtx.c +1 -1
@@ -10,7 +10,7 @@#include <stdarg.h> #include <unistd.h> #include <inttypes.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <eal_export.h> #include <rte_string_fns.h>
drivers/net/intel/ice/base/ice_osdep.h +1 -1
@@ -10,7 +10,7 @@#include <stdio.h> #include <stdarg.h> #include <inttypes.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <stdbool.h> #include <rte_common.h>
drivers/net/intel/ice/ice_acl_filter.c +1 -1
@@ -2,7 +2,7 @@* Copyright(c) 2020 Intel Corporation */ -#include <sys/queue.h> +#include <rte_queue.h> #include <stdio.h> #include <errno.h> #include <stdint.h>
drivers/net/intel/ice/ice_dcf.c +1 -1
@@ -2,7 +2,7 @@* Copyright(c) 2020 Intel Corporation */ -#include <sys/queue.h> +#include <rte_queue.h> #include <stdio.h> #include <errno.h> #include <stdint.h>
drivers/net/intel/ice/ice_dcf_ethdev.c +1 -1
@@ -4,7 +4,7 @@#include <errno.h> #include <stdbool.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <sys/types.h> #include <unistd.h>
drivers/net/intel/ice/ice_generic_flow.c +1 -1
@@ -2,7 +2,7 @@* Copyright(c) 2019 Intel Corporation */ -#include <sys/queue.h> +#include <rte_queue.h> #include <stdio.h> #include <errno.h> #include <stdint.h>
drivers/net/intel/ice/ice_hash.c +1 -1
@@ -2,7 +2,7 @@* Copyright(c) 2019 Intel Corporation */ -#include <sys/queue.h> +#include <rte_queue.h> #include <stdio.h> #include <errno.h> #include <stdint.h>
drivers/net/intel/ice/ice_switch_filter.c +1 -1
@@ -2,7 +2,7 @@* Copyright(c) 2019 Intel Corporation */ -#include <sys/queue.h> +#include <rte_queue.h> #include <stdio.h> #include <errno.h> #include <stdint.h>
drivers/net/intel/idpf/base/idpf_osdep.h +1 -1
@@ -10,9 +10,9 @@#include <stdio.h> #include <stdarg.h> #include <inttypes.h> -#include <sys/queue.h> #include <stdbool.h> +#include <rte_queue.h> #include <rte_common.h> #include <rte_malloc.h> #include <rte_memzone.h>
drivers/net/intel/ipn3ke/ipn3ke_ethdev.h +1 -1
@@ -11,7 +11,7 @@#include <limits.h> #include <net/if.h> #include <netinet/in.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_mbuf.h> #include <rte_flow_driver.h>
drivers/net/intel/ipn3ke/ipn3ke_flow.c +1 -1
@@ -2,7 +2,7 @@* Copyright(c) 2019 Intel Corporation */ -#include <sys/queue.h> +#include <rte_queue.h> #include <stdio.h> #include <errno.h> #include <stdint.h>
drivers/net/intel/ixgbe/ixgbe_ethdev.c +1 -1
@@ -2,7 +2,7 @@* Copyright(c) 2010-2017 Intel Corporation */ -#include <sys/queue.h> +#include <rte_queue.h> #include <stdio.h> #include <errno.h> #include <stdint.h>
drivers/net/intel/ixgbe/ixgbe_ethdev.h +1 -1
@@ -7,7 +7,7 @@#include <stdint.h> #include <stdbool.h> -#include <sys/queue.h> +#include <rte_queue.h> #include "base/ixgbe_type.h" #include "base/ixgbe_dcb.h"
drivers/net/intel/ixgbe/ixgbe_fdir.c +1 -1
@@ -6,7 +6,7 @@#include <stdint.h> #include <stdarg.h> #include <errno.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_interrupts.h> #include <rte_log.h>
drivers/net/intel/ixgbe/ixgbe_flow.c +1 -1
@@ -2,7 +2,7 @@* Copyright(c) 2010-2016 Intel Corporation */ -#include <sys/queue.h> +#include <rte_queue.h> #include <stdio.h> #include <errno.h> #include <stdint.h>
drivers/net/intel/ixgbe/ixgbe_rxtx.c +1 -1
@@ -3,7 +3,7 @@* Copyright 2014 6WIND S.A. */ -#include <sys/queue.h> +#include <rte_queue.h> #include <stdio.h> #include <stdlib.h>
drivers/net/memif/memif_socket.h +1 -1
@@ -5,7 +5,7 @@#ifndef _MEMIF_SOCKET_H_#define _MEMIF_SOCKET_H_ -#include <sys/queue.h> +#include <rte_queue.h> #include <sys/un.h> /**
drivers/net/memif/rte_eth_memif.h +1 -1
@@ -5,7 +5,7 @@#ifndef _RTE_ETH_MEMIF_H_#define _RTE_ETH_MEMIF_H_ -#include <sys/queue.h> +#include <rte_queue.h> #include <ethdev_driver.h> #include <rte_ether.h>
drivers/net/mlx4/mlx4.h +1 -1
@@ -8,7 +8,7 @@#include <net/if.h> #include <stdint.h> -#include <sys/queue.h> +#include <rte_queue.h> /* Verbs headers do not support -pedantic. */ #ifdef PEDANTIC
drivers/net/mlx4/mlx4_flow.c +1 -1
@@ -14,7 +14,7 @@#include <stddef.h> #include <stdint.h> #include <string.h> -#include <sys/queue.h> +#include <rte_queue.h> /* Verbs headers do not support -pedantic. */ #ifdef PEDANTIC
drivers/net/mlx4/mlx4_flow.h +1 -1
@@ -7,7 +7,7 @@#define RTE_PMD_MLX4_FLOW_H_ #include <stdint.h> -#include <sys/queue.h> +#include <rte_queue.h> /* Verbs headers do not support -pedantic. */ #ifdef PEDANTIC
drivers/net/mlx4/mlx4_mr.h +1 -1
@@ -8,7 +8,7 @@#include <stddef.h> #include <stdint.h> -#include <sys/queue.h> +#include <rte_queue.h> /* Verbs headers do not support -pedantic. */ #ifdef PEDANTIC
drivers/net/mlx4/mlx4_rxtx.h +1 -1
@@ -7,7 +7,7 @@#define MLX4_RXTX_H_ #include <stdint.h> -#include <sys/queue.h> +#include <rte_queue.h> /* Verbs headers do not support -pedantic. */ #ifdef PEDANTIC
drivers/net/mlx5/hws/mlx5dr_internal.h +1 -1
@@ -6,7 +6,7 @@#define MLX5DR_INTERNAL_H_ #include <stdint.h> -#include <sys/queue.h> +#include <rte_queue.h> /* Verbs headers do not support -pedantic. */ #ifdef PEDANTIC #pragma GCC diagnostic ignored "-Wpedantic"
drivers/net/mlx5/linux/mlx5_verbs.c +1 -1
@@ -8,7 +8,7 @@#include <stdint.h> #include <unistd.h> #include <inttypes.h> -#include <sys/queue.h> +#include <rte_queue.h> #include "mlx5_autoconf.h"
drivers/net/mlx5/mlx5.h +1 -1
@@ -10,7 +10,7 @@#include <stdbool.h> #include <stdint.h> #include <limits.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_pci.h> #include <rte_ether.h>
drivers/net/mlx5/mlx5_devx.c +1 -1
@@ -7,7 +7,7 @@#include <stdbool.h> #include <string.h> #include <stdint.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_malloc.h> #include <rte_common.h>
drivers/net/mlx5/mlx5_driver_event.c +1 -1
@@ -4,7 +4,7 @@#include "mlx5_driver_event.h" -#include <sys/queue.h> +#include <rte_queue.h> #include <eal_export.h>
drivers/net/mlx5/mlx5_flow.c +1 -1
@@ -7,7 +7,7 @@#include <stdint.h> #include <string.h> #include <stdbool.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <eal_export.h> #include <rte_common.h>
drivers/net/mlx5/mlx5_flow.h +1 -1
@@ -8,7 +8,7 @@#include <stdalign.h> #include <stdint.h> #include <string.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_alarm.h> #include <rte_mtr.h>
drivers/net/mlx5/mlx5_flow_dv.c +1 -1
@@ -2,7 +2,7 @@* Copyright 2018 Mellanox Technologies, Ltd */ -#include <sys/queue.h> +#include <rte_queue.h> #include <stdalign.h> #include <stdint.h> #include <string.h>
drivers/net/mlx5/mlx5_flow_verbs.c +1 -1
@@ -3,7 +3,7 @@*/ #include <netinet/in.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <stdalign.h> #include <stdint.h> #include <string.h>
drivers/net/mlx5/mlx5_rx.h +1 -1
@@ -7,7 +7,7 @@#define RTE_PMD_MLX5_RX_H_ #include <stdint.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_mbuf.h> #include <rte_mempool.h>
drivers/net/mlx5/mlx5_rxq.c +1 -1
@@ -8,7 +8,7 @@#include <string.h> #include <stdint.h> #include <fcntl.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <eal_export.h> #include <rte_mbuf.h>
drivers/net/mlx5/mlx5_rxtx.h +1 -1
@@ -8,7 +8,7 @@#include <stddef.h> #include <stdint.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_mbuf.h> #include <rte_mempool.h>
drivers/net/mlx5/mlx5_tx.h +1 -1
@@ -7,7 +7,7 @@#define RTE_PMD_MLX5_TX_H_ #include <stdint.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_mbuf.h> #include <rte_mempool.h>
drivers/net/nfb/nfb_ethdev.c +1 -1
@@ -5,7 +5,7 @@*/ #include <ctype.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <eal_export.h> #include <rte_tailq.h>
drivers/net/ngbe/ngbe_ethdev_vf.c +1 -1
@@ -3,7 +3,7 @@* Copyright(c) 2010-2017 Intel Corporation */ -#include <sys/queue.h> +#include <rte_queue.h> #include <stdio.h> #include <errno.h> #include <stdint.h>
drivers/net/ngbe/ngbe_rxtx.c +1 -1
@@ -3,7 +3,7 @@* Copyright(c) 2010-2017 Intel Corporation */ -#include <sys/queue.h> +#include <rte_queue.h> #include <stdint.h> #include <rte_ethdev.h>
drivers/net/ntnic/ntnic_ethdev.c +1 -1
@@ -13,7 +13,7 @@#include <ethdev_pci.h> #include <rte_kvargs.h> -#include <sys/queue.h> +#include <rte_queue.h> #include "rte_spinlock.h" #include "ntlog.h"
drivers/net/qede/qede_ethdev.h +1 -1
@@ -8,7 +8,7 @@#ifndef _QEDE_ETHDEV_H_#define _QEDE_ETHDEV_H_ -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_ether.h> #include <ethdev_driver.h>
drivers/net/sfc/sfc_dp.c +1 -1
@@ -7,7 +7,7 @@* for Solarflare) and Solarflare Communications, Inc. */ -#include <sys/queue.h> +#include <rte_queue.h> #include <stdalign.h> #include <string.h> #include <errno.h>
drivers/net/sfc/sfc_dp.h +1 -1
@@ -11,7 +11,7 @@#define _SFC_DP_H#include <stdbool.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_pci.h>
drivers/net/softnic/rte_eth_softnic_internals.h +1 -1
@@ -7,7 +7,7 @@#include <stddef.h> #include <stdint.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_mempool.h> #include <rte_mbuf.h>
drivers/net/sxe2/sxe2_flow.c +1 -1
@@ -2,7 +2,7 @@* Copyright (C), 2025, Wuxi Stars Micro System Technologies Co., Ltd. */ -#include <sys/queue.h> +#include <rte_queue.h> #include <unistd.h> #include "sxe2_ethdev.h" #include "sxe2_flow.h"
drivers/net/tap/rte_eth_tap.h +1 -1
@@ -6,7 +6,7 @@#ifndef _RTE_ETH_TAP_H_#define _RTE_ETH_TAP_H_ -#include <sys/queue.h> +#include <rte_queue.h> #include <sys/uio.h> #include <inttypes.h> #include <limits.h>
drivers/net/tap/tap_flow.c +1 -1
@@ -6,7 +6,7 @@#include <errno.h> #include <string.h> #include <unistd.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <sys/resource.h> #include <rte_byteorder.h>
drivers/net/thunderx/base/nicvf_bsvf.h +1 -1
@@ -5,7 +5,7 @@#ifndef __THUNDERX_NICVF_BSVF_H__#define __THUNDERX_NICVF_BSVF_H__ -#include <sys/queue.h> +#include <rte_queue.h> struct nicvf ;
drivers/net/thunderx/nicvf_ethdev.c +1 -1
@@ -12,7 +12,7 @@#include <stdarg.h> #include <inttypes.h> #include <netinet/in.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_alarm.h> #include <rte_branch_prediction.h>
drivers/net/txgbe/txgbe_ethdev_vf.c +1 -1
@@ -3,7 +3,7 @@* Copyright(c) 2010-2017 Intel Corporation */ -#include <sys/queue.h> +#include <rte_queue.h> #include <stdio.h> #include <errno.h> #include <stdint.h>
drivers/net/txgbe/txgbe_fdir.c +1 -1
@@ -7,7 +7,7 @@#include <stdint.h> #include <stdarg.h> #include <errno.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_malloc.h> #include "txgbe_logs.h"
drivers/net/txgbe/txgbe_flow.c +1 -1
@@ -3,7 +3,7 @@* Copyright(c) 2010-2017 Intel Corporation */ -#include <sys/queue.h> +#include <rte_queue.h> #include <bus_pci_driver.h> #include <rte_malloc.h> #include <rte_flow.h>
drivers/net/txgbe/txgbe_rxtx.c +1 -1
@@ -3,7 +3,7 @@* Copyright(c) 2010-2017 Intel Corporation */ -#include <sys/queue.h> +#include <rte_queue.h> #include <stdio.h> #include <stdlib.h>
drivers/net/vdev_netvsc/vdev_netvsc.c +1 -1
@@ -19,7 +19,7 @@#include <stdio.h> #include <string.h> #include <sys/ioctl.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <sys/socket.h> #include <unistd.h>
drivers/net/vmxnet3/vmxnet3_ethdev.c +1 -1
@@ -2,7 +2,7 @@* Copyright(c) 2010-2015 Intel Corporation */ -#include <sys/queue.h> +#include <rte_queue.h> #include <stdalign.h> #include <stdio.h> #include <errno.h>
drivers/net/vmxnet3/vmxnet3_rxtx.c +1 -1
@@ -2,7 +2,7 @@* Copyright(c) 2010-2015 Intel Corporation */ -#include <sys/queue.h> +#include <rte_queue.h> #include <stdio.h> #include <stdlib.h>
drivers/net/zxdh/zxdh_flow.c +1 -1
@@ -2,7 +2,7 @@* Copyright(c) 2025 ZTE Corporation */ -#include <sys/queue.h> +#include <rte_queue.h> #include <stdio.h> #include <errno.h> #include <stdint.h>
drivers/net/zxdh/zxdh_flow.h +1 -1
@@ -7,7 +7,7 @@#include <stddef.h> #include <stdint.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_arp.h> #include <rte_common.h>
drivers/net/zxdh/zxdh_mtr.h +1 -1
@@ -7,7 +7,7 @@#include <stddef.h> #include <stdint.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_mtr.h> #include "zxdh_np.h"
drivers/raw/ifpga/base/opae_hw_api.h +1 -1
@@ -8,7 +8,7 @@#include <stdint.h> #include <stdlib.h> #include <stdio.h> -#include <sys/queue.h> +#include <rte_queue.h> #include "opae_osdep.h" #include "opae_intel_max10.h"
drivers/vdpa/mlx5/mlx5_vdpa.h +1 -1
@@ -6,7 +6,7 @@#define RTE_PMD_MLX5_VDPA_H_ #include <linux/virtio_net.h> -#include <sys/queue.h> +#include <rte_queue.h> #ifdef PEDANTIC #pragma GCC diagnostic ignored "-Wpedantic"
drivers/vdpa/sfc/sfc_vdpa.c +1 -1
@@ -5,7 +5,7 @@#include <stdbool.h> #include <stdint.h> #include <pthread.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_common.h> #include <rte_devargs.h>
drivers/vdpa/sfc/sfc_vdpa.h +1 -1
@@ -6,7 +6,7 @@#define _SFC_VDPA_H#include <stdint.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <bus_pci_driver.h>
examples/bbdev_app/main.c +1 -1
@@ -10,7 +10,7 @@#include <inttypes.h> #include <sys/types.h> #include <unistd.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <stdarg.h> #include <ctype.h> #include <errno.h>
examples/bond/main.c +1 -1
@@ -3,7 +3,7 @@*/ #include <stdint.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <sys/socket.h> #include <stdlib.h> #include <string.h>
examples/cmdline/main.c +1 -1
@@ -8,7 +8,7 @@#include <string.h> #include <stdint.h> #include <errno.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <cmdline_rdline.h> #include <cmdline_parse.h>
examples/cmdline/parse_obj_list.h +1 -1
@@ -10,7 +10,7 @@/* This file is an example of extension of libcmdline. It provides an * example of objects stored in a list. */ -#include <sys/queue.h> +#include <rte_queue.h> #include <cmdline_parse.h> #include <cmdline_parse_string.h>
examples/flow_filtering/main.c +1 -1
@@ -8,7 +8,7 @@#include <stdint.h> #include <inttypes.h> #include <sys/types.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <setjmp.h> #include <stdarg.h> #include <ctype.h>
examples/helloworld/main.c +1 -1
@@ -6,7 +6,7 @@#include <string.h> #include <stdint.h> #include <errno.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_memory.h> #include <rte_launch.h>
examples/ip_fragmentation/main.c +1 -1
@@ -9,7 +9,7 @@#include <sys/types.h> #include <sys/param.h> #include <string.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <stdarg.h> #include <errno.h> #include <getopt.h>
examples/ip_pipeline/action.h +1 -1
@@ -5,7 +5,7 @@#ifndef _INCLUDE_ACTION_H_#define _INCLUDE_ACTION_H_ -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_port_in_action.h> #include <rte_table_action.h>
examples/ip_pipeline/cryptodev.h +1 -1
@@ -6,7 +6,7 @@#define _INCLUDE_SYM_C_H_#include <stdint.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_cryptodev.h>
examples/ip_pipeline/link.h +1 -1
@@ -6,7 +6,7 @@#define _INCLUDE_LINK_H_#include <stdint.h> -#include <sys/queue.h> +#include <rte_queue.h> #include "common.h"
examples/ip_pipeline/mempool.h +1 -1
@@ -6,7 +6,7 @@#define _INCLUDE_MEMPOOL_H_#include <stdint.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_mempool.h>
examples/ip_pipeline/pipeline.h +1 -1
@@ -6,7 +6,7 @@#define _INCLUDE_PIPELINE_H_#include <stdint.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_pipeline.h> #include <rte_table_action.h>
examples/ip_pipeline/swq.h +1 -1
@@ -6,7 +6,7 @@#define _INCLUDE_SWQ_H_#include <stdint.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_ring.h>
examples/ip_pipeline/tap.h +1 -1
@@ -5,7 +5,7 @@#ifndef _INCLUDE_TAP_H_#define _INCLUDE_TAP_H_ -#include <sys/queue.h> +#include <rte_queue.h> #include "common.h"
examples/ip_pipeline/tmgr.h +1 -1
@@ -6,7 +6,7 @@#define _INCLUDE_TMGR_H_#include <stdint.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_sched.h> #include <rte_red.h>
examples/ip_reassembly/main.c +1 -1
@@ -8,7 +8,7 @@#include <inttypes.h> #include <sys/types.h> #include <string.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <stdarg.h> #include <errno.h> #include <getopt.h>
examples/ipsec-secgw/ipsec-secgw.c +1 -1
@@ -12,7 +12,7 @@#include <netinet/ip.h> #include <netinet/ip6.h> #include <string.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <stdarg.h> #include <errno.h> #include <signal.h>
examples/ipv4_multicast/main.c +1 -1
@@ -8,7 +8,7 @@#include <inttypes.h> #include <sys/types.h> #include <string.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <stdarg.h> #include <errno.h> #include <getopt.h>
examples/l2fwd-crypto/main.c +1 -1
@@ -9,7 +9,7 @@#include <stdint.h> #include <inttypes.h> #include <sys/types.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <netinet/in.h> #include <setjmp.h> #include <stdarg.h>
examples/l2fwd-event/l2fwd_common.h +1 -1
@@ -11,7 +11,7 @@#include <stdint.h> #include <inttypes.h> #include <sys/types.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <netinet/in.h> #include <setjmp.h> #include <stdarg.h>
examples/l2fwd-keepalive/ka-agent/main.c +1 -1
@@ -9,7 +9,7 @@#include <unistd.h> #include <fcntl.h> #include <sys/wait.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <sys/mman.h> #include <sys/stat.h> #include <time.h>
examples/l2fwd-keepalive/main.c +1 -1
@@ -8,7 +8,7 @@#include <stdint.h> #include <inttypes.h> #include <sys/types.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <netinet/in.h> #include <setjmp.h> #include <stdarg.h>
examples/l2fwd-macsec/main.c +1 -1
@@ -8,7 +8,7 @@#include <stdint.h> #include <inttypes.h> #include <sys/types.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <setjmp.h> #include <stdarg.h> #include <ctype.h>
examples/l2fwd/main.c +1 -1
@@ -8,7 +8,7 @@#include <stdint.h> #include <inttypes.h> #include <sys/types.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <setjmp.h> #include <stdarg.h> #include <ctype.h>
examples/l3fwd-graph/main.c +1 -1
@@ -15,7 +15,7 @@#include <string.h> #include <sys/socket.h> #include <sys/types.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <unistd.h> #include <rte_branch_prediction.h>
examples/l3fwd-power/main.c +1 -1
@@ -8,7 +8,7 @@#include <inttypes.h> #include <sys/types.h> #include <string.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <stdarg.h> #include <errno.h> #include <getopt.h>
examples/l3fwd/l3fwd_em.c +1 -1
@@ -8,7 +8,7 @@#include <inttypes.h> #include <sys/types.h> #include <string.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <stdarg.h> #include <errno.h> #include <getopt.h>
examples/l3fwd/l3fwd_lpm.c +1 -1
@@ -8,7 +8,7 @@#include <inttypes.h> #include <sys/types.h> #include <string.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <stdarg.h> #include <errno.h> #include <getopt.h>
examples/l3fwd/main.c +1 -1
@@ -8,7 +8,7 @@#include <inttypes.h> #include <sys/types.h> #include <string.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <stdarg.h> #include <errno.h> #include <getopt.h>
examples/link_status_interrupt/main.c +1 -1
@@ -8,7 +8,7 @@#include <stdint.h> #include <inttypes.h> #include <sys/types.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <setjmp.h> #include <stdarg.h> #include <ctype.h>
examples/multi_process/client_server_mp/mp_client/client.c +1 -1
@@ -7,7 +7,7 @@#include <inttypes.h> #include <stdarg.h> #include <errno.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <stdlib.h> #include <getopt.h> #include <string.h>
examples/multi_process/client_server_mp/mp_server/init.c +1 -1
@@ -6,7 +6,7 @@#include <stdio.h> #include <stdlib.h> #include <string.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <errno.h> #include <stdarg.h> #include <inttypes.h>
examples/multi_process/client_server_mp/mp_server/main.c +1 -1
@@ -9,7 +9,7 @@#include <stdint.h> #include <stdarg.h> #include <inttypes.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <errno.h> #include <signal.h>
examples/multi_process/hotplug_mp/main.c +1 -1
@@ -7,7 +7,7 @@#include <stdint.h> #include <errno.h> #include <termios.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <cmdline_rdline.h> #include <cmdline_parse.h>
examples/multi_process/simple_mp/main.c +1 -1
@@ -22,7 +22,7 @@#include <errno.h> #include <unistd.h> #include <termios.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_common.h> #include <rte_memory.h>
examples/multi_process/symmetric_mp/main.c +1 -1
@@ -19,7 +19,7 @@#include <stdlib.h> #include <stdarg.h> #include <errno.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <getopt.h> #include <signal.h> #include <inttypes.h>
examples/server_node_efd/efd_node/node.c +1 -1
@@ -7,7 +7,7 @@#include <inttypes.h> #include <stdarg.h> #include <errno.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <stdlib.h> #include <getopt.h> #include <string.h>
examples/server_node_efd/efd_server/init.c +1 -1
@@ -6,7 +6,7 @@#include <stdio.h> #include <stdlib.h> #include <string.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <errno.h> #include <stdarg.h> #include <inttypes.h>
examples/server_node_efd/efd_server/main.c +1 -1
@@ -9,7 +9,7 @@#include <stdint.h> #include <stdarg.h> #include <inttypes.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <errno.h> #include <sys/types.h> #include <netinet/in.h>
examples/service_cores/main.c +1 -1
@@ -7,7 +7,7 @@#include <string.h> #include <stdint.h> #include <errno.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_memory.h> #include <rte_launch.h>
examples/timer/main.c +1 -1
@@ -6,7 +6,7 @@#include <string.h> #include <stdint.h> #include <errno.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_common.h> #include <rte_memory.h>
examples/vhost/main.h +1 -1
@@ -5,7 +5,7 @@#ifndef _MAIN_H_#define _MAIN_H_ -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_ether.h> #include <rte_pci.h>
examples/vm_power_manager/channel_manager.c +1 -1
@@ -10,7 +10,7 @@#include <dirent.h> #include <errno.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <sys/types.h> #include <sys/stat.h> #include <sys/socket.h>
examples/vm_power_manager/channel_monitor.c +1 -1
@@ -13,7 +13,7 @@#include <fcntl.h> #include <sys/types.h> #include <sys/epoll.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <sys/time.h> #include <sys/socket.h> #include <sys/select.h>
examples/vm_power_manager/main.c +1 -1
@@ -12,7 +12,7 @@#include <signal.h> #include <errno.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_common.h> #include <rte_eal.h>
examples/vmdq/main.c +1 -1
@@ -3,7 +3,7 @@*/ #include <stdint.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <stdlib.h> #include <string.h> #include <stdio.h>
examples/vmdq_dcb/main.c +1 -1
@@ -3,7 +3,7 @@*/ #include <stdint.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <stdlib.h> #include <string.h> #include <stdio.h>
lib/acl/rte_acl_osdep.h +1 -1
@@ -21,7 +21,7 @@#include <stdio.h> #include <stdarg.h> #include <stdlib.h> -#include <sys/queue.h> +#include <rte_queue.h> /* * Common defines.
lib/bbdev/rte_bbdev.c +1 -1
@@ -5,7 +5,7 @@#include <stdint.h> #include <string.h> #include <stdbool.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <eal_export.h> #include <rte_common.h>
lib/bpf/bpf_load_elf.c +1 -1
@@ -17,7 +17,7 @@#include <sys/types.h> #include <sys/stat.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <fcntl.h> #include <libelf.h>
lib/bpf/bpf_pkt.c +1 -1
@@ -7,7 +7,7 @@#include <errno.h> #include <stdint.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <eal_export.h> #include <rte_common.h>
lib/cryptodev/cryptodev_pmd.c +1 -1
@@ -3,7 +3,7 @@*/ #include <stdlib.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <dev_driver.h> #include <eal_export.h>
lib/cryptodev/rte_cryptodev.c +1 -1
@@ -2,7 +2,7 @@* Copyright(c) 2015-2020 Intel Corporation */ -#include <sys/queue.h> +#include <rte_queue.h> #include <ctype.h> #include <stdio.h> #include <stdlib.h>
lib/distributor/rte_distributor.c +1 -1
@@ -5,7 +5,7 @@#include <stdalign.h> #include <stdio.h> #include <stdlib.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <string.h> #include <eal_export.h> #include <rte_mbuf.h>
lib/distributor/rte_distributor_single.c +1 -1
@@ -3,7 +3,7 @@*/ #include <stdio.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_mbuf.h> #include <rte_memzone.h> #include <rte_errno.h>
lib/eal/common/eal_common_bus.c +1 -1
@@ -4,7 +4,7 @@#include <stdio.h> #include <string.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <bus_driver.h> #include <rte_debug.h>
lib/eal/common/eal_common_class.c +1 -1
@@ -4,7 +4,7 @@#include <stdio.h> #include <string.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_class.h> #include <rte_debug.h>
lib/eal/common/eal_common_dev.c +1 -1
@@ -6,7 +6,7 @@#include <stdio.h> #include <stdlib.h> #include <string.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <bus_driver.h> #include <rte_class.h>
lib/eal/common/eal_common_options.c +1 -1
@@ -10,7 +10,7 @@#include <limits.h> #include <errno.h> #include <getopt.h> -#include <sys/queue.h> +#include <rte_queue.h> #ifndef RTE_EXEC_ENV_WINDOWS #include <dlfcn.h> #include <libgen.h>
lib/eal/common/eal_common_tailqs.c +1 -1
@@ -2,7 +2,7 @@* Copyright(c) 2010-2014 Intel Corporation */ -#include <sys/queue.h> +#include <rte_queue.h> #include <stdio.h> #include <string.h>
lib/eal/common/eal_common_trace.c +1 -1
@@ -5,7 +5,7 @@#include <stdlib.h> #include <fnmatch.h> #include <pthread.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <regex.h> #include <rte_common.h>
lib/eal/common/eal_private.h +1 -1
@@ -8,7 +8,7 @@#include <stdbool.h> #include <stdint.h> #include <stdio.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <dev_driver.h> #include <rte_bitset.h>
lib/eal/common/malloc_elem.c +1 -1
@@ -6,7 +6,7 @@#include <stddef.h> #include <stdio.h> #include <string.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_memory.h> #include <rte_eal.h>
lib/eal/common/malloc_heap.c +1 -1
@@ -6,7 +6,7 @@#include <stdlib.h> #include <stdio.h> #include <errno.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_memory.h> #include <rte_errno.h>
lib/eal/common/malloc_heap.h +1 -1
@@ -6,7 +6,7 @@#define MALLOC_HEAP_H_ #include <stdbool.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_malloc.h> #include <rte_spinlock.h>
lib/eal/common/rte_malloc.c +1 -1
@@ -6,7 +6,7 @@#include <stddef.h> #include <stdio.h> #include <string.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_errno.h> #include <rte_memcpy.h>
lib/eal/freebsd/eal.c +1 -1
@@ -17,7 +17,7 @@#include <errno.h> #include <limits.h> #include <sys/mman.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <sys/stat.h> #include <rte_common.h>
lib/eal/freebsd/eal_interrupts.c +1 -1
@@ -5,7 +5,7 @@#include <string.h> #include <sys/types.h> #include <sys/event.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <unistd.h> #include <eal_export.h>
lib/eal/freebsd/eal_thread.c +1 -1
@@ -9,7 +9,7 @@#include <unistd.h> #include <sched.h> #include <pthread_np.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <sys/thr.h> #include <rte_debug.h>
lib/eal/freebsd/include/rte_os.h +1 -1
@@ -12,7 +12,7 @@#include <pthread_np.h> #include <stdlib.h> /* Declares alloca() */ -#include <sys/queue.h> +#include <rte_queue.h> /* These macros are compatible with system's sys/queue.h. */ #define RTE_TAILQ_HEAD (name, type) TAILQ_HEAD(name, type)
lib/eal/linux/eal_alarm.c +1 -1
@@ -6,7 +6,7 @@#include <stdlib.h> #include <errno.h> #include <pthread.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <sys/time.h> #include <sys/timerfd.h>
lib/eal/linux/eal_interrupts.c +1 -1
@@ -7,7 +7,7 @@#include <stdio.h> #include <stdint.h> #include <stdlib.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <unistd.h> #include <string.h> #include <errno.h>
lib/eal/linux/include/rte_os.h +1 -1
@@ -12,7 +12,7 @@#include <alloca.h> #include <sched.h> -#include <sys/queue.h> +#include <rte_queue.h> /* These macros are compatible with system's sys/queue.h. */ #define RTE_TAILQ_HEAD (name, type) TAILQ_HEAD(name, type)
lib/eal/windows/eal_alarm.c +1 -1
@@ -4,7 +4,7 @@#include <stdatomic.h> #include <stdbool.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <eal_export.h> #include <rte_alarm.h>
lib/eal/windows/include/sys/queue.h deleted +0 -11
@@ -1,11 +0,0 @@ -/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2026 Stephen Hemminger -*/ - -/* -* Windows has no system <sys/queue.h>. The bundled copy has moved to -* <rte_queue.h>; this stub keeps the existing includes working until they -* are converted, and is removed in the following commit. -*/ - -#include <rte_queue.h>
lib/efd/rte_efd.c +1 -1
@@ -7,7 +7,7 @@#include <stdlib.h> #include <inttypes.h> #include <errno.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <eal_export.h> #include <rte_cpuflags.h>
lib/ethdev/ethdev_private.h +1 -1
@@ -5,7 +5,7 @@#ifndef _ETH_PRIVATE_H_#define _ETH_PRIVATE_H_ -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_eal_memconfig.h> #include <rte_malloc.h>
lib/ethdev/rte_ethdev.c +1 -1
@@ -9,7 +9,7 @@#include <stdio.h> #include <stdlib.h> #include <string.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <bus_driver.h> #include <eal_export.h>
lib/fib/rte_fib.c +1 -1
@@ -5,7 +5,7 @@#include <stdint.h> #include <string.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <eal_export.h> #include <rte_eal_memconfig.h>
lib/fib/rte_fib6.c +1 -1
@@ -5,7 +5,7 @@#include <stdint.h> #include <string.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <eal_export.h> #include <rte_eal_memconfig.h>
lib/gpudev/gpudev.c +1 -1
@@ -3,7 +3,7 @@*/ #include <stdlib.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <eal_export.h> #include <rte_eal.h>
lib/graph/graph_private.h +1 -1
@@ -6,7 +6,7 @@#define _RTE_GRAPH_PRIVATE_H_#include <inttypes.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_common.h> #include <rte_eal.h>
lib/hash/rte_cuckoo_hash.c +1 -1
@@ -7,7 +7,7 @@#include <stdint.h> #include <errno.h> #include <stdio.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <eal_export.h> #include <rte_common.h>
lib/hash/rte_fbk_hash.c +1 -1
@@ -7,7 +7,7 @@#include <string.h> #include <stdlib.h> #include <errno.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <eal_export.h> #include <rte_cpuflags.h>
lib/hash/rte_thash.c +1 -1
@@ -3,7 +3,7 @@*/ #include <stdalign.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <eal_export.h> #include <rte_thash.h>
lib/ip_frag/ip_frag_common.h +1 -1
@@ -5,7 +5,7 @@#ifndef _IP_FRAG_COMMON_H_#define _IP_FRAG_COMMON_H_ -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_common.h> #include <rte_tailq.h>
lib/log/log.c +1 -1
@@ -11,7 +11,7 @@#include <errno.h> #include <regex.h> #include <fnmatch.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <unistd.h> #include <eal_export.h>
lib/lpm/rte_lpm.c +1 -1
@@ -7,7 +7,7 @@#include <stdint.h> #include <errno.h> #include <stdio.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <eal_export.h> #include <rte_log.h>
lib/lpm/rte_lpm6.c +1 -1
@@ -6,7 +6,7 @@#include <stdint.h> #include <errno.h> #include <stdio.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <eal_export.h> #include <rte_log.h>
lib/mbuf/rte_mbuf_dyn.c +1 -1
@@ -3,7 +3,7 @@*/ #include <stdalign.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <stdint.h> #include <limits.h>
lib/mempool/rte_mempool.c +1 -1
@@ -12,7 +12,7 @@#include <unistd.h> #include <inttypes.h> #include <errno.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <eal_export.h> #include <rte_common.h>
lib/pipeline/rte_swx_ctl.c +1 -1
@@ -5,7 +5,7 @@#include <stdlib.h> #include <string.h> #include <stdio.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <unistd.h> #include <eal_export.h>
lib/pipeline/rte_swx_pipeline_internal.h +1 -1
@@ -6,7 +6,7 @@#include <inttypes.h> #include <string.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <rte_bitops.h> #include <rte_byteorder.h>
lib/pmu/pmu.c +1 -1
@@ -8,7 +8,7 @@#include <stdlib.h> #include <unistd.h> #include <sys/mman.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <sys/ioctl.h> #include <sys/syscall.h>
lib/reorder/rte_reorder.c +1 -1
@@ -4,7 +4,7 @@#include <stdalign.h> #include <string.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <eal_export.h> #include <rte_string_fns.h>
lib/rib/rte_rib.c +1 -1
@@ -5,7 +5,7 @@#include <stdbool.h> #include <stdint.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <eal_export.h> #include <rte_eal_memconfig.h>
lib/rib/rte_rib6.c +1 -1
@@ -5,7 +5,7 @@#include <stdbool.h> #include <stdint.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <eal_export.h> #include <rte_eal_memconfig.h>
lib/ring/rte_ring.c +1 -1
@@ -13,7 +13,7 @@#include <stdint.h> #include <inttypes.h> #include <errno.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <eal_export.h> #include <rte_common.h>
lib/stack/rte_stack.c +1 -1
@@ -4,7 +4,7 @@#include <stdalign.h> #include <string.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <eal_export.h> #include <rte_string_fns.h>
lib/vhost/fd_man.h +1 -1
@@ -6,7 +6,7 @@#define _FD_MAN_H_#include <pthread.h> #include <poll.h> -#include <sys/queue.h> +#include <rte_queue.h> struct fdset ;
lib/vhost/socket.c +1 -1
@@ -10,7 +10,7 @@#include <string.h> #include <sys/socket.h> #include <sys/un.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <errno.h> #include <fcntl.h>
lib/vhost/vdpa.c +1 -1
@@ -8,7 +8,7 @@* Device specific vhost lib */ -#include <sys/queue.h> +#include <rte_queue.h> #include <dev_driver.h> #include <eal_export.h>
lib/vhost/vhost.h +1 -1
@@ -8,7 +8,7 @@#include <stdio.h> #include <stdbool.h> #include <stdlib.h> -#include <sys/queue.h> +#include <rte_queue.h> #include <unistd.h> #include <linux/virtio_net.h> #include <sys/socket.h>
Signature · 1 line
2.53.0
PATCH 4/6 build: remove private FOREACH_SAFE definitions
In reply to Stephen HemmingerTen files carried their own copy of LIST_FOREACH_SAFE, SLIST_FOREACH_SAFE, STAILQ_FOREACH_SAFE or TAILQ_FOREACH_SAFE, because glibc does not provide them. They all now get the macros from rte_queue.h, so drop the private copies.
--- drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 7 ------- drivers/common/sxe2/sxe2_osal.h | 8 +------- drivers/net/bnxt/bnxt_filter.c | 7 ------- drivers/net/intel/iavf/iavf_vchnl.c | 8 +------- drivers/net/intel/idpf/base/idpf_osdep.h | 7 ------- drivers/net/netvsc/hn_ethdev.c | 8 +------- drivers/net/nfp/nfp_mtr.c | 8 +------- drivers/net/qede/qede_filter.c | 8 +------- drivers/raw/ifpga/base/opae_intel_max10.c | 8 +------- lib/bpf/bpf_validate_debug.c | 9 +-------- 10 files changed, 7 insertions(+), 71 deletions(-)
drivers/bus/fslmc/portal/dpaa2_hw_dpio.c +0 -7
@@ -41,13 +41,6 @@#include "dpaa2_hw_dpio.h" #include <mc/fsl_dpmng.h> -#ifndef TAILQ_FOREACH_SAFE -#define TAILQ_FOREACH_SAFE (var, head, field, tvar) \ - for ((var) = TAILQ_FIRST((head)); \ - (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \ - (var) = (tvar)) -#endif -#define NUM_HOST_CPUS RTE_MAX_LCORERTE_EXPORT_INTERNAL_SYMBOL (dpaa2_io_portal)
drivers/common/sxe2/sxe2_osal.h +1 -7
@@ -12,6 +12,7 @@#include <stdbool.h> #include <rte_common.h> +#include <rte_queue.h> #include <rte_cycles.h> #include <rte_malloc.h> #include <rte_ether.h>
@@ -24,13 +25,6 @@#define BIT_WORD (nr) ((nr) / __BITS_PER_LONG)#define BIT_MASK (nr) (1UL << ((nr) % __BITS_PER_LONG)) -#ifndef TAILQ_FOREACH_SAFE -#define TAILQ_FOREACH_SAFE (var, head, field, tvar) \ - for ((var) = TAILQ_FIRST((head)); \ - (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \ - (var) = (tvar)) -#endif -#define upper_32_bits (n) ((uint32_t)(((n) >> 16) >> 16))#define lower_32_bits (n) ((uint32_t)((n) & 0xffffffff))
drivers/net/bnxt/bnxt_filter.c +0 -7
@@ -18,13 +18,6 @@#include "bnxt_vnic.h" #include "hsi_struct_def_dpdk.h" -#ifndef STAILQ_FOREACH_SAFE -#define STAILQ_FOREACH_SAFE (var, head, field, tvar) \ - for ((var) = STAILQ_FIRST((head)); \ - (var) && ((tvar) = STAILQ_NEXT((var), field), 1); \ - (var) = (tvar)) -#endif -/* * Filter Functions */
drivers/net/intel/iavf/iavf_vchnl.c +1 -7
@@ -12,6 +12,7 @@#include <inttypes.h> #include <rte_byteorder.h> #include <rte_common.h> +#include <rte_queue.h> #include <rte_os_shim.h> #include <rte_debug.h>
@@ -52,13 +53,6 @@ static struct iavf_event_handler event_handler = { .fd = {-1, -1}, }; -#ifndef TAILQ_FOREACH_SAFE -#define TAILQ_FOREACH_SAFE (var, head, field, tvar) \ - for ((var) = TAILQ_FIRST((head)); \ - (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \ - (var) = (tvar)) -#endif -static uint32_t iavf_dev_event_handle(void *param __rte_unused) {
drivers/net/intel/idpf/base/idpf_osdep.h +0 -7
@@ -342,13 +342,6 @@ idpf_hweight32(u32 num)#define LIST_ENTRY_TYPE (type) LIST_ENTRY(type)#endif -#ifndef LIST_FOREACH_SAFE -#define LIST_FOREACH_SAFE (var, head, field, tvar) \ - for ((var) = LIST_FIRST((head)); \ - (var) && ((tvar) = LIST_NEXT((var), field), 1); \ - (var) = (tvar)) -#endif -#ifndef LIST_FOR_EACH_ENTRY_SAFE #define LIST_FOR_EACH_ENTRY_SAFE (pos, temp, head, entry_type, list) \ LIST_FOREACH_SAFE(pos, head, list, temp)
drivers/net/netvsc/hn_ethdev.c +1 -7
@@ -17,6 +17,7 @@#include <rte_ethdev.h> #include <rte_memcpy.h> +#include <rte_queue.h> #include <rte_string_fns.h> #include <rte_memzone.h> #include <rte_devargs.h>
@@ -41,13 +42,6 @@#include "hn_nvs.h" #include "ndis.h" -#ifndef LIST_FOREACH_SAFE -#define LIST_FOREACH_SAFE (var, head, field, tvar) \ - for ((var) = LIST_FIRST((head)); \ - (var) && ((tvar) = LIST_NEXT((var), field), 1); \ - (var) = (tvar)) -#endif -/* Spinlock for netvsc_shared_data */ static rte_spinlock_t netvsc_shared_data_lock =RTE_SPINLOCK_INITIALIZER ;
drivers/net/nfp/nfp_mtr.c +1 -7
@@ -7,18 +7,12 @@#include <rte_alarm.h> #include <rte_malloc.h> +#include <rte_queue.h> #include <rte_mtr_driver.h> #include "flower/nfp_flower_representor.h" #include "nfp_logs.h" -#ifndef LIST_FOREACH_SAFE -#define LIST_FOREACH_SAFE (var, head, field, tvar) \ - for ((var) = LIST_FIRST((head)); \ - (var) && ((tvar) = LIST_NEXT((var), field), 1); \ - (var) = (tvar)) -#endif -#define NFP_MAX_POLICY_CNT NFP_MAX_MTR_CNT#define NFP_MAX_PROFILE_CNT NFP_MAX_MTR_CNT
drivers/net/qede/qede_filter.c +1 -7
@@ -8,17 +8,11 @@#include <rte_tcp.h> #include <rte_sctp.h> #include <rte_errno.h> +#include <rte_queue.h> #include <rte_flow_driver.h> #include "qede_ethdev.h" -#ifndef SLIST_FOREACH_SAFE -#define SLIST_FOREACH_SAFE (var, head, field, tvar) \ - for ((var) = SLIST_FIRST((head)); \ - (var) && ((tvar) = SLIST_NEXT((var), field), 1); \ - (var) = (tvar)) -#endif -/* VXLAN tunnel classification mapping */ const struct _qede_udp_tunn_types { uint16_t rte_filter_type;
drivers/raw/ifpga/base/opae_intel_max10.c +1 -7
@@ -4,15 +4,9 @@#include "opae_intel_max10.h" #include <libfdt.h> +#include <rte_queue.h> #include "opae_osdep.h" -#ifndef TAILQ_FOREACH_SAFE -#define TAILQ_FOREACH_SAFE (var, head, field, tvar) \ - for ((var) = TAILQ_FIRST((head)); \ - (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \ - (var) = (tvar)) -#endif -int max10_sys_read (struct intel_max10_device *dev,unsigned int offset,unsigned int *val) {
lib/bpf/bpf_validate_debug.c +1 -8
@@ -10,19 +10,12 @@#include <rte_bpf_validate_debug.h> #include <rte_errno.h> #include <rte_per_lcore.h> +#include <rte_queue.h> #include <errno.h> #include <stddef.h> #include <stdlib.h> -#ifndef LIST_FOREACH_SAFE -/* We need this macro which neither Linux nor EAL for Linux include yet. */ -#define LIST_FOREACH_SAFE (var, head, field, tvar) \ - for ((var) = LIST_FIRST((head)); \ - (var) && ((tvar) = LIST_NEXT((var), field), 1); \ - (var) = (tvar)) -#endif -#define EVENT_ARRAY_LENGTH RTE_BPF_VALIDATE_DEBUG_EVENT_ENDstruct rte_bpf_validate_debug_point {
Signature · 1 line
2.53.0
PATCH 5/6 eal: deprecate RTE_TAILQ and RTE_STAILQ macro wrappers
In reply to Stephen HemmingerThe RTE_TAILQ_HEAD, RTE_TAILQ_ENTRY, RTE_TAILQ_FOREACH, RTE_TAILQ_FIRST, RTE_TAILQ_NEXT, RTE_TAILQ_FOREACH_SAFE, RTE_STAILQ_HEAD and RTE_STAILQ_ENTRY were added to help the port to Windows.
Now that rte_queue.h provides the same macros on all platforms, they are no longer necessary. Keep them in rte_tailq.h as deprecated aliases and add a deprecation notice for removal in 27.11.
The wrappers are defined in terms of the plain macros only, never the extended ones, so that they keep working in a translation unit where a system <sys/queue.h> was included first and rte_queue.h was therefore suppressed. That is why RTE_TAILQ_FOREACH_SAFE is open coded rather than mapped to TAILQ_FOREACH_SAFE, which glibc does not have.
Document why rte_queue.h wins the include guard inside DPDK, and note it in rte_os.h.
--- doc/guides/rel_notes/deprecation.rst | 8 +++++ doc/guides/rel_notes/release_26_11.rst | 8 +++++ drivers/bus/vdev/vdev.c | 2 +- drivers/common/cnxk/roc_platform.h | 2 +- drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 4 +-- drivers/net/bonding/rte_eth_bond_flow.c | 2 +- drivers/net/cnxk/cnxk_eswitch_flow.c | 2 +- drivers/net/cnxk/cnxk_ethdev.c | 6 ++-- drivers/net/cnxk/cnxk_ethdev_sec_telemetry.c | 8 ++--- drivers/net/failsafe/failsafe_flow.c | 2 +- drivers/net/intel/cpfl/cpfl_flow.c | 8 ++--- drivers/net/intel/i40e/i40e_ethdev.c | 10 +++--- drivers/net/intel/i40e/i40e_flow.c | 6 ++-- drivers/net/intel/i40e/i40e_hash.c | 2 +- drivers/net/intel/i40e/rte_pmd_i40e.c | 6 ++-- drivers/net/intel/iavf/iavf_generic_flow.c | 16 ++++----- drivers/net/intel/ice/ice_ethdev.c | 4 +-- drivers/net/intel/ice/ice_generic_flow.c | 8 ++--- drivers/net/intel/ipn3ke/ipn3ke_flow.c | 2 +- drivers/net/intel/ixgbe/ixgbe_flow.c | 2 +- drivers/net/mlx5/mlx5_flow_dv.c | 2 +- drivers/net/mlx5/mlx5_flow_meter.c | 2 +- drivers/net/nbl/nbl_common/nbl_userdev.c | 4 +-- drivers/net/nfb/nfb_ethdev.c | 2 +- drivers/net/sfc/sfc_flow.c | 4 +-- drivers/net/softnic/rte_eth_softnic_swq.c | 2 +- drivers/net/sxe2/sxe2_dump.c | 6 ++-- drivers/net/sxe2/sxe2_filter.c | 22 ++++++------ drivers/net/sxe2/sxe2_vsi.c | 2 +- drivers/net/zxdh/zxdh_flow.c | 2 +- drivers/net/zxdh/zxdh_mtr.c | 6 ++-- examples/vm_power_manager/channel_manager.c | 8 ++--- lib/bbdev/rte_bbdev.h | 2 +- lib/cryptodev/cryptodev_pmd.h | 2 +- lib/cryptodev/rte_cryptodev.h | 2 +- lib/eal/common/eal_common_devargs.c | 4 +-- lib/eal/common/eal_common_options.c | 2 +- lib/eal/common/eal_common_proc.c | 2 +- lib/eal/freebsd/include/rte_os.h | 12 ++----- lib/eal/include/bus_driver.h | 8 ++--- lib/eal/include/dev_driver.h | 4 +-- lib/eal/include/rte_class.h | 4 +-- lib/eal/include/rte_devargs.h | 2 +- lib/eal/include/rte_queue.h | 5 +++ lib/eal/include/rte_tailq.h | 35 ++++++++++++++++---- lib/eal/linux/include/rte_os.h | 12 ++----- lib/eal/windows/include/rte_os.h | 31 +++-------------- lib/efd/rte_efd.c | 2 +- lib/ethdev/rte_ethdev_core.h | 2 +- lib/eventdev/rte_event_vector_adapter.c | 2 +- lib/gpudev/gpudev.c | 4 +-- lib/gpudev/gpudev_driver.h | 2 +- lib/ip_frag/ip_reassembly.h | 4 +-- lib/ip_frag/rte_ip_frag_common.c | 2 +- lib/mempool/rte_mempool.c | 4 +-- lib/mempool/rte_mempool.h | 8 ++--- lib/pmu/pmu.c | 2 +- lib/power/power_cpufreq.h | 2 +- lib/power/power_uncore_ops.h | 2 +- lib/power/rte_power_cpufreq.c | 8 ++--- lib/power/rte_power_uncore.c | 6 ++-- lib/table/rte_swx_table.h | 4 +-- lib/table/rte_swx_table_selector.h | 4 +-- lib/vhost/iotlb.c | 14 ++++---- lib/vhost/vdpa.c | 2 +- lib/vhost/vdpa_driver.h | 2 +- 66 files changed, 191 insertions(+), 182 deletions(-)
doc/guides/rel_notes/deprecation.rst +8 -0
@@ -177,3 +177,11 @@ Deprecation Notices after a VF reset, but this is of questionable value since most applications expect their settings to be preserved transparently across a reset. + +* eal: The ``RTE_TAILQ_HEAD``, ``RTE_TAILQ_ENTRY``, ``RTE_TAILQ_FOREACH``, + ``RTE_TAILQ_FIRST``, ``RTE_TAILQ_NEXT``, ``RTE_TAILQ_FOREACH_SAFE``, + ``RTE_STAILQ_HEAD`` and ``RTE_STAILQ_ENTRY`` macros in ``rte_tailq.h`` + are deprecated and will be removed in DPDK 27.11. + They existed only because Windows had no ``<sys/queue.h>``. + Use the equivalent ``TAILQ_`` and ``STAILQ_`` macros from + ``<rte_queue.h>``, which are now available on all platforms.
doc/guides/rel_notes/release_26_11.rst +8 -0
@@ -130,6 +130,14 @@ API Changes * ``rte_tel_data_add_dict_uint_hex`` * ``rte_telemetry_register_cmd_arg`` +* eal: Deprecated the ``RTE_TAILQ_HEAD``, ``RTE_TAILQ_ENTRY``, + ``RTE_TAILQ_FOREACH``, ``RTE_TAILQ_FIRST``, ``RTE_TAILQ_NEXT``, + ``RTE_TAILQ_FOREACH_SAFE``, ``RTE_STAILQ_HEAD`` and ``RTE_STAILQ_ENTRY`` + macros. + They existed only because Windows had no ``<sys/queue.h>``. + Use the standard ``TAILQ_`` and ``STAILQ_`` macros from ``rte_queue.h``. + The macros are kept as aliases and will be removed in DPDK 27.11. + ABI Changes -----------
drivers/bus/vdev/vdev.c +1 -1
@@ -103,7 +103,7 @@ rte_vdev_remove_custom_scan(rte_vdev_scan_callback callback, void *user_arg)struct vdev_custom_scan *custom_scan, *tmp_scan;rte_spinlock_lock (&vdev_custom_scan_lock); -RTE_TAILQ_FOREACH_SAFE (custom_scan, &vdev_custom_scans, next, +TAILQ_FOREACH_SAFE (custom_scan, &vdev_custom_scans, next, tmp_scan) { if (custom_scan->callback != callback || (custom_scan->user_arg != (void *)-1 &&
drivers/common/cnxk/roc_platform.h +1 -1
@@ -66,7 +66,7 @@#define PLT_ALIGN_FLOOR RTE_ALIGN_FLOOR#define PLT_INIT RTE_INIT#define PLT_MAX_ETHPORTS RTE_MAX_ETHPORTS -#define PLT_TAILQ_FOREACH_SAFE RTE_TAILQ_FOREACH_SAFE +#define PLT_TAILQ_FOREACH_SAFE TAILQ_FOREACH_SAFE#ifndef PLT_ETHER_ADDR_LEN #define PLT_ETHER_ADDR_LEN RTE_ETHER_ADDR_LEN
drivers/net/bnxt/tf_ulp/bnxt_ulp.c +2 -2
@@ -649,7 +649,7 @@ bnxt_ulp_cntxt_list_del(struct bnxt_ulp_context *ulp_ctx)struct ulp_context_list_entry *entry, *temp;rte_spinlock_lock (&bnxt_ulp_ctxt_lock); - RTE_TAILQ_FOREACH_SAFE(entry, &ulp_cntx_list, next, temp) { + TAILQ_FOREACH_SAFE(entry, &ulp_cntx_list, next, temp) {if (entry->ulp_ctx == ulp_ctx) {TAILQ_REMOVE (&ulp_cntx_list, entry, next);rte_free (entry);
@@ -666,7 +666,7 @@ bnxt_ulp_cntxt_list_count(void)int count_1 =0 ;rte_spinlock_lock (&bnxt_ulp_ctxt_lock); - RTE_TAILQ_FOREACH_SAFE(entry, &ulp_cntx_list, next, temp) { + TAILQ_FOREACH_SAFE(entry, &ulp_cntx_list, next, temp) { count_1++; }rte_spinlock_unlock (&bnxt_ulp_ctxt_lock);
drivers/net/bonding/rte_eth_bond_flow.c +1 -1
@@ -157,7 +157,7 @@ bond_flow_flush(struct rte_eth_dev *dev, struct rte_flow_error *err)/* Destroy all bond flows from its members instead of flushing them to * keep the LACP flow or any other external flows. */ - RTE_TAILQ_FOREACH_SAFE(flow, &internals->flow_list, next, tmp) { + TAILQ_FOREACH_SAFE(flow, &internals->flow_list, next, tmp) { lret =bond_flow_destroy (dev, flow, err);if (unlikely (lret !=0 )) ret = lret;
drivers/net/cnxk/cnxk_eswitch_flow.c +1 -1
@@ -21,7 +21,7 @@ cnxk_eswitch_flow_rules_remove_list(struct cnxk_eswitch_dev *eswitch_dev, structstruct roc_npc_flow *flow, *tvar;int rc =0 ; - RTE_TAILQ_FOREACH_SAFE(flow, list, next, tvar) { + TAILQ_FOREACH_SAFE(flow, list, next, tvar) {plt_esw_dbg ("Removing flow %d" , flow->mcam_id); rc =roc_eswitch_npc_mcam_delete_rule (&eswitch_dev->npc, flow, hw_func);
drivers/net/cnxk/cnxk_ethdev.c +3 -3
@@ -464,7 +464,7 @@ nix_meter_fini(struct cnxk_eth_dev *dev)uint32_t i;int rc =0 ; - RTE_TAILQ_FOREACH_SAFE(mtr, fms, next, next_mtr) { + TAILQ_FOREACH_SAFE(mtr, fms, next, next_mtr) {for (i =0 ; i < mtr->rq_num; i++) { rq = &dev->rqs[mtr->rq_id[i]]; rc |=roc_nix_bpf_ena_dis (nix, mtr->bpf_id, rq, false);
@@ -512,7 +512,7 @@ nix_security_release(struct cnxk_eth_dev *dev)if (dev->rx_offloads &RTE_ETH_RX_OFFLOAD_SECURITY || dev->ip_reass_en) {/* Destroy inbound sessions */ tvar =NULL ; - RTE_TAILQ_FOREACH_SAFE(eth_sec, &dev->inb.list, entry, tvar) + TAILQ_FOREACH_SAFE(eth_sec, &dev->inb.list, entry, tvar) cnxk_eth_sec_ops.session_destroy (eth_dev, eth_sec->sess);
@@ -534,7 +534,7 @@ nix_security_release(struct cnxk_eth_dev *dev) dev->rx_offloads & RTE_ETH_RX_OFFLOAD_SECURITY) {/* Destroy outbound sessions */ tvar =NULL ; - RTE_TAILQ_FOREACH_SAFE(eth_sec, &dev->outb.list, entry, tvar) + TAILQ_FOREACH_SAFE(eth_sec, &dev->outb.list, entry, tvar) cnxk_eth_sec_ops.session_destroy (eth_dev, eth_sec->sess);
drivers/net/cnxk/cnxk_ethdev_sec_telemetry.c +4 -4
@@ -275,7 +275,7 @@ ethdev_sec_tel_handle_sa_info(const char *cmd __rte_unused, const char *params, i =0 ;if (dev->tx_offloads &RTE_ETH_TX_OFFLOAD_SECURITY ) { tvar =NULL ; - RTE_TAILQ_FOREACH_SAFE(eth_sec, &dev->outb.list, entry, tvar) { + TAILQ_FOREACH_SAFE(eth_sec, &dev->outb.list, entry, tvar) {if (eth_sec->sa_idx == sa_idx) {rte_tel_data_add_dict_int (d,"outb_sa" ,1 );if (roc_model_is_cn10k ())
@@ -292,7 +292,7 @@ ethdev_sec_tel_handle_sa_info(const char *cmd __rte_unused, const char *params, i =0 ;if (dev->rx_offloads &RTE_ETH_RX_OFFLOAD_SECURITY ) { tvar =NULL ; - RTE_TAILQ_FOREACH_SAFE(eth_sec, &dev->inb.list, entry, tvar) { + TAILQ_FOREACH_SAFE(eth_sec, &dev->inb.list, entry, tvar) {if (eth_sec->sa_idx == sa_idx) {rte_tel_data_add_dict_int (d,"inb_sa" ,1 );if (roc_model_is_cn10k ())
@@ -353,7 +353,7 @@ ethdev_sec_tel_handle_info(const char *cmd __rte_unused, const char *params,if (dev->tx_offloads &RTE_ETH_TX_OFFLOAD_SECURITY ) { tvar =NULL ; - RTE_TAILQ_FOREACH_SAFE(eth_sec, &dev->outb.list, entry, tvar) { + TAILQ_FOREACH_SAFE(eth_sec, &dev->outb.list, entry, tvar) {if (eth_sec->sa_idx < min_outb_sa) min_outb_sa = eth_sec->sa_idx;if (eth_sec->sa_idx > max_outb_sa)
@@ -370,7 +370,7 @@ ethdev_sec_tel_handle_info(const char *cmd __rte_unused, const char *params,if (dev->rx_offloads &RTE_ETH_RX_OFFLOAD_SECURITY ) { tvar =NULL ; - RTE_TAILQ_FOREACH_SAFE(eth_sec, &dev->inb.list, entry, tvar) { + TAILQ_FOREACH_SAFE(eth_sec, &dev->inb.list, entry, tvar) {if (eth_sec->sa_idx < min_inb_sa) min_inb_sa = eth_sec->sa_idx;if (eth_sec->sa_idx > max_inb_sa)
drivers/net/failsafe/failsafe_flow.c +1 -1
@@ -186,7 +186,7 @@ fs_flow_flush(struct rte_eth_dev *dev,return ret; } } - RTE_TAILQ_FOREACH_SAFE(flow, &PRIV(dev)->flow_list, next, tmp) { + TAILQ_FOREACH_SAFE(flow, &PRIV(dev)->flow_list, next, tmp) {TAILQ_REMOVE (&PRIV (dev)->flow_list, flow, next);fs_flow_release (&flow); }
drivers/net/intel/cpfl/cpfl_flow.c +4 -4
@@ -27,7 +27,7 @@ cpfl_flow_engine_match(struct rte_eth_dev *dev,struct cpfl_flow_engine *engine =NULL ;void *temp; - RTE_TAILQ_FOREACH_SAFE(engine, &engine_list, node, temp) { + TAILQ_FOREACH_SAFE(engine, &engine_list, node, temp) {if (!engine->parse_pattern_action)continue ;
@@ -46,7 +46,7 @@ cpfl_flow_engine_init(struct cpfl_adapter_ext *adapter)void *temp;int ret; - RTE_TAILQ_FOREACH_SAFE(engine, &engine_list, node, temp) { + TAILQ_FOREACH_SAFE(engine, &engine_list, node, temp) {if (!engine->init) {PMD_INIT_LOG (ERR ,"Invalid engine type (%d)" , engine->type);
@@ -70,7 +70,7 @@ cpfl_flow_engine_uninit(struct cpfl_adapter_ext *adapter)struct cpfl_flow_engine *engine =NULL ;void *temp; - RTE_TAILQ_FOREACH_SAFE(engine, &engine_list, node, temp) { + TAILQ_FOREACH_SAFE(engine, &engine_list, node, temp) {if (engine->uninit) engine->uninit (adapter); }
@@ -244,7 +244,7 @@ cpfl_flow_flush(struct rte_eth_dev *dev,void *temp;int ret =0 ; - RTE_TAILQ_FOREACH_SAFE(p_flow, &itf->flow_list, next, temp) { + TAILQ_FOREACH_SAFE(p_flow, &itf->flow_list, next, temp) { ret =cpfl_flow_destroy (dev, p_flow, error);if (ret) {PMD_DRV_LOG (ERR ,"Failed to flush flows" );
drivers/net/intel/i40e/i40e_ethdev.c +5 -5
@@ -4195,7 +4195,7 @@ i40e_vlan_offload_set(struct rte_eth_dev *dev, int mask)* recommended to be used in firmware v8.6. */ /* Remove all existing mac */ - RTE_TAILQ_FOREACH_SAFE(f, &vsi->mac_list, next, temp) { + TAILQ_FOREACH_SAFE(f, &vsi->mac_list, next, temp) { mac_filter[i] = f->mac_info; ret =i40e_vsi_delete_mac (vsi, &f->mac_info.mac_addr);if (ret)
@@ -5570,7 +5570,7 @@ i40e_vsi_release(struct i40e_vsi *vsi)/* VSI has child to attach, release child first */ if (vsi->veb) { - RTE_TAILQ_FOREACH_SAFE(vsi_list, &vsi->veb->head, list, temp) { + TAILQ_FOREACH_SAFE(vsi_list, &vsi->veb->head, list, temp) {if (i40e_vsi_release (vsi_list->vsi) !=I40E_SUCCESS )return -1 ; }
@@ -5578,7 +5578,7 @@ i40e_vsi_release(struct i40e_vsi *vsi) }if (vsi->floating_veb) { -RTE_TAILQ_FOREACH_SAFE (vsi_list, &vsi->floating_veb->head, +TAILQ_FOREACH_SAFE (vsi_list, &vsi->floating_veb->head, list, temp) {if (i40e_vsi_release (vsi_list->vsi) !=I40E_SUCCESS )return -1 ;
@@ -5587,7 +5587,7 @@ i40e_vsi_release(struct i40e_vsi *vsi)/* Remove all macvlan filters of the VSI */ i40e_vsi_remove_all_macvlan_filter (vsi); - RTE_TAILQ_FOREACH_SAFE(f, &vsi->mac_list, next, temp) + TAILQ_FOREACH_SAFE(f, &vsi->mac_list, next, temp)rte_free (f); if (vsi->type != I40E_VSI_MAIN &&
@@ -6230,7 +6230,7 @@ i40e_vsi_config_vlan_filter(struct i40e_vsi *vsi, bool on) i =0 ;/* Remove all existing mac */ - RTE_TAILQ_FOREACH_SAFE(f, &vsi->mac_list, next, temp) { + TAILQ_FOREACH_SAFE(f, &vsi->mac_list, next, temp) { mac_filter[i] = f->mac_info; ret =i40e_vsi_delete_mac (vsi, &f->mac_info.mac_addr);if (ret) {
drivers/net/intel/i40e/i40e_flow.c +3 -3
@@ -4216,7 +4216,7 @@ i40e_flow_flush_fdir_filter(struct i40e_pf *pf) }/* Delete FDIR flows in flow list. */ - RTE_TAILQ_FOREACH_SAFE(flow, &pf->flow_list, node, temp) { + TAILQ_FOREACH_SAFE(flow, &pf->flow_list, node, temp) {if (flow->filter_type ==RTE_ETH_FILTER_FDIR ) {TAILQ_REMOVE (&pf->flow_list, flow, node); }
@@ -4271,7 +4271,7 @@ i40e_flow_flush_ethertype_filter(struct i40e_pf *pf) }/* Delete ethertype flows in flow list. */ - RTE_TAILQ_FOREACH_SAFE(flow, &pf->flow_list, node, temp) { + TAILQ_FOREACH_SAFE(flow, &pf->flow_list, node, temp) {if (flow->filter_type ==RTE_ETH_FILTER_ETHERTYPE ) {TAILQ_REMOVE (&pf->flow_list, flow, node);rte_free (flow);
@@ -4299,7 +4299,7 @@ i40e_flow_flush_tunnel_filter(struct i40e_pf *pf) }/* Delete tunnel flows in flow list. */ - RTE_TAILQ_FOREACH_SAFE(flow, &pf->flow_list, node, temp) { + TAILQ_FOREACH_SAFE(flow, &pf->flow_list, node, temp) {if (flow->filter_type ==RTE_ETH_FILTER_TUNNEL ) {TAILQ_REMOVE (&pf->flow_list, flow, node);rte_free (flow);
drivers/net/intel/i40e/i40e_hash.c +1 -1
@@ -1503,7 +1503,7 @@ i40e_hash_filter_flush(struct i40e_pf *pf) {struct rte_flow *flow, *next; - RTE_TAILQ_FOREACH_SAFE(flow, &pf->flow_list, node, next) { + TAILQ_FOREACH_SAFE(flow, &pf->flow_list, node, next) {if (flow->filter_type !=RTE_ETH_FILTER_HASH )continue ;
drivers/net/intel/i40e/rte_pmd_i40e.c +3 -3
@@ -221,7 +221,7 @@ i40e_vsi_rm_mac_filter(struct i40e_vsi *vsi)void *temp;/* remove all the MACs */ - RTE_TAILQ_FOREACH_SAFE(f, &vsi->mac_list, next, temp) { + TAILQ_FOREACH_SAFE(f, &vsi->mac_list, next, temp) { vlan_num = vsi->vlan_num; filter_type = f->mac_info.filter_type; if (filter_type == I40E_MACVLAN_PERFECT_MATCH ||
@@ -279,7 +279,7 @@ i40e_vsi_restore_mac_filter(struct i40e_vsi *vsi)void *temp;/* restore all the MACs */ - RTE_TAILQ_FOREACH_SAFE(f, &vsi->mac_list, next, temp) { + TAILQ_FOREACH_SAFE(f, &vsi->mac_list, next, temp) {if (f->mac_info.filter_type ==I40E_MACVLAN_PERFECT_MATCH || f->mac_info.filter_type ==I40E_MACVLAN_HASH_MATCH ) {/**
@@ -572,7 +572,7 @@ rte_pmd_i40e_set_vf_mac_addr(uint16_t port, uint16_t vf_id,rte_ether_addr_copy (mac_addr, &vf->mac_addr);/* Remove all existing mac */ - RTE_TAILQ_FOREACH_SAFE(f, &vsi->mac_list, next, temp) + TAILQ_FOREACH_SAFE(f, &vsi->mac_list, next, temp)if (i40e_vsi_delete_mac (vsi, &f->mac_info.mac_addr) !=I40E_SUCCESS )PMD_DRV_LOG (WARNING ,"Delete MAC failed" );
drivers/net/intel/iavf/iavf_generic_flow.c +8 -8
@@ -1817,7 +1817,7 @@ iavf_flow_init(struct iavf_adapter *ad)TAILQ_INIT (&vf->ipsec_crypto_parser_list);rte_spinlock_init (&vf->flow_ops_lock); - RTE_TAILQ_FOREACH_SAFE(engine, &engine_list, node, temp) { + TAILQ_FOREACH_SAFE(engine, &engine_list, node, temp) {if (engine->init ==NULL ) {PMD_INIT_LOG (ERR ,"Invalid engine type (%d)" , engine->type);
@@ -1843,7 +1843,7 @@ iavf_flow_uninit(struct iavf_adapter *ad)struct iavf_flow_parser_node *p_parser;void *temp; - RTE_TAILQ_FOREACH_SAFE(engine, &engine_list, node, temp) { + TAILQ_FOREACH_SAFE(engine, &engine_list, node, temp) {if (engine->uninit) engine->uninit (ad); }
@@ -1895,7 +1895,7 @@ iavf_register_parser(struct iavf_flow_parser *parser,TAILQ_INSERT_TAIL (list, parser_node, node); }else if (parser->engine->type ==IAVF_FLOW_ENGINE_FDIR ) { list = &vf->dist_parser_list; - RTE_TAILQ_FOREACH_SAFE(existing_node, list, node, temp) { + TAILQ_FOREACH_SAFE(existing_node, list, node, temp) {if (existing_node->parser->engine->type ==IAVF_FLOW_ENGINE_FSUB ) { TAILQ_INSERT_AFTER(list, existing_node,
@@ -1939,7 +1939,7 @@ iavf_unregister_parser(struct iavf_flow_parser *parser,if (list ==NULL )return ; - RTE_TAILQ_FOREACH_SAFE(p_parser, list, node, temp) { + TAILQ_FOREACH_SAFE(p_parser, list, node, temp) {if (p_parser->parser->engine->type == parser->engine->type) {TAILQ_REMOVE (list, p_parser, node);rte_free (p_parser);
@@ -2085,7 +2085,7 @@ iavf_parse_engine_create(struct iavf_adapter *ad,void *temp;void *meta =NULL ; - RTE_TAILQ_FOREACH_SAFE(parser_node, parser_list, node, temp) { + TAILQ_FOREACH_SAFE(parser_node, parser_list, node, temp) { if (parser_node->parser->parse_pattern_action(ad, parser_node->parser->array, parser_node->parser->array_len,
@@ -2115,7 +2115,7 @@ iavf_parse_engine_validate(struct iavf_adapter *ad,void *temp;void *meta =NULL ; - RTE_TAILQ_FOREACH_SAFE(parser_node, parser_list, node, temp) { + TAILQ_FOREACH_SAFE(parser_node, parser_list, node, temp) { if (parser_node->parser->parse_pattern_action(ad, parser_node->parser->array, parser_node->parser->array_len,
@@ -2261,7 +2261,7 @@ iavf_flow_is_valid(struct rte_flow *flow)return true;if (flow->engine) { - RTE_TAILQ_FOREACH_SAFE(engine, &engine_list, node, temp) { + TAILQ_FOREACH_SAFE(engine, &engine_list, node, temp) {if (engine == flow->engine)return true; }
@@ -2322,7 +2322,7 @@ iavf_flow_flush(struct rte_eth_dev *dev,void *temp;int ret =0 ; - RTE_TAILQ_FOREACH_SAFE(p_flow, &vf->flow_list, node, temp) { + TAILQ_FOREACH_SAFE(p_flow, &vf->flow_list, node, temp) { ret =iavf_flow_destroy (dev, p_flow, error);if (ret) {PMD_DRV_LOG (ERR ,"Failed to flush flows" );
drivers/net/intel/ice/ice_ethdev.c +2 -2
@@ -1373,7 +1373,7 @@ ice_remove_all_mac_vlan_filters(struct ice_vsi *vsi)if (!vsi || !vsi->mac_num)return -EINVAL ; - RTE_TAILQ_FOREACH_SAFE(m_f, &vsi->mac_list, next, temp) { + TAILQ_FOREACH_SAFE(m_f, &vsi->mac_list, next, temp) { ret =ice_remove_mac_filter (vsi, &m_f->mac_info.mac_addr);if (ret !=ICE_SUCCESS ) { ret = -EINVAL ;
@@ -1384,7 +1384,7 @@ ice_remove_all_mac_vlan_filters(struct ice_vsi *vsi)if (vsi->vlan_num ==0 )return 0 ; - RTE_TAILQ_FOREACH_SAFE(v_f, &vsi->vlan_list, next, temp) { + TAILQ_FOREACH_SAFE(v_f, &vsi->vlan_list, next, temp) { ret =ice_remove_vlan_filter (vsi, &v_f->vlan_info.vlan);if (ret !=ICE_SUCCESS ) { ret = -EINVAL ;
drivers/net/intel/ice/ice_generic_flow.c +4 -4
@@ -1998,7 +1998,7 @@ ice_flow_init(struct ice_adapter *ad)ice_parser_dvm_set (ad->psr, false); } - RTE_TAILQ_FOREACH_SAFE(engine, &engine_list, node, temp) { + TAILQ_FOREACH_SAFE(engine, &engine_list, node, temp) {if (engine->init ==NULL ) {PMD_INIT_LOG (ERR ,"Invalid engine type (%d)" , engine->type);
@@ -2028,7 +2028,7 @@ ice_flow_uninit(struct ice_adapter *ad)struct rte_flow *p_flow;void *temp; - RTE_TAILQ_FOREACH_SAFE(engine, &engine_list, node, temp) { + TAILQ_FOREACH_SAFE(engine, &engine_list, node, temp) {if (ICE_FLOW_ENGINE_DISABLED (ad->disabled_engine_mask, engine->type)) {PMD_DRV_LOG (DEBUG ,"Engine %d disabled skip it" , engine->type);continue ;
@@ -2556,7 +2556,7 @@ ice_flow_flush(struct rte_eth_dev *dev,void *temp;int ret =0 ; - RTE_TAILQ_FOREACH_SAFE(p_flow, &pf->flow_list, node, temp) { + TAILQ_FOREACH_SAFE(p_flow, &pf->flow_list, node, temp) { ret =ice_flow_destroy (dev, p_flow, error);if (ret) {PMD_DRV_LOG (ERR ,"Failed to flush flows" );
@@ -2697,7 +2697,7 @@ ice_flow_redirect(struct ice_adapter *ad,rte_spinlock_lock (&pf->flow_ops_lock); - RTE_TAILQ_FOREACH_SAFE(p_flow, &pf->flow_list, node, temp) { + TAILQ_FOREACH_SAFE(p_flow, &pf->flow_list, node, temp) {if (!p_flow->engine->redirect)continue ; ret = p_flow->engine->redirect (ad, p_flow, rd);
drivers/net/intel/ipn3ke/ipn3ke_flow.c +1 -1
@@ -1230,7 +1230,7 @@ ipn3ke_flow_flush(struct rte_eth_dev *dev,struct ipn3ke_hw *hw =IPN3KE_DEV_PRIVATE_TO_HW (dev);struct rte_flow *flow, *temp; - RTE_TAILQ_FOREACH_SAFE(flow, &hw->flow_list, next, temp) { + TAILQ_FOREACH_SAFE(flow, &hw->flow_list, next, temp) {TAILQ_REMOVE (&hw->flow_list, flow, next);rte_free (flow); }
drivers/net/intel/ixgbe/ixgbe_flow.c +1 -1
@@ -2783,7 +2783,7 @@ ixgbe_filterlist_flush(struct rte_eth_dev *dev)struct ixgbe_adapter *adapter =IXGBE_DEV_PRIVATE_TO_ADAPTER (dev->data->dev_private);struct ixgbe_filter_ele_base *ele, *tmp; - RTE_TAILQ_FOREACH_SAFE(ele, &adapter->flow_list, entries, tmp) { + TAILQ_FOREACH_SAFE(ele, &adapter->flow_list, entries, tmp) {struct ixgbe_flow_mem *ixgbe_flow_mem_ptr = (struct ixgbe_flow_mem *)ele;struct rte_flow *flow = ixgbe_flow_mem_ptr->flow;
drivers/net/mlx5/mlx5_flow_dv.c +1 -1
@@ -17516,7 +17516,7 @@ __flow_dv_destroy_sub_policy_rules(struct rte_eth_dev *dev, policy->act_cnt[i].fate_action == MLX5_FLOW_FATE_MTR) next_fm =mlx5_flow_meter_find (priv, policy->act_cnt[i].next_mtr_id,NULL ); -RTE_TAILQ_FOREACH_SAFE (color_rule, &sub_policy->color_rules[i], +TAILQ_FOREACH_SAFE (color_rule, &sub_policy->color_rules[i], next_port, tmp) {claim_zero (mlx5_flow_os_destroy_flow (color_rule->rule)); tbl = container_of(color_rule->matcher->tbl,
drivers/net/mlx5/mlx5_flow_meter.c +1 -1
@@ -2747,7 +2747,7 @@ mlx5_flow_meter_flush(struct rte_eth_dev *dev, struct rte_mtr_error *error) priv->mtr_idx_tbl =NULL ; } }else { - RTE_TAILQ_FOREACH_SAFE(legacy_fm, fms, next, tmp) { + TAILQ_FOREACH_SAFE(legacy_fm, fms, next, tmp) { fm = &legacy_fm->fm;if (mlx5_flow_meter_params_flush (dev, fm,0 )) return -rte_mtr_error_set(error, EINVAL,
drivers/net/nbl/nbl_common/nbl_userdev.c +2 -2
@@ -281,7 +281,7 @@ static int nbl_userdev_free_record(u64 vaddr, u64 iova __rte_unused, u64 len __r {struct nbl_userdev_map_record *record, *tmp_record; - RTE_TAILQ_FOREACH_SAFE(record, &nbl_map_list, next, tmp_record) { + TAILQ_FOREACH_SAFE(record, &nbl_map_list, next, tmp_record) {if (record->vaddr != vaddr)continue ;nbl_vfio_dma_mem_map (nbl_default_container, vaddr, record->len,0 );
@@ -296,7 +296,7 @@ static void nbl_userdev_dma_free(void) {struct nbl_userdev_map_record *record, *tmp_record; - RTE_TAILQ_FOREACH_SAFE(record, &nbl_map_list, next, tmp_record) { + TAILQ_FOREACH_SAFE(record, &nbl_map_list, next, tmp_record) {TAILQ_REMOVE (&nbl_map_list, record, next);free (record); }
drivers/net/nfb/nfb_ethdev.c +1 -1
@@ -1127,7 +1127,7 @@ nfb_eth_common_remove(struct rte_device *dev) {struct pmd_internals *entry, *temp; - RTE_TAILQ_FOREACH_SAFE(entry, &nfb_eth_dev_list, eth_dev_list, temp) { + TAILQ_FOREACH_SAFE(entry, &nfb_eth_dev_list, eth_dev_list, temp) {if (dev == entry->eth_dev->device)rte_eth_dev_destroy (entry->eth_dev, nfb_eth_dev_uninit); }
drivers/net/sfc/sfc_flow.c +2 -2
@@ -2666,7 +2666,7 @@ sfc_flow_flush(struct rte_eth_dev *dev,sfc_adapter_lock (sa); - RTE_TAILQ_FOREACH_SAFE(flow, &sa->flow_list, entries, tmp) { + TAILQ_FOREACH_SAFE(flow, &sa->flow_list, entries, tmp) {if (flow->internal)continue ;
@@ -2962,7 +2962,7 @@ sfc_flow_fini(struct sfc_adapter *sa)SFC_ASSERT (sfc_adapter_is_locked (sa)); - RTE_TAILQ_FOREACH_SAFE(flow, &sa->flow_list, entries, tmp) { + TAILQ_FOREACH_SAFE(flow, &sa->flow_list, entries, tmp) {if (flow->internal)continue ;
drivers/net/softnic/rte_eth_softnic_swq.c +1 -1
@@ -39,7 +39,7 @@ softnic_softnic_swq_free_keep_rxq_txq(struct pmd_internals *p) {struct softnic_swq *swq, *tswq; - RTE_TAILQ_FOREACH_SAFE(swq, &p->swq_list, node, tswq) { + TAILQ_FOREACH_SAFE(swq, &p->swq_list, node, tswq) {if ((strncmp (swq->name,"RXQ" ,strlen ("RXQ" )) ==0 ) || (strncmp (swq->name,"TXQ" ,strlen ("TXQ" )) ==0 ))continue ;
drivers/net/sxe2/sxe2_dump.c +3 -3
@@ -132,7 +132,7 @@ static void sxe2_dump_filter_info(FILE *file, struct rte_eth_dev *dev)if (adapter->filter_ctxt.uc_num >0 ) {fprintf (file,"\t -- Unicast entry:\n" ); -RTE_TAILQ_FOREACH_SAFE (mac_entry, &adapter->filter_ctxt.uc_list, next, +TAILQ_FOREACH_SAFE (mac_entry, &adapter->filter_ctxt.uc_list, next, next_mac_entry) {fprintf (file, "\t -- addr: %02x:%02x:%02x:%02x:%02x:%02x hw status:%u "
@@ -151,7 +151,7 @@ static void sxe2_dump_filter_info(FILE *file, struct rte_eth_dev *dev)if (adapter->filter_ctxt.mc_num >0 ) {fprintf (file,"\t -- Multicast entry:\n" ); -RTE_TAILQ_FOREACH_SAFE (mac_entry, &adapter->filter_ctxt.mc_list, +TAILQ_FOREACH_SAFE (mac_entry, &adapter->filter_ctxt.mc_list, next, next_mac_entry) {fprintf (file, "\t -- addr: %02x:%02x:%02x:%02x:%02x:%02x "
@@ -170,7 +170,7 @@ static void sxe2_dump_filter_info(FILE *file, struct rte_eth_dev *dev)if (adapter->filter_ctxt.vlan_num >0 ) {fprintf (file,"\t -- Vlan entry:\n" ); -RTE_TAILQ_FOREACH_SAFE (vlan_entry, &adapter->filter_ctxt.vlan_list, +TAILQ_FOREACH_SAFE (vlan_entry, &adapter->filter_ctxt.vlan_list, next, next_vlan_entry) {fprintf (file, "\t -- vlan tpid:0x%04x vid:0x%04x prio:%d "
drivers/net/sxe2/sxe2_filter.c +11 -11
@@ -19,7 +19,7 @@ static struct sxe2_mac_filter *sxe2_uc_filter_find(struct sxe2_adapter *adapter,struct sxe2_mac_filter *next_entry =NULL ;rte_spinlock_lock (&adapter->filter_ctxt.filter_lock); - RTE_TAILQ_FOREACH_SAFE(entry, &adapter->filter_ctxt.uc_list, next, next_entry) { + TAILQ_FOREACH_SAFE(entry, &adapter->filter_ctxt.uc_list, next, next_entry) {if (rte_is_same_ether_addr (macaddr, &entry->mac_addr)) { filter = entry;break ;
@@ -125,7 +125,7 @@ void sxe2_uc_filter_clear(struct sxe2_adapter *adapter, bool default_config)struct sxe2_mac_filter *entry;struct sxe2_mac_filter *next_entry; - RTE_TAILQ_FOREACH_SAFE(entry, &adapter->filter_ctxt.uc_list, next, next_entry) { + TAILQ_FOREACH_SAFE(entry, &adapter->filter_ctxt.uc_list, next, next_entry) {if (entry->default_config && !default_config)continue ;
@@ -142,7 +142,7 @@ static struct sxe2_mac_filter *sxe2_mc_filter_find(struct sxe2_adapter *adapter,struct sxe2_mac_filter *next_entry =NULL ;rte_spinlock_lock (&adapter->filter_ctxt.filter_lock); - RTE_TAILQ_FOREACH_SAFE(entry, &adapter->filter_ctxt.mc_list, next, next_entry) { + TAILQ_FOREACH_SAFE(entry, &adapter->filter_ctxt.mc_list, next, next_entry) {if (rte_is_same_ether_addr (macaddr, &entry->mac_addr)) { filter = entry;break ;
@@ -249,7 +249,7 @@ void sxe2_mc_filter_clear(struct sxe2_adapter *adapter, bool default_config)struct sxe2_mac_filter *entry;struct sxe2_mac_filter *next_entry; - RTE_TAILQ_FOREACH_SAFE(entry, &adapter->filter_ctxt.mc_list, next, next_entry) { + TAILQ_FOREACH_SAFE(entry, &adapter->filter_ctxt.mc_list, next, next_entry) {if (entry->default_config && !default_config)continue ;if (sxe2_mc_filter_del (adapter, &entry->mac_addr))
@@ -388,7 +388,7 @@ void sxe2_vlan_filters_clear(struct sxe2_adapter *adapter, bool default_config)if (adapter->filter_ctxt.vlan_num ==0 )return ; - RTE_TAILQ_FOREACH_SAFE(v_f, &adapter->filter_ctxt.vlan_list, next, temp) + TAILQ_FOREACH_SAFE(v_f, &adapter->filter_ctxt.vlan_list, next, temp) {if (v_f->default_config && !default_config)continue ;
@@ -521,7 +521,7 @@ static int32_t sxe2_all_filter_hw_clear(struct sxe2_adapter *adapter)struct sxe2_vlan_filter *next_vlan_entry;if (adapter->filter_ctxt.uc_num >0 ) { -RTE_TAILQ_FOREACH_SAFE (mac_entry, &adapter->filter_ctxt.uc_list, next, +TAILQ_FOREACH_SAFE (mac_entry, &adapter->filter_ctxt.uc_list, next, next_mac_entry) {if (mac_entry->hw_config) { ret =sxe2_drv_uc_config (adapter, &mac_entry->mac_addr, false);
@@ -536,7 +536,7 @@ static int32_t sxe2_all_filter_hw_clear(struct sxe2_adapter *adapter) }if (adapter->filter_ctxt.mc_num >0 ) { -RTE_TAILQ_FOREACH_SAFE (mac_entry, &adapter->filter_ctxt.mc_list, next, +TAILQ_FOREACH_SAFE (mac_entry, &adapter->filter_ctxt.mc_list, next, next_mac_entry) {if (mac_entry->hw_config) { ret =sxe2_drv_mc_config (adapter, &mac_entry->mac_addr, false);
@@ -551,7 +551,7 @@ static int32_t sxe2_all_filter_hw_clear(struct sxe2_adapter *adapter) }if (adapter->filter_ctxt.vlan_num >0 ) { -RTE_TAILQ_FOREACH_SAFE (vlan_entry, &adapter->filter_ctxt.vlan_list, next, +TAILQ_FOREACH_SAFE (vlan_entry, &adapter->filter_ctxt.vlan_list, next, next_vlan_entry) {if (vlan_entry->hw_config) { ret = sxe2_drv_vlan_filter_id_config(adapter,
@@ -606,7 +606,7 @@ static int32_t sxe2_all_filter_hw_set(struct sxe2_adapter *adapter)struct sxe2_vlan_filter *next_vlan_entry;if (adapter->filter_ctxt.uc_num >0 ) { -RTE_TAILQ_FOREACH_SAFE (mac_entry, &adapter->filter_ctxt.uc_list, next, +TAILQ_FOREACH_SAFE (mac_entry, &adapter->filter_ctxt.uc_list, next, next_mac_entry) {if (!mac_entry->hw_config) { ret = sxe2_drv_uc_config(adapter, &mac_entry->mac_addr,
@@ -624,7 +624,7 @@ static int32_t sxe2_all_filter_hw_set(struct sxe2_adapter *adapter) }if (adapter->filter_ctxt.mc_num >0 ) { -RTE_TAILQ_FOREACH_SAFE (mac_entry, &adapter->filter_ctxt.mc_list, next, +TAILQ_FOREACH_SAFE (mac_entry, &adapter->filter_ctxt.mc_list, next, next_mac_entry) {if (!mac_entry->hw_config) { ret =sxe2_drv_mc_config (adapter, &mac_entry->mac_addr, true);
@@ -641,7 +641,7 @@ static int32_t sxe2_all_filter_hw_set(struct sxe2_adapter *adapter) }if (adapter->filter_ctxt.vlan_num >0 ) { -RTE_TAILQ_FOREACH_SAFE (vlan_entry, &adapter->filter_ctxt.vlan_list, next, +TAILQ_FOREACH_SAFE (vlan_entry, &adapter->filter_ctxt.vlan_list, next, next_vlan_entry) {if (!vlan_entry->hw_config) { ret = sxe2_drv_vlan_filter_id_config(adapter,
drivers/net/sxe2/sxe2_vsi.c +1 -1
@@ -287,7 +287,7 @@ void sxe2_vsi_uninit(struct rte_eth_dev *dev)PMD_LOG_ERR (DRV ,"Failed to del vsi from fw, ret=%d" , ret); goto l_end; } - RTE_TAILQ_FOREACH_SAFE(var, &adapter->vsi_ctxt.other_vsi_list, next, tvar) { + TAILQ_FOREACH_SAFE(var, &adapter->vsi_ctxt.other_vsi_list, next, tvar) { ret =sxe2_vsi_destroy (adapter, var);if (ret) {PMD_LOG_ERR (DRV ,"Failed to del vsi from fw, ret=%d" , ret);
drivers/net/zxdh/zxdh_flow.c +1 -1
@@ -288,7 +288,7 @@ static struct dh_flow_engine *zxdh_get_flow_engine(struct rte_eth_dev *dev __rtestruct dh_flow_engine *engine =NULL ;void *temp; - RTE_TAILQ_FOREACH_SAFE(engine, &flow_engine_list, node, temp) { + TAILQ_FOREACH_SAFE(engine, &flow_engine_list, node, temp) {if (engine->type ==FLOW_TYPE_FD_TCAM )break ; }
drivers/net/zxdh/zxdh_mtr.c +3 -3
@@ -1209,13 +1209,13 @@ zxdh_mtr_release(struct rte_eth_dev *dev)struct rte_mtr_error error = {0 };struct zxdh_mtr_object *mtr_obj; - RTE_TAILQ_FOREACH(mtr_obj, &zxdh_shared_data->mtr_list, next) { + TAILQ_FOREACH(mtr_obj, &zxdh_shared_data->mtr_list, next) {if (mtr_obj->port_id == priv->port_id)zxdh_mtr_obj_free (dev, mtr_obj); } - RTE_TAILQ_FOREACH(profile, &zxdh_shared_data->meter_profile_list, next) { + TAILQ_FOREACH(profile, &zxdh_shared_data->meter_profile_list, next) {if (profile->dpdk_port_id == priv->port_id) zxdh_mtr_profile_res_free(dev, zxdh_shared_data->mtr_profile_mp,
@@ -1226,7 +1226,7 @@ zxdh_mtr_release(struct rte_eth_dev *dev)struct zxdh_meter_policy *policy; - RTE_TAILQ_FOREACH(policy, &zxdh_shared_data->mtr_policy_list, next) { + TAILQ_FOREACH(policy, &zxdh_shared_data->mtr_policy_list, next) {if (policy->dpdk_port_id == priv->port_id)zxdh_mtr_policy_res_free (zxdh_shared_data->mtr_policy_mp, policy); }
examples/vm_power_manager/channel_manager.c +4 -4
@@ -59,16 +59,16 @@ struct virtual_machine_info {virDomainInfo info;rte_spinlock_t config_spinlock;int allow_query; -RTE_TAILQ_ENTRY (virtual_machine_info) vms_info; +TAILQ_ENTRY (virtual_machine_info) vms_info; }; -RTE_TAILQ_HEAD(, virtual_machine_info) vm_list_head; +TAILQ_HEAD(, virtual_machine_info) vm_list_head;static struct virtual_machine_info *find_domain_by_name (const char *name) {struct virtual_machine_info *info; - RTE_TAILQ_FOREACH(info, &vm_list_head, vms_info) { + TAILQ_FOREACH(info, &vm_list_head, vms_info) {if (!strncmp (info->name, name,CHANNEL_MGR_MAX_NAME_LEN -1 ))return info; }
@@ -1015,7 +1015,7 @@ channel_manager_exit(void)char mask[RTE_MAX_LCORE ];struct virtual_machine_info *vm_info, *tmp; - RTE_TAILQ_FOREACH_SAFE(vm_info, &vm_list_head, vms_info, tmp) { + TAILQ_FOREACH_SAFE(vm_info, &vm_list_head, vms_info, tmp) {rte_spinlock_lock (&(vm_info->config_spinlock));
lib/bbdev/rte_bbdev.h +1 -1
@@ -501,7 +501,7 @@ struct rte_bbdev_callback;struct rte_intr_handle ;/** Structure to keep track of registered callbacks */ -RTE_TAILQ_HEAD (rte_bbdev_cb_list, rte_bbdev_callback); +TAILQ_HEAD (rte_bbdev_cb_list, rte_bbdev_callback);/** * @internal The data structure associated with a device. Drivers can access
lib/cryptodev/cryptodev_pmd.h +1 -1
@@ -131,7 +131,7 @@ struct rte_cryptodev_global {/* Cryptodev driver, containing the driver ID */ struct cryptodev_driver { -RTE_TAILQ_ENTRY (cryptodev_driver) next;/**< Next in list. */ +TAILQ_ENTRY (cryptodev_driver) next;/**< Next in list. */ const struct rte_driver *driver;uint8_t id; };
lib/cryptodev/rte_cryptodev.h +1 -1
@@ -1049,7 +1049,7 @@ rte_cryptodev_queue_pair_event_error_query(uint8_t dev_id, uint16_t qp_id);struct rte_cryptodev_callback ;/** Structure to keep track of registered callbacks */ -RTE_TAILQ_HEAD (rte_cryptodev_cb_list, rte_cryptodev_callback); +TAILQ_HEAD (rte_cryptodev_cb_list, rte_cryptodev_callback);/** * Structure used to hold information about the callbacks to be called for a
lib/eal/common/eal_common_devargs.c +2 -2
@@ -303,7 +303,7 @@ rte_devargs_insert(struct rte_devargs **da)if (*da ==NULL || (*da)->bus ==NULL )return -1 ; - RTE_TAILQ_FOREACH_SAFE(listed_da, &devargs_list, next, tmp) { + TAILQ_FOREACH_SAFE(listed_da, &devargs_list, next, tmp) {if (listed_da == *da)/* devargs already in the list */ return 0 ;
@@ -372,7 +372,7 @@ rte_devargs_remove(struct rte_devargs *devargs)if (devargs ==NULL || devargs->bus ==NULL )return -1 ; - RTE_TAILQ_FOREACH_SAFE(d, &devargs_list, next, tmp) { + TAILQ_FOREACH_SAFE(d, &devargs_list, next, tmp) {if (strcmp (d->bus->name, devargs->bus->name) ==0 &&strcmp (d->name, devargs->name) ==0 ) {TAILQ_REMOVE (&devargs_list, d, next);
lib/eal/common/eal_common_options.c +1 -1
@@ -482,7 +482,7 @@ eal_option_device_parse(void)void *tmp;int ret =0 ; - RTE_TAILQ_FOREACH_SAFE(devopt, &devopt_list, next, tmp) { + TAILQ_FOREACH_SAFE(devopt, &devopt_list, next, tmp) {if (ret ==0 ) { ret =rte_devargs_add (devopt->type, devopt->arg);if (ret)
lib/eal/common/eal_common_proc.c +1 -1
@@ -1266,7 +1266,7 @@ rte_mp_request_async(struct rte_mp_msg *req, const struct timespec *ts,if (ret !=0 && reply->nb_sent >0 ) {struct pending_request *r, *tmp; - RTE_TAILQ_FOREACH_SAFE(r, &pending_requests.requests, next, tmp) { + TAILQ_FOREACH_SAFE(r, &pending_requests.requests, next, tmp) {if (r->type ==REQUEST_TYPE_ASYNC && r->async.param == param) {TAILQ_REMOVE (&pending_requests.requests, r, next);free (r->reply);
lib/eal/freebsd/include/rte_os.h +3 -9
@@ -12,17 +12,11 @@#include <pthread_np.h> #include <stdlib.h> /* Declares alloca() */ +/* Not used here, but included so that rte_queue.h wins the multiple +* inclusion guard race against a system <sys/queue.h>. See rte_queue.h. +*/ #include <rte_queue.h> -/* These macros are compatible with system's sys/queue.h. */ -#define RTE_TAILQ_HEAD (name, type) TAILQ_HEAD(name, type) -#define RTE_TAILQ_ENTRY (type) TAILQ_ENTRY(type) -#define RTE_TAILQ_FOREACH (var, head, field) TAILQ_FOREACH(var, head, field) -#define RTE_TAILQ_FIRST (head) TAILQ_FIRST(head) -#define RTE_TAILQ_NEXT (elem, field) TAILQ_NEXT(elem, field) -#define RTE_STAILQ_HEAD (name, type) STAILQ_HEAD(name, type) -#define RTE_STAILQ_ENTRY (type) STAILQ_ENTRY(type) -typedef cpuset_t rte_cpuset_t ;#define RTE_HAS_CPUSET
lib/eal/include/bus_driver.h +4 -4
@@ -20,7 +20,7 @@ struct rte_device;struct rte_driver ;/** Double linked list of buses */ -RTE_TAILQ_HEAD (rte_bus_list, rte_bus); +TAILQ_HEAD (rte_bus_list, rte_bus);/** * Bus specific scan for devices attached on the bus.
@@ -351,7 +351,7 @@ typedef void *(*rte_bus_dev_iterate_t)(const struct rte_bus *bus,* A structure describing a generic bus. */ struct rte_bus { -RTE_TAILQ_ENTRY (rte_bus) next;/**< Next bus object in linked list */ +TAILQ_ENTRY (rte_bus) next;/**< Next bus object in linked list */ const char *name;/**< Name of the bus */ bool allow_multi_probe;/**< Allow probing devices multiple times */ rte_bus_scan_t scan;/**< Scan for devices attached to bus */
@@ -374,8 +374,8 @@ struct rte_bus {/**< handle sigbus error on the bus */ rte_bus_free_device_t free_device;/**< Free bus-specific device */ rte_bus_cleanup_t cleanup;/**< Cleanup devices on bus */ - RTE_TAILQ_HEAD(, rte_device) device_list; /**< List of devices on the bus */ - RTE_TAILQ_HEAD(, rte_driver) driver_list; /**< List of drivers on the bus */ + TAILQ_HEAD(, rte_device) device_list; /**< List of devices on the bus */ + TAILQ_HEAD(, rte_driver) driver_list; /**< List of drivers on the bus */ };/**
lib/eal/include/dev_driver.h +2 -2
@@ -12,7 +12,7 @@* A structure describing a device driver. */ struct rte_driver { -RTE_TAILQ_ENTRY (rte_driver) next;/**< Next in list. */ +TAILQ_ENTRY (rte_driver) next;/**< Next in list. */ const char *name;/**< Driver name. */ const char *alias;/**< Driver alias. */ const struct rte_bus *bus;/**< Bus reference. */
@@ -22,7 +22,7 @@ struct rte_driver {* A structure describing a generic device. */ struct rte_device { -RTE_TAILQ_ENTRY (rte_device) next;/**< Next device */ +TAILQ_ENTRY (rte_device) next;/**< Next device */ const char *name;/**< Device name */ const char *bus_info;/**< Device bus specific information */ const struct rte_driver *driver;/**< Driver assigned after probing */
lib/eal/include/rte_class.h +2 -2
@@ -25,13 +25,13 @@ extern "C" {#endif /** Double linked list of classes */ -RTE_TAILQ_HEAD (rte_class_list, rte_class); +TAILQ_HEAD (rte_class_list, rte_class);/** * A structure describing a generic device class. */ struct rte_class { -RTE_TAILQ_ENTRY (rte_class) next;/**< Next device class in linked list */ +TAILQ_ENTRY (rte_class) next;/**< Next device class in linked list */ const char *name;/**< Name of the class */ rte_dev_iterate_t dev_iterate;/**< Device iterator. */ };
lib/eal/include/rte_devargs.h +1 -1
@@ -71,7 +71,7 @@ enum rte_devtype {*/ struct rte_devargs {/** Next in list. */ -RTE_TAILQ_ENTRY (rte_devargs) next; +TAILQ_ENTRY (rte_devargs) next;/** Type of device. */ enum rte_devtype type;/** Device policy. */
lib/eal/include/rte_queue.h +5 -0
@@ -26,6 +26,11 @@* _FOREACH_SAFE, _FOREACH_FROM or _SWAP. Conversely, when this header wins, * the glibc-only CIRCLEQ_ and SIMPLEQ_ families are not defined. * +* Within DPDK this is not a problem: rte_os.h includes this header and is +* reached from rte_common.h, so any DPDK header included first wins the +* race. Note that the include in rte_os.h is load bearing for that reason, +* even though nothing in rte_os.h itself uses the list macros. +* * The FreeBSD QUEUE_MACRO_DEBUG and INVARIANTS facilities are omitted: they * are there to debug the macros themselves, which is not something DPDK does. */
lib/eal/include/rte_tailq.h +29 -6
@@ -12,6 +12,7 @@#include <stdio.h> #include <rte_debug.h> +#include <rte_queue.h> #ifdef __cplusplusextern "C" {
@@ -19,11 +20,11 @@ extern "C" {/** dummy structure type used by the rte_tailq APIs */ struct rte_tailq_entry { -RTE_TAILQ_ENTRY (rte_tailq_entry) next;/**< Pointer entries for a tailq list */ +TAILQ_ENTRY (rte_tailq_entry) next;/**< Pointer entries for a tailq list */ void *data;/**< Pointer to the data referenced by this tailq entry */ };/** dummy */ -RTE_TAILQ_HEAD (rte_tailq_entry_head, rte_tailq_entry); +TAILQ_HEAD (rte_tailq_entry_head, rte_tailq_entry);#define RTE_TAILQ_NAMESIZE 32
@@ -46,7 +47,7 @@ struct rte_tailq_elem {* rte_eal_tailqs_init() */ struct rte_tailq_head *head; -RTE_TAILQ_ENTRY (rte_tailq_elem) next; +TAILQ_ENTRY (rte_tailq_elem) next;const char name[RTE_TAILQ_NAMESIZE ]; };
@@ -124,10 +125,32 @@ RTE_INIT(tailqinitfn_ ##t) \rte_panic ("Cannot initialize tailq: %s\n" , t.name); \ } -/* This macro permits both remove and free var within the loop safely.*/ +/* +* Compatibility wrappers, deprecated. +* +* These existed only because Windows had no <sys/queue.h>. Use the plain +* macros from <rte_queue.h> instead; these are kept for out of tree code +* and will be removed in a future release. +* +* They are defined in terms of the plain TAILQ_ and STAILQ_ macros only, +* never the extended ones, so that they keep working in a translation unit +* that included a system <sys/queue.h> before any DPDK header, in which +* case rte_queue.h is suppressed and only the subset the system provides +* is defined. That is why RTE_TAILQ_FOREACH_SAFE is open coded rather than +* mapped to TAILQ_FOREACH_SAFE, which glibc does not have. +*/ +#define RTE_TAILQ_HEAD (name, type) TAILQ_HEAD(name, type) +#define RTE_TAILQ_ENTRY (type) TAILQ_ENTRY(type) +#define RTE_TAILQ_FOREACH (var, head, field) TAILQ_FOREACH(var, head, field) +#define RTE_TAILQ_FIRST (head) TAILQ_FIRST(head) +#define RTE_TAILQ_NEXT (elem, field) TAILQ_NEXT(elem, field) +#define RTE_STAILQ_HEAD (name, type) STAILQ_HEAD(name, type) +#define RTE_STAILQ_ENTRY (type) STAILQ_ENTRY(type) + +/* This macro permits both remove and free var within the loop safely. */ #define RTE_TAILQ_FOREACH_SAFE (var, head, field, tvar) \ - for ((var) = RTE_TAILQ_FIRST((head)); \ - (var) && ((tvar) = RTE_TAILQ_NEXT((var), field), 1); \ + for ((var) = TAILQ_FIRST((head)); \ + (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \ (var) = (tvar))#ifdef __cplusplus
lib/eal/linux/include/rte_os.h +3 -9
@@ -12,17 +12,11 @@#include <alloca.h> #include <sched.h> +/* Not used here, but included so that rte_queue.h wins the multiple +* inclusion guard race against a system <sys/queue.h>. See rte_queue.h. +*/ #include <rte_queue.h> -/* These macros are compatible with system's sys/queue.h. */ -#define RTE_TAILQ_HEAD (name, type) TAILQ_HEAD(name, type) -#define RTE_TAILQ_ENTRY (type) TAILQ_ENTRY(type) -#define RTE_TAILQ_FOREACH (var, head, field) TAILQ_FOREACH(var, head, field) -#define RTE_TAILQ_FIRST (head) TAILQ_FIRST(head) -#define RTE_TAILQ_NEXT (elem, field) TAILQ_NEXT(elem, field) -#define RTE_STAILQ_HEAD (name, type) STAILQ_HEAD(name, type) -#define RTE_STAILQ_ENTRY (type) STAILQ_ENTRY(type) -#ifdef CPU_SETSIZE /* may require _GNU_SOURCE */ typedef cpu_set_t rte_cpuset_t ;#define RTE_HAS_CPUSET
lib/eal/windows/include/rte_os.h +4 -27
@@ -16,33 +16,10 @@#include <malloc.h> #include <sched.h> - -/* These macros are compatible with bundled sys/queue.h. */ -#define RTE_TAILQ_HEAD (name, type) \ -struct name { \ - struct type *tqh_first; \ - struct type **tqh_last; \ -} -#define RTE_TAILQ_ENTRY (type) \ -struct { \ - struct type *tqe_next; \ - struct type **tqe_prev; \ -} -#define RTE_TAILQ_FOREACH (var, head, field) \ - for ((var) = RTE_TAILQ_FIRST((head)); \ - (var); \ - (var) = RTE_TAILQ_NEXT((var), field)) -#define RTE_TAILQ_FIRST (head) ((head)->tqh_first) -#define RTE_TAILQ_NEXT (elm, field) ((elm)->field.tqe_next) -#define RTE_STAILQ_HEAD (name, type) \ -struct name { \ - struct type *stqh_first; \ - struct type **stqh_last; \ -} -#define RTE_STAILQ_ENTRY (type) \ -struct { \ - struct type *stqe_next; \ -} +/* Not used here, but included so that rte_queue.h wins the multiple +* inclusion guard race against a system <sys/queue.h>. See rte_queue.h. +*/ +#include <rte_queue.h> /* cpu_set macros implementation */ #define RTE_CPU_AND (dst, src1, src2) CPU_AND(dst, src1, src2)
lib/efd/rte_efd.c +1 -1
@@ -777,7 +777,7 @@ rte_efd_free(struct rte_efd_table *table) efd_list =RTE_TAILQ_CAST (rte_efd_tailq.head, rte_efd_list);rte_mcfg_tailq_write_lock (); - RTE_TAILQ_FOREACH_SAFE(te, efd_list, next, temp) { + TAILQ_FOREACH_SAFE(te, efd_list, next, temp) {if (te->data == (void *) table) {TAILQ_REMOVE (efd_list, te, next);rte_free (te);
lib/ethdev/rte_ethdev_core.h +1 -1
@@ -18,7 +18,7 @@struct rte_eth_dev_callback ;/** @internal Structure to keep track of registered callbacks */ -RTE_TAILQ_HEAD (rte_eth_dev_cb_list, rte_eth_dev_callback); +TAILQ_HEAD (rte_eth_dev_cb_list, rte_eth_dev_callback);struct rte_eth_dev ;
lib/eventdev/rte_event_vector_adapter.c +1 -1
@@ -506,7 +506,7 @@ struct sw_vector_adapter_data {struct rte_event_vector_adapter *adapter;struct rte_event_vector_adapter_stats stats;struct sw_vector_adapter_service_data *service_data; -RTE_TAILQ_ENTRY (sw_vector_adapter_data) next; +TAILQ_ENTRY (sw_vector_adapter_data) next; };struct sw_vector_adapter_service_data {
lib/gpudev/gpudev.c +2 -2
@@ -476,7 +476,7 @@ rte_gpu_callback_unregister(int16_t dev_id, enum rte_gpu_event event,rte_rwlock_write_lock (&gpu_callback_lock); do { callbacks = &gpus[next_dev].callbacks; - RTE_TAILQ_FOREACH_SAFE(callback, callbacks, next, nextcb) { + TAILQ_FOREACH_SAFE(callback, callbacks, next, nextcb) { if (callback->event != event || callback->function != function || (callback->user_data != user_data &&
@@ -499,7 +499,7 @@ gpu_free_callbacks(struct rte_gpu *dev) callbacks = &dev->callbacks;rte_rwlock_write_lock (&gpu_callback_lock); - RTE_TAILQ_FOREACH_SAFE(callback, callbacks, next, nextcb) { + TAILQ_FOREACH_SAFE(callback, callbacks, next, nextcb) {TAILQ_REMOVE (callbacks, callback, next);free (callback); }
lib/gpudev/gpudev_driver.h +1 -1
@@ -80,7 +80,7 @@ struct __rte_cache_aligned rte_gpu {/* Driver functions. */ struct rte_gpu_ops ops;/* Event callback list. */ - RTE_TAILQ_HEAD(rte_gpu_callback_list, rte_gpu_callback) callbacks; + TAILQ_HEAD(rte_gpu_callback_list, rte_gpu_callback) callbacks;/* Current state (used or not) in the running process. */ enum rte_gpu_state process_state;/* Updated by this library. */ /* Driver-specific private data for the running process. */
lib/ip_frag/ip_reassembly.h +2 -2
@@ -48,7 +48,7 @@ struct ip_frag_key {* First two entries in the frags[] array are for the last and first fragments. */ struct __rte_cache_aligned ip_frag_pkt { -RTE_TAILQ_ENTRY (ip_frag_pkt) lru;/* LRU list */ +TAILQ_ENTRY (ip_frag_pkt) lru;/* LRU list */ struct ip_frag_key key;/* fragmentation key */ uint64_t start;/* creation timestamp */ uint32_t total_size;/* expected reassembled size */
@@ -58,7 +58,7 @@ struct __rte_cache_aligned ip_frag_pkt { };/* fragments tailq */ -RTE_TAILQ_HEAD (ip_pkt_list, ip_frag_pkt); +TAILQ_HEAD (ip_pkt_list, ip_frag_pkt);/* fragmentation table statistics */ struct __rte_cache_aligned ip_frag_tbl_stat {
lib/ip_frag/rte_ip_frag_common.c +1 -1
@@ -140,7 +140,7 @@ rte_ip_frag_table_del_expired_entries(struct rte_ip_frag_tbl *tbl, max_cycles = tbl->max_cycles; - RTE_TAILQ_FOREACH_SAFE(fp, &tbl->lru, lru, tmp) { + TAILQ_FOREACH_SAFE(fp, &tbl->lru, lru, tmp) {if (max_cycles + fp->start >= tms)return ;
lib/mempool/rte_mempool.c +2 -2
@@ -1437,7 +1437,7 @@ void rte_mempool_walk(void (*func)(struct rte_mempool *, void *),rte_mcfg_mempool_read_lock (); - RTE_TAILQ_FOREACH_SAFE(te, mempool_list, next, tmp_te) { + TAILQ_FOREACH_SAFE(te, mempool_list, next, tmp_te) { (*func)((struct rte_mempool *) te->data, arg); }
@@ -1505,7 +1505,7 @@ mempool_event_callback_invoke(enum rte_mempool_event event,void *tmp_te;rte_mcfg_tailq_read_lock (); - RTE_TAILQ_FOREACH_SAFE(cb, &callback_tailq, callbacks, tmp_te) { + TAILQ_FOREACH_SAFE(cb, &callback_tailq, callbacks, tmp_te) {rte_mcfg_tailq_read_unlock (); cb->func (event, mp, cb->user_data);rte_mcfg_tailq_read_lock ();
lib/mempool/rte_mempool.h +4 -4
@@ -153,7 +153,7 @@ struct rte_mempool_objsz {* double-frees. */ struct rte_mempool_objhdr { -RTE_STAILQ_ENTRY (rte_mempool_objhdr) next;/**< Next in list. */ +STAILQ_ENTRY (rte_mempool_objhdr) next;/**< Next in list. */ struct rte_mempool *mp;/**< The mempool owning the object. */ rte_iova_t iova;/**< IO address of the object. */ #ifdef RTE_LIBRTE_MEMPOOL_DEBUG
@@ -164,7 +164,7 @@ struct rte_mempool_objhdr {/** * A list of object headers type */ -RTE_STAILQ_HEAD (rte_mempool_objhdr_list, rte_mempool_objhdr); +STAILQ_HEAD (rte_mempool_objhdr_list, rte_mempool_objhdr);#ifdef RTE_LIBRTE_MEMPOOL_DEBUG
@@ -191,7 +191,7 @@ extern int rte_mempool_logtype;/** * A list of memory where objects are stored */ -RTE_STAILQ_HEAD (rte_mempool_memhdr_list, rte_mempool_memhdr); +STAILQ_HEAD (rte_mempool_memhdr_list, rte_mempool_memhdr);/** * Callback used to free a memory chunk
@@ -206,7 +206,7 @@ typedef void (rte_mempool_memchunk_free_cb_t)(struct rte_mempool_memhdr *memhdr,* and physically contiguous. */ struct rte_mempool_memhdr { -RTE_STAILQ_ENTRY (rte_mempool_memhdr) next;/**< Next in list. */ +STAILQ_ENTRY (rte_mempool_memhdr) next;/**< Next in list. */ struct rte_mempool *mp;/**< The mempool owning the chunk */ void *addr;/**< Virtual address of the chunk */ rte_iova_t iova;/**< IO address of the chunk */
lib/pmu/pmu.c +1 -1
@@ -460,7 +460,7 @@ rte_pmu_fini(void)if (!rte_pmu.initialized)return ; - RTE_TAILQ_FOREACH_SAFE(event, &rte_pmu.event_list, next, tmp_event) { + TAILQ_FOREACH_SAFE(event, &rte_pmu.event_list, next, tmp_event) {TAILQ_REMOVE (&rte_pmu.event_list, event, next);free_event (event); }
lib/power/power_cpufreq.h +1 -1
@@ -147,7 +147,7 @@ typedef int (*rte_power_get_capabilities_t)(unsigned int lcore_id,/** Structure defining core power operations structure */ struct rte_power_cpufreq_ops { -RTE_TAILQ_ENTRY (rte_power_cpufreq_ops) next;/**< Next in list. */ +TAILQ_ENTRY (rte_power_cpufreq_ops) next;/**< Next in list. */ char name[RTE_POWER_DRIVER_NAMESZ ];/**< power mgmt driver. */ rte_power_cpufreq_init_t init;/**< Initialize power management. */ rte_power_cpufreq_exit_t exit;/**< Exit power management. */
lib/power/power_uncore_ops.h +1 -1
@@ -185,7 +185,7 @@ typedef void (*rte_power_uncore_driver_cb_t)(void);/** Structure defining uncore power operations structure */ struct rte_power_uncore_ops { -RTE_TAILQ_ENTRY (rte_power_uncore_ops) next;/**< Next in list. */ +TAILQ_ENTRY (rte_power_uncore_ops) next;/**< Next in list. */ char name[RTE_POWER_UNCORE_DRIVER_NAMESZ ];/**< power mgmt driver. */ rte_power_uncore_driver_cb_t cb;/**< Driver specific callbacks. */ rte_power_uncore_init_t init;/**< Initialize power management. */
lib/power/rte_power_cpufreq.c +4 -4
@@ -13,7 +13,7 @@ static enum power_management_env global_default_env = PM_ENV_NOT_SET;static struct rte_power_cpufreq_ops *global_cpufreq_ops;static rte_spinlock_t global_env_cfg_lock =RTE_SPINLOCK_INITIALIZER ; -static RTE_TAILQ_HEAD(, rte_power_cpufreq_ops) cpufreq_ops_list = +static TAILQ_HEAD(, rte_power_cpufreq_ops) cpufreq_ops_list =TAILQ_HEAD_INITIALIZER (cpufreq_ops_list);const char *power_env_str[] = {
@@ -55,7 +55,7 @@ rte_power_check_env_supported(enum power_management_env env)if (env >=RTE_DIM (power_env_str))return 0 ; - RTE_TAILQ_FOREACH(ops, &cpufreq_ops_list, next) + TAILQ_FOREACH(ops, &cpufreq_ops_list, next)if (strncmp (ops->name, power_env_str[env],RTE_POWER_DRIVER_NAMESZ ) ==0 )return ops->check_env_support ();
@@ -77,7 +77,7 @@ rte_power_set_env(enum power_management_env env) goto out; } - RTE_TAILQ_FOREACH(ops, &cpufreq_ops_list, next) + TAILQ_FOREACH(ops, &cpufreq_ops_list, next)if (strncmp (ops->name, power_env_str[env],RTE_POWER_DRIVER_NAMESZ ) ==0 ) { global_cpufreq_ops = ops;
@@ -123,7 +123,7 @@ rte_power_init(unsigned int lcore_id)POWER_LOG (INFO ,"Env isn't set yet!" );/* Auto detect Environment */ - RTE_TAILQ_FOREACH(ops, &cpufreq_ops_list, next) { + TAILQ_FOREACH(ops, &cpufreq_ops_list, next) {POWER_LOG (INFO ,"Attempting to initialise %s cpufreq power management..." , ops->name);
lib/power/rte_power_uncore.c +3 -3
@@ -14,7 +14,7 @@ static enum rte_uncore_power_mgmt_env global_uncore_env = RTE_UNCORE_PM_ENV_NOT_static struct rte_power_uncore_ops *global_uncore_ops;static rte_spinlock_t global_env_cfg_lock =RTE_SPINLOCK_INITIALIZER ; -static RTE_TAILQ_HEAD(, rte_power_uncore_ops) uncore_ops_list = +static TAILQ_HEAD(, rte_power_uncore_ops) uncore_ops_list =TAILQ_HEAD_INITIALIZER (uncore_ops_list);const char *uncore_env_str[] = {
@@ -68,7 +68,7 @@ rte_power_set_uncore_env(enum rte_uncore_power_mgmt_env env) env =RTE_UNCORE_PM_ENV_INTEL_UNCORE ;if (env <RTE_DIM (uncore_env_str)) { - RTE_TAILQ_FOREACH(ops, &uncore_ops_list, next) + TAILQ_FOREACH(ops, &uncore_ops_list, next)if (strncmp (ops->name, uncore_env_str[env],RTE_POWER_UNCORE_DRIVER_NAMESZ ) ==0 ) { global_uncore_env = env;
@@ -115,7 +115,7 @@ rte_power_uncore_init(unsigned int pkg, unsigned int die)return global_uncore_ops->init (pkg, die);/* Auto Detect Environment */ - RTE_TAILQ_FOREACH(ops, &uncore_ops_list, next) + TAILQ_FOREACH(ops, &uncore_ops_list, next)if (ops) { POWER_LOG(INFO, "Attempting to initialise %s power management...",
lib/table/rte_swx_table.h +2 -2
@@ -73,7 +73,7 @@ struct rte_swx_table_entry {/** Used to facilitate the membership of this table entry to a * linked list. */ -RTE_TAILQ_ENTRY (rte_swx_table_entry) node; +TAILQ_ENTRY (rte_swx_table_entry) node;/** Key value for the current entry. Array of *key_size* bytes or NULL * if the *key_size* for the current table is 0.
@@ -116,7 +116,7 @@ struct rte_swx_table_entry { };/** List of table entries. */ -RTE_TAILQ_HEAD (rte_swx_table_entry_list, rte_swx_table_entry); +TAILQ_HEAD (rte_swx_table_entry_list, rte_swx_table_entry);/** * Table memory footprint get
lib/table/rte_swx_table_selector.h +2 -2
@@ -55,7 +55,7 @@ struct rte_swx_table_selector_params {/** Group member parameters. */ struct rte_swx_table_selector_member {/** Linked list connectivity. */ -RTE_TAILQ_ENTRY (rte_swx_table_selector_member) node; +TAILQ_ENTRY (rte_swx_table_selector_member) node;/** Member ID. */ uint32_t member_id;
@@ -65,7 +65,7 @@ struct rte_swx_table_selector_member { };/** List of group members. */ -RTE_TAILQ_HEAD (rte_swx_table_selector_member_list, rte_swx_table_selector_member); +TAILQ_HEAD (rte_swx_table_selector_member_list, rte_swx_table_selector_member);/** Group parameters. */ struct rte_swx_table_selector_group {
lib/vhost/iotlb.c +7 -7
@@ -115,7 +115,7 @@ vhost_user_iotlb_pending_remove_all(struct virtio_net *dev)rte_rwlock_write_lock (&dev->iotlb_pending_lock); - RTE_TAILQ_FOREACH_SAFE(node, &dev->iotlb_pending_list, next, temp_node) { + TAILQ_FOREACH_SAFE(node, &dev->iotlb_pending_list, next, temp_node) {TAILQ_REMOVE (&dev->iotlb_pending_list, node, next);vhost_user_iotlb_pool_put (dev, node); }
@@ -181,7 +181,7 @@ vhost_user_iotlb_pending_remove(struct virtio_net *dev, uint64_t iova, uint64_trte_rwlock_write_lock (&dev->iotlb_pending_lock); -RTE_TAILQ_FOREACH_SAFE (node, &dev->iotlb_pending_list, next, +TAILQ_FOREACH_SAFE (node, &dev->iotlb_pending_list, next, temp_node) {if (node->iova < iova)continue ;
@@ -203,7 +203,7 @@ vhost_user_iotlb_cache_remove_all(struct virtio_net *dev)vhost_user_iotlb_wr_lock_all (dev); - RTE_TAILQ_FOREACH_SAFE(node, &dev->iotlb_list, next, temp_node) { + TAILQ_FOREACH_SAFE(node, &dev->iotlb_list, next, temp_node) {vhost_user_iotlb_clear_dump (dev, node,NULL ,NULL );TAILQ_REMOVE (&dev->iotlb_list, node, next);
@@ -226,9 +226,9 @@ vhost_user_iotlb_cache_random_evict(struct virtio_net *dev) entry_idx =rte_rand () % dev->iotlb_cache_nr; - RTE_TAILQ_FOREACH_SAFE(node, &dev->iotlb_list, next, temp_node) { + TAILQ_FOREACH_SAFE(node, &dev->iotlb_list, next, temp_node) {if (!entry_idx) { -struct vhost_iotlb_entry *next_node =RTE_TAILQ_NEXT (node, next); +struct vhost_iotlb_entry *next_node =TAILQ_NEXT (node, next);vhost_user_iotlb_clear_dump (dev, node, prev_node, next_node);
@@ -314,13 +314,13 @@ vhost_user_iotlb_cache_remove(struct virtio_net *dev, uint64_t iova, uint64_t sivhost_user_iotlb_wr_lock_all (dev); - RTE_TAILQ_FOREACH_SAFE(node, &dev->iotlb_list, next, temp_node) { + TAILQ_FOREACH_SAFE(node, &dev->iotlb_list, next, temp_node) {/* Sorted list */ if (unlikely (iova + size < node->iova))break ;if (iova < node->iova + node->size) { -struct vhost_iotlb_entry *next_node =RTE_TAILQ_NEXT (node, next); +struct vhost_iotlb_entry *next_node =TAILQ_NEXT (node, next);vhost_user_iotlb_clear_dump (dev, node, prev_node, next_node);
lib/vhost/vdpa.c +1 -1
@@ -137,7 +137,7 @@ rte_vdpa_unregister_device(struct rte_vdpa_device *dev)int ret =-1 ;rte_spinlock_lock (&vdpa_device_list_lock); - RTE_TAILQ_FOREACH_SAFE(cur_dev, vdpa_device_list, next, tmp_dev) { + TAILQ_FOREACH_SAFE(cur_dev, vdpa_device_list, next, tmp_dev) {if (dev != cur_dev)continue ;
lib/vhost/vdpa_driver.h +1 -1
@@ -87,7 +87,7 @@ struct rte_vdpa_dev_ops {* vdpa device structure includes device address and device operations. */ struct rte_vdpa_device { -RTE_TAILQ_ENTRY (rte_vdpa_device) next; +TAILQ_ENTRY (rte_vdpa_device) next;/** Generic device information */ struct rte_device *device;/** vdpa device operations */
Signature · 1 line
2.53.0
PATCH 6/6 devtools: forbid direct use of sys/queue.h
In reply to Stephen HemmingerThe set of list macros provided by <sys/queue.h> differs per platform:
glibc lacks the _FOREACH_SAFE variants, and musl and Windows have no such header. DPDK now provides rte_queue.h with the complete set.
Both headers use the same multiple inclusion guard, so a single direct include of <sys/queue.h> anywhere in a translation unit disables rte_queue.h for all of it. Reject new occurrences.
--- devtools/checkpatches.sh | 9 +++++++++ doc/guides/contributing/coding_style.rst | 5 ++++- 2 files changed, 13 insertions(+), 1 deletion(-)
devtools/checkpatches.sh +9 -0
@@ -105,6 +105,15 @@ check_forbidden_additions() { # <patch> -f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \ "$1" || res=1 + # include rte_queue.h, the system header has fewer macros + awk -v FOLDERS="lib drivers app examples" \ + -v SKIP_FILES='lib/eal/include/rte_queue.h' \ + -v EXPRESSIONS='include.*<sys/queue.h>' \ + -v RET_ON_FAIL=1 \ + -v MESSAGE='Using <sys/queue.h>, prefer <rte_queue.h>' \ + -f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \ + "$1" || res=1 + # check %l or %ll format specifier awk -v FOLDERS='lib drivers app examples' \ -v EXPRESSIONS='%ll*[xud]' \
doc/guides/contributing/coding_style.rst +4 -1
@@ -317,11 +317,14 @@ Queues ~~~~~~ Use queue(3) macros rather than rolling your own lists, whenever possible. +Include ``<rte_queue.h>`` rather than ``<sys/queue.h>``: +the set of macros provided by the system header differs per platform, +and the DPDK one provides the same complete set everywhere. Thus, the previous example would be better written: .. code-block:: c - #include <sys/queue.h> + #include <rte_queue.h> struct foo { LIST_ENTRY(foo) link; /* Use queue macros for foo lists. */
Signature · 1 line
2.53.0
The patch set generally looks good to me, and ensures that DPDK itself builds. However, there might be a problem with building external applications IIUC: if DPDK header using any of the macros missing in system <sys/queue.h> is included after <sys/queue.h> the build will fail for reasons not immediately clear to the user.
I think this specific case can be improved in one of the following ways:
1. Remove the _SYS_QUEUE_H_ guard and undef or guard each macro independently (the file should still define _SYS_QUEUE_H_ to prevent the converse failure).
2. Detect the situation described above and provide more helpful diagnostic suggesting a workaround (remove <sys/queue.h> or move it after DPDK headers).
I myself prefer #1, since swapping or removing includes might be difficult in big projects.
Quoted 12 lines · Marat Khalili
The patch set generally looks good to me, and ensures that DPDK itself builds. However, there might be a problem with building external applications IIUC: if DPDK header using any of the macros missing in system <sys/queue.h> is included after <
sys/queue.h> the build will fail for reasons not immediately clear to the user.I think this specific case can be improved in one of the following ways:
1. Remove the _SYS_QUEUE_H_ guard and undef or guard each macro independently (the file should still define _SYS_QUEUE_H_ to prevent the converse failure).
Quoted 7 lines
2. Detect the situation described above and provide more helpful diagnostic suggesting a workaround (remove <
sys/queue.h> or move it after DPDK headers).I myself prefer #1, since swapping or removing includes might be difficult in big projects.
+1 to option #1. However, it probably doesn't need to be implemented for everything - just the extra macros not in normal linux queue.h