This is a first cleanup at trying to remove references to other dpdk libraries from eal.
This cleanup is focused on rte_tailq api which has been marked as "for internal use" for quite some time now. Rather than have a static list in eal for all users of rte_tailq, a new register system is introduced. This register system uses constructors which have no access to dpdk shared memory, so a two step registration is done: first step inserts the requested tailq in a local list ("local" in multi process context), then in second step, eal init allocates/looks up for a real tailq from shared memory for all elements of this local list. I have tried to think of different cases (libraries loaded before/after eal init...). The unit tests have been updated accordingly. -- David Marchand David Marchand (10): eal: remove yet another remaining reference to pm pci: use lookup tailq api tailq: remove unneeded inclusion of rte_tailq.h tailq: use a single cast macro tailq: get rid of broken "reserve" api tailq: remove unused RTE_EAL_TAILQ_* macros tailq: introduce dynamic register system tailq: move to dynamic tailq tailq: remove static slots eal: no need for E_RTE_NO_TAILQ anymore app/test-pipeline/config.c | 1 - app/test-pipeline/init.c | 1 - app/test-pipeline/main.c | 1 - app/test-pipeline/runtime.c | 1 - app/test-pmd/cmdline.c | 1 - app/test-pmd/config.c | 1 - app/test-pmd/csumonly.c | 1 - app/test-pmd/flowgen.c | 1 - app/test-pmd/ieee1588fwd.c | 1 - app/test-pmd/iofwd.c | 1 - app/test-pmd/macfwd-retry.c | 1 - app/test-pmd/macfwd.c | 1 - app/test-pmd/macswap.c | 1 - app/test-pmd/parameters.c | 1 - app/test-pmd/rxonly.c | 1 - app/test-pmd/testpmd.c | 1 - app/test-pmd/txonly.c | 1 - app/test/commands.c | 1 - app/test/test.c | 1 - app/test/test_atomic.c | 1 - app/test/test_errno.c | 2 +- app/test/test_func_reentrancy.c | 1 - app/test/test_hash.c | 1 - app/test/test_hash_perf.c | 1 - app/test/test_logs.c | 1 - app/test/test_malloc.c | 1 - app/test/test_mbuf.c | 1 - app/test/test_mempool.c | 1 - app/test/test_mempool_perf.c | 1 - app/test/test_memzone.c | 1 - app/test/test_mp_secondary.c | 1 - app/test/test_per_lcore.c | 1 - app/test/test_ring.c | 1 - app/test/test_rwlock.c | 1 - app/test/test_spinlock.c | 1 - app/test/test_tailq.c | 125 ++++++++-------- app/test/test_timer.c | 1 - examples/bond/main.c | 1 - examples/cmdline/main.c | 1 - examples/dpdk_qat/crypto.c | 1 - examples/dpdk_qat/main.c | 1 - examples/exception_path/main.c | 1 - examples/helloworld/main.c | 1 - examples/ip_fragmentation/main.c | 1 - examples/ip_pipeline/config.c | 1 - examples/ip_pipeline/init.c | 1 - examples/ip_pipeline/main.c | 1 - examples/ip_reassembly/main.c | 1 - examples/ipv4_multicast/main.c | 1 - examples/kni/main.c | 1 - examples/l2fwd-ivshmem/guest/guest.c | 1 - examples/l2fwd-jobstats/main.c | 1 - examples/l2fwd/main.c | 1 - examples/l3fwd-acl/main.c | 1 - examples/l3fwd-power/main.c | 1 - examples/l3fwd-vf/main.c | 1 - examples/l3fwd/main.c | 1 - examples/link_status_interrupt/main.c | 1 - examples/load_balancer/config.c | 1 - examples/load_balancer/init.c | 1 - examples/load_balancer/main.c | 1 - examples/load_balancer/runtime.c | 1 - .../client_server_mp/mp_client/client.c | 1 - .../client_server_mp/mp_server/init.c | 1 - .../client_server_mp/mp_server/main.c | 1 - examples/multi_process/l2fwd_fork/flib.c | 1 - examples/multi_process/l2fwd_fork/main.c | 1 - examples/multi_process/simple_mp/main.c | 1 - examples/multi_process/simple_mp/mp_commands.c | 1 - examples/multi_process/symmetric_mp/main.c | 1 - examples/timer/main.c | 1 - examples/vhost_xen/xen_vhost.h | 1 - examples/vhost_xen/xenstore_parse.c | 1 - examples/vmdq/main.c | 1 - examples/vmdq_dcb/main.c | 1 - lib/librte_acl/rte_acl.c | 33 ++--- lib/librte_acl/rte_acl.h | 1 - lib/librte_acl/rte_acl_osdep.h | 1 - lib/librte_distributor/rte_distributor.c | 17 ++- lib/librte_eal/bsdapp/eal/eal.c | 1 - lib/librte_eal/bsdapp/eal/eal_pci.c | 8 +- lib/librte_eal/bsdapp/eal/eal_thread.c | 1 - lib/librte_eal/bsdapp/eal/eal_timer.c | 1 - lib/librte_eal/bsdapp/eal/rte_eal_version.map | 4 +- lib/librte_eal/common/Makefile | 2 +- lib/librte_eal/common/eal_common_errno.c | 2 - lib/librte_eal/common/eal_common_launch.c | 1 - lib/librte_eal/common/eal_common_log.c | 1 - lib/librte_eal/common/eal_common_memory.c | 1 - lib/librte_eal/common/eal_common_memzone.c | 1 - lib/librte_eal/common/eal_common_pci.c | 1 - lib/librte_eal/common/eal_common_tailqs.c | 152 +++++++++++++------- lib/librte_eal/common/include/rte_eal.h | 58 -------- lib/librte_eal/common/include/rte_eal_memconfig.h | 9 -- lib/librte_eal/common/include/rte_errno.h | 1 - lib/librte_eal/common/include/rte_tailq.h | 133 ++++++----------- lib/librte_eal/common/include/rte_tailq_elem.h | 92 ------------ lib/librte_eal/linuxapp/eal/eal.c | 1 - lib/librte_eal/linuxapp/eal/eal_alarm.c | 1 - lib/librte_eal/linuxapp/eal/eal_hugepage_info.c | 1 - lib/librte_eal/linuxapp/eal/eal_interrupts.c | 1 - lib/librte_eal/linuxapp/eal/eal_ivshmem.c | 5 +- lib/librte_eal/linuxapp/eal/eal_log.c | 1 - lib/librte_eal/linuxapp/eal/eal_memory.c | 1 - lib/librte_eal/linuxapp/eal/eal_pci.c | 9 +- lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 1 - lib/librte_eal/linuxapp/eal/eal_pci_vfio.c | 1 - lib/librte_eal/linuxapp/eal/eal_pci_vfio_mp_sync.c | 1 - lib/librte_eal/linuxapp/eal/eal_thread.c | 1 - lib/librte_eal/linuxapp/eal/eal_timer.c | 1 - lib/librte_eal/linuxapp/eal/eal_xen_memory.c | 1 - lib/librte_eal/linuxapp/eal/rte_eal_version.map | 4 +- lib/librte_ether/rte_ethdev.c | 1 - lib/librte_hash/rte_fbk_hash.c | 33 ++--- lib/librte_hash/rte_fbk_hash.h | 1 - lib/librte_hash/rte_hash.c | 28 ++-- lib/librte_hash/rte_hash.h | 1 - lib/librte_ip_frag/rte_ipv4_reassembly.c | 1 - lib/librte_lpm/rte_lpm.c | 35 ++--- lib/librte_lpm/rte_lpm.h | 1 - lib/librte_lpm/rte_lpm6.c | 27 ++-- lib/librte_lpm/rte_lpm6.h | 1 - lib/librte_malloc/malloc_elem.c | 1 - lib/librte_malloc/malloc_heap.c | 1 - lib/librte_malloc/rte_malloc.c | 1 - lib/librte_mbuf/rte_mbuf.c | 1 - lib/librte_mempool/rte_dom0_mempool.c | 1 - lib/librte_mempool/rte_mempool.c | 37 ++--- lib/librte_mempool/rte_mempool.h | 3 - lib/librte_pmd_e1000/em_ethdev.c | 1 - lib/librte_pmd_e1000/em_rxtx.c | 1 - lib/librte_pmd_e1000/igb_ethdev.c | 1 - lib/librte_pmd_e1000/igb_rxtx.c | 1 - lib/librte_pmd_i40e/i40e_ethdev_vf.c | 1 - lib/librte_pmd_ixgbe/ixgbe_ethdev.c | 1 - lib/librte_pmd_ixgbe/ixgbe_rxtx.c | 1 - lib/librte_pmd_vmxnet3/vmxnet3_ethdev.c | 1 - lib/librte_pmd_vmxnet3/vmxnet3_rxtx.c | 1 - lib/librte_reorder/rte_reorder.c | 27 ++-- lib/librte_reorder/rte_reorder.h | 1 - lib/librte_ring/rte_ring.c | 28 ++-- lib/librte_ring/rte_ring.h | 3 +- lib/librte_timer/rte_timer.c | 2 +- 143 files changed, 310 insertions(+), 685 deletions(-) delete mode 100644 lib/librte_eal/common/include/rte_tailq_elem.h -- 1.7.10.4