eal: rte_tailq api cleanup
cover eal: rte_tailq api cleanup
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.
Signature · 162 lines
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
A message that is not in the archive (sent off-list or not yet received): 1425505810-9269-1-git-send-email-david.marchand-pdR9zngts4EAvxtiuMwx3w@public.gmane.org
PATCH 1/10 eal: remove yet another remaining reference to pm
Hopefully, this is the last reference to pm.
--- lib/librte_eal/common/include/rte_tailq_elem.h | 2 -- 1 file changed, 2 deletions(-)
lib/librte_eal/common/include/rte_tailq_elem.h +0 -2
@@ -78,8 +78,6 @@ rte_tailq_elem(RTE_TAILQ_LPM, "RTE_LPM") rte_tailq_elem(RTE_TAILQ_LPM6, "RTE_LPM6") -rte_tailq_elem(RTE_TAILQ_PM, "RTE_PM") - rte_tailq_elem(RTE_TAILQ_ACL, "RTE_ACL")rte_tailq_elem (RTE_TAILQ_DISTRIBUTOR ,"RTE_DISTRIBUTOR" )
Signature · 1 line
1.7.10.4
PATCH 2/10 pci: use lookup tailq api
In reply to a message not in the archiveThere is no reason why we should use the "reserve" tailq api, since the pci entry is already statically reserved.
--- lib/librte_eal/bsdapp/eal/eal_pci.c | 2 +- lib/librte_eal/linuxapp/eal/eal_pci.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
lib/librte_eal/bsdapp/eal/eal_pci.c +1 -1
@@ -493,7 +493,7 @@ rte_eal_pci_init(void) {TAILQ_INIT (&pci_driver_list);TAILQ_INIT (&pci_device_list); - uio_res_list =RTE_TAILQ_RESERVE_BY_IDX (RTE_TAILQ_PCI , uio_res_list); + uio_res_list =RTE_TAILQ_LOOKUP_BY_IDX (RTE_TAILQ_PCI , uio_res_list);/* for debug purposes, PCI can be disabled */ if (internal_config.no_pci)
lib/librte_eal/linuxapp/eal/eal_pci.c +2 -2
@@ -766,8 +766,8 @@ rte_eal_pci_init(void) {TAILQ_INIT (&pci_driver_list);TAILQ_INIT (&pci_device_list); - pci_res_list =RTE_TAILQ_RESERVE_BY_IDX (RTE_TAILQ_PCI , - mapped_pci_res_list); + pci_res_list =RTE_TAILQ_LOOKUP_BY_IDX (RTE_TAILQ_PCI , + mapped_pci_res_list);/* for debug purposes, PCI can be disabled */ if (internal_config.no_pci)
Signature · 1 line
1.7.10.4
PATCH 3/10 tailq: remove unneeded inclusion of rte_tailq.h
In reply to a message not in the archiveOnly keep inclusion where really needed.
--- 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_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 | 1 - 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 - examples/multi_process/client_server_mp/mp_client/client.c | 1 - examples/multi_process/client_server_mp/mp_server/init.c | 1 - examples/multi_process/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_osdep.h | 1 - lib/librte_distributor/rte_distributor.c | 1 - lib/librte_eal/bsdapp/eal/eal.c | 1 - lib/librte_eal/bsdapp/eal/eal_pci.c | 1 - lib/librte_eal/bsdapp/eal/eal_thread.c | 1 - lib/librte_eal/bsdapp/eal/eal_timer.c | 1 - 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 | 1 - 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_log.c | 1 - lib/librte_eal/linuxapp/eal/eal_memory.c | 1 - lib/librte_eal/linuxapp/eal/eal_pci.c | 1 - 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_ether/rte_ethdev.c | 1 - lib/librte_hash/rte_fbk_hash.c | 1 - lib/librte_hash/rte_hash.c | 1 - lib/librte_ip_frag/rte_ipv4_reassembly.c | 1 - lib/librte_lpm/rte_lpm.c | 1 - lib/librte_lpm/rte_lpm6.c | 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 | 1 - 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 | 1 - lib/librte_ring/rte_ring.c | 1 - lib/librte_timer/rte_timer.c | 2 +- 123 files changed, 1 insertion(+), 123 deletions(-)
app/test-pipeline/config.c +0 -1
@@ -48,7 +48,6 @@#include <rte_memory.h> #include <rte_memcpy.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_launch.h>
app/test-pipeline/init.c +0 -1
@@ -48,7 +48,6 @@#include <rte_memory.h> #include <rte_memcpy.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_launch.h>
app/test-pipeline/main.c +0 -1
@@ -49,7 +49,6 @@#include <rte_memory.h> #include <rte_memcpy.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_launch.h>
app/test-pipeline/runtime.c +0 -1
@@ -48,7 +48,6 @@#include <rte_memory.h> #include <rte_memcpy.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_launch.h>
app/test-pmd/cmdline.c +0 -1
@@ -61,7 +61,6 @@#include <rte_memzone.h> #include <rte_malloc.h> #include <rte_launch.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_lcore.h>
app/test-pmd/config.c +0 -1
@@ -79,7 +79,6 @@#include <rte_memcpy.h> #include <rte_memzone.h> #include <rte_launch.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_lcore.h>
app/test-pmd/csumonly.c +0 -1
@@ -51,7 +51,6 @@#include <rte_memcpy.h> #include <rte_memzone.h> #include <rte_launch.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_lcore.h>
app/test-pmd/flowgen.c +0 -1
@@ -52,7 +52,6 @@#include <rte_memcpy.h> #include <rte_memzone.h> #include <rte_launch.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_lcore.h>
app/test-pmd/ieee1588fwd.c +0 -1
@@ -50,7 +50,6 @@#include <rte_memory.h> #include <rte_memzone.h> #include <rte_launch.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_lcore.h>
app/test-pmd/iofwd.c +0 -1
@@ -50,7 +50,6 @@#include <rte_memory.h> #include <rte_memzone.h> #include <rte_launch.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_lcore.h>
app/test-pmd/macfwd-retry.c +0 -1
@@ -51,7 +51,6 @@#include <rte_memcpy.h> #include <rte_memzone.h> #include <rte_launch.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_lcore.h>
app/test-pmd/macfwd.c +0 -1
@@ -51,7 +51,6 @@#include <rte_memcpy.h> #include <rte_memzone.h> #include <rte_launch.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_lcore.h>
app/test-pmd/macswap.c +0 -1
@@ -51,7 +51,6 @@#include <rte_memcpy.h> #include <rte_memzone.h> #include <rte_launch.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_lcore.h>
app/test-pmd/parameters.c +0 -1
@@ -58,7 +58,6 @@#include <rte_memory.h> #include <rte_memzone.h> #include <rte_launch.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_lcore.h>
app/test-pmd/rxonly.c +0 -1
@@ -51,7 +51,6 @@#include <rte_memcpy.h> #include <rte_memzone.h> #include <rte_launch.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_lcore.h>
app/test-pmd/testpmd.c +0 -1
@@ -57,7 +57,6 @@#include <rte_memcpy.h> #include <rte_memzone.h> #include <rte_launch.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_lcore.h>
app/test-pmd/txonly.c +0 -1
@@ -51,7 +51,6 @@#include <rte_memcpy.h> #include <rte_memzone.h> #include <rte_launch.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_lcore.h>
app/test/commands.c +0 -1
@@ -56,7 +56,6 @@#include <rte_memzone.h> #include <rte_launch.h> #include <rte_cycles.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_lcore.h>
app/test/test.c +0 -1
@@ -51,7 +51,6 @@ extern cmdline_parse_ctx_t main_ctx[];#include <rte_memory.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_cycles.h> #include <rte_log.h>
app/test/test_atomic.c +0 -1
@@ -41,7 +41,6 @@#include <rte_per_lcore.h> #include <rte_launch.h> #include <rte_atomic.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_lcore.h>
app/test/test_func_reentrancy.c +0 -1
@@ -47,7 +47,6 @@#include <rte_memzone.h> #include <rte_launch.h> #include <rte_cycles.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_lcore.h>
app/test/test_hash.c +0 -1
@@ -45,7 +45,6 @@#include <rte_random.h> #include <rte_memory.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_ip.h> #include <rte_string_fns.h>
app/test/test_hash_perf.c +0 -1
@@ -46,7 +46,6 @@#include <rte_random.h> #include <rte_memory.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_ip.h> #include <rte_string_fns.h>
app/test/test_logs.c +0 -1
@@ -40,7 +40,6 @@#include <rte_memory.h> #include <rte_memzone.h> #include <rte_launch.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_lcore.h>
app/test/test_malloc.c +0 -1
@@ -44,7 +44,6 @@#include <rte_memzone.h> #include <rte_per_lcore.h> #include <rte_launch.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_lcore.h>
app/test/test_mbuf.c +0 -1
@@ -48,7 +48,6 @@#include <rte_memcpy.h> #include <rte_memzone.h> #include <rte_launch.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_lcore.h>
app/test/test_mempool.c +0 -1
@@ -47,7 +47,6 @@#include <rte_memzone.h> #include <rte_launch.h> #include <rte_cycles.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_lcore.h>
app/test/test_mempool_perf.c +0 -1
@@ -47,7 +47,6 @@#include <rte_memzone.h> #include <rte_launch.h> #include <rte_cycles.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_lcore.h>
app/test/test_memzone.c +0 -1
@@ -40,7 +40,6 @@#include <rte_cycles.h> #include <rte_memory.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_eal_memconfig.h> #include <rte_common.h>
app/test/test_mp_secondary.c +0 -1
@@ -55,7 +55,6 @@#include <rte_common.h> #include <rte_memory.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_launch.h> #include <rte_per_lcore.h>
app/test/test_per_lcore.c +0 -1
@@ -40,7 +40,6 @@#include <rte_memzone.h> #include <rte_per_lcore.h> #include <rte_launch.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_lcore.h>
app/test/test_ring.c +0 -1
@@ -46,7 +46,6 @@#include <rte_memzone.h> #include <rte_launch.h> #include <rte_cycles.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_lcore.h>
app/test/test_rwlock.c +0 -1
@@ -43,7 +43,6 @@#include <rte_launch.h> #include <rte_atomic.h> #include <rte_rwlock.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_lcore.h>
app/test/test_spinlock.c +0 -1
@@ -43,7 +43,6 @@#include <rte_memzone.h> #include <rte_per_lcore.h> #include <rte_launch.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_lcore.h>
app/test/test_tailq.c +0 -1
@@ -40,7 +40,6 @@#include <rte_eal.h> #include <rte_eal_memconfig.h> #include <rte_string_fns.h> -#include <rte_tailq.h> #include "test.h"
app/test/test_timer.c +0 -1
@@ -129,7 +129,6 @@#include <rte_memzone.h> #include <rte_launch.h> #include <rte_cycles.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_lcore.h>
examples/bond/main.c +0 -1
@@ -51,7 +51,6 @@#include <rte_memory.h> #include <rte_memcpy.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_launch.h>
examples/cmdline/main.c +0 -1
@@ -72,7 +72,6 @@#include <rte_memory.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_debug.h>
examples/dpdk_qat/crypto.c +0 -1
@@ -45,7 +45,6 @@#include <rte_debug.h> #include <rte_memory.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_ether.h> #include <rte_malloc.h> #include <rte_launch.h>
examples/dpdk_qat/main.c +0 -1
@@ -47,7 +47,6 @@#include <rte_log.h> #include <rte_memory.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_launch.h>
examples/exception_path/main.c +0 -1
@@ -54,7 +54,6 @@#include <rte_memory.h> #include <rte_memcpy.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_launch.h>
examples/helloworld/main.c +0 -1
@@ -40,7 +40,6 @@#include <rte_memory.h> #include <rte_memzone.h> #include <rte_launch.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_lcore.h>
examples/ip_fragmentation/main.c +0 -1
@@ -49,7 +49,6 @@#include <rte_memory.h> #include <rte_memcpy.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_launch.h>
examples/ip_pipeline/config.c +0 -1
@@ -48,7 +48,6 @@#include <rte_memory.h> #include <rte_memcpy.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_launch.h>
examples/ip_pipeline/init.c +0 -1
@@ -48,7 +48,6 @@#include <rte_memory.h> #include <rte_memcpy.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_launch.h>
examples/ip_pipeline/main.c +0 -1
@@ -49,7 +49,6 @@#include <rte_memory.h> #include <rte_memcpy.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_launch.h>
examples/ip_reassembly/main.c +0 -1
@@ -50,7 +50,6 @@#include <rte_memory.h> #include <rte_memcpy.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_launch.h>
examples/ipv4_multicast/main.c +0 -1
@@ -45,7 +45,6 @@#include <rte_common.h> #include <rte_byteorder.h> #include <rte_log.h> -#include <rte_tailq.h> #include <rte_memory.h> #include <rte_memcpy.h> #include <rte_memzone.h>
examples/kni/main.c +0 -1
@@ -54,7 +54,6 @@#include <rte_memory.h> #include <rte_memcpy.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_launch.h>
examples/l2fwd-ivshmem/guest/guest.c +0 -1
@@ -55,7 +55,6 @@#include <rte_memory.h> #include <rte_memcpy.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_launch.h>
examples/l2fwd-jobstats/main.c +0 -1
@@ -44,7 +44,6 @@#include <rte_memory.h> #include <rte_memcpy.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_launch.h>
examples/l2fwd/main.c +0 -1
@@ -50,7 +50,6 @@#include <rte_memory.h> #include <rte_memcpy.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_launch.h>
examples/l3fwd-acl/main.c +0 -1
@@ -48,7 +48,6 @@#include <rte_memory.h> #include <rte_memcpy.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_launch.h>
examples/l3fwd-power/main.c +0 -1
@@ -50,7 +50,6 @@#include <rte_memory.h> #include <rte_memcpy.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_launch.h>
examples/l3fwd-vf/main.c +0 -1
@@ -49,7 +49,6 @@#include <rte_memory.h> #include <rte_memcpy.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_launch.h>
examples/l3fwd/main.c +0 -1
@@ -49,7 +49,6 @@#include <rte_memory.h> #include <rte_memcpy.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_launch.h>
examples/link_status_interrupt/main.c +0 -1
@@ -51,7 +51,6 @@#include <rte_memory.h> #include <rte_memcpy.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_launch.h>
examples/load_balancer/config.c +0 -1
@@ -48,7 +48,6 @@#include <rte_memory.h> #include <rte_memcpy.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_launch.h>
examples/load_balancer/init.c +0 -1
@@ -48,7 +48,6 @@#include <rte_memory.h> #include <rte_memcpy.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_launch.h>
examples/load_balancer/main.c +0 -1
@@ -49,7 +49,6 @@#include <rte_memory.h> #include <rte_memcpy.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_launch.h>
examples/load_balancer/runtime.c +0 -1
@@ -48,7 +48,6 @@#include <rte_memory.h> #include <rte_memcpy.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_launch.h>
examples/multi_process/client_server_mp/mp_client/client.c +0 -1
@@ -44,7 +44,6 @@#include <rte_common.h> #include <rte_memory.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_atomic.h> #include <rte_branch_prediction.h>
examples/multi_process/client_server_mp/mp_server/init.c +0 -1
@@ -42,7 +42,6 @@#include <rte_common.h> #include <rte_memory.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_byteorder.h> #include <rte_atomic.h>
examples/multi_process/client_server_mp/mp_server/main.c +0 -1
@@ -46,7 +46,6 @@#include <rte_common.h> #include <rte_memory.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_byteorder.h> #include <rte_launch.h>
examples/multi_process/l2fwd_fork/flib.c +0 -1
@@ -55,7 +55,6 @@#include <rte_memory.h> #include <rte_memcpy.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_launch.h>
examples/multi_process/l2fwd_fork/main.c +0 -1
@@ -52,7 +52,6 @@#include <rte_memory.h> #include <rte_memcpy.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_launch.h>
examples/multi_process/simple_mp/main.c +0 -1
@@ -56,7 +56,6 @@#include <rte_memory.h> #include <rte_memzone.h> #include <rte_launch.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_lcore.h>
examples/multi_process/simple_mp/mp_commands.c +0 -1
@@ -43,7 +43,6 @@#include <rte_common.h> #include <rte_memory.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_atomic.h> #include <rte_branch_prediction.h>
examples/multi_process/symmetric_mp/main.c +0 -1
@@ -58,7 +58,6 @@#include <rte_memory.h> #include <rte_memzone.h> #include <rte_launch.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_lcore.h>
examples/timer/main.c +0 -1
@@ -41,7 +41,6 @@#include <rte_memory.h> #include <rte_memzone.h> #include <rte_launch.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_lcore.h>
examples/vhost_xen/xen_vhost.h +0 -1
@@ -36,7 +36,6 @@#include <stdint.h> -#include <rte_tailq.h> #include <rte_ether.h> #include "virtio-net.h"
examples/vhost_xen/xenstore_parse.c +0 -1
@@ -49,7 +49,6 @@#include <rte_common.h> #include <rte_memory.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_malloc.h> #include <rte_string_fns.h>
examples/vmdq/main.c +0 -1
@@ -48,7 +48,6 @@#include <rte_memory.h> #include <rte_memcpy.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_launch.h>
examples/vmdq_dcb/main.c +0 -1
@@ -48,7 +48,6 @@#include <rte_memory.h> #include <rte_memcpy.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_launch.h>
lib/librte_acl/rte_acl_osdep.h +0 -1
@@ -70,7 +70,6 @@#include <rte_branch_prediction.h> #include <rte_memzone.h> #include <rte_malloc.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_eal_memconfig.h> #include <rte_per_lcore.h>
lib/librte_distributor/rte_distributor.c +0 -1
@@ -39,7 +39,6 @@#include <rte_memzone.h> #include <rte_errno.h> #include <rte_string_fns.h> -#include <rte_tailq.h> #include <rte_eal_memconfig.h> #include "rte_distributor.h"
lib/librte_eal/bsdapp/eal/eal.c +0 -1
@@ -54,7 +54,6 @@#include <rte_memory.h> #include <rte_memzone.h> #include <rte_launch.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_eal_memconfig.h> #include <rte_per_lcore.h>
lib/librte_eal/bsdapp/eal/eal_pci.c +0 -1
@@ -58,7 +58,6 @@#include <rte_launch.h> #include <rte_memory.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_eal_memconfig.h> #include <rte_per_lcore.h>
lib/librte_eal/bsdapp/eal/eal_thread.c +0 -1
@@ -48,7 +48,6 @@#include <rte_memory.h> #include <rte_memzone.h> #include <rte_per_lcore.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_lcore.h>
lib/librte_eal/bsdapp/eal/eal_timer.c +0 -1
@@ -41,7 +41,6 @@#include <rte_common.h> #include <rte_log.h> #include <rte_cycles.h> -#include <rte_tailq.h> #include <rte_memory.h> #include <rte_memzone.h> #include <rte_eal.h>
lib/librte_eal/common/eal_common_launch.c +0 -1
@@ -39,7 +39,6 @@#include <rte_launch.h> #include <rte_memory.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_atomic.h> #include <rte_per_lcore.h>
lib/librte_eal/common/eal_common_log.c +0 -1
@@ -48,7 +48,6 @@#include <rte_launch.h> #include <rte_common.h> #include <rte_cycles.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_lcore.h>
lib/librte_eal/common/eal_common_memory.c +0 -1
@@ -40,7 +40,6 @@#include <rte_memory.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_eal_memconfig.h> #include <rte_log.h>
lib/librte_eal/common/eal_common_memzone.c +0 -1
@@ -43,7 +43,6 @@#include <rte_log.h> #include <rte_memory.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_eal_memconfig.h> #include <rte_per_lcore.h>
lib/librte_eal/common/eal_common_pci.c +0 -1
@@ -74,7 +74,6 @@#include <rte_per_lcore.h> #include <rte_memory.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_string_fns.h> #include <rte_common.h>
lib/librte_eal/common/eal_common_tailqs.c +0 -1
@@ -42,7 +42,6 @@#include <rte_memory.h> #include <rte_memzone.h> #include <rte_launch.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_eal_memconfig.h> #include <rte_per_lcore.h>
lib/librte_eal/linuxapp/eal/eal.c +0 -1
@@ -59,7 +59,6 @@#include <rte_memory.h> #include <rte_memzone.h> #include <rte_launch.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_eal_memconfig.h> #include <rte_per_lcore.h>
lib/librte_eal/linuxapp/eal/eal_alarm.c +0 -1
@@ -45,7 +45,6 @@#include <rte_alarm.h> #include <rte_common.h> #include <rte_per_lcore.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_launch.h> #include <rte_lcore.h>
lib/librte_eal/linuxapp/eal/eal_hugepage_info.c +0 -1
@@ -47,7 +47,6 @@#include <rte_memory.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_launch.h> #include <rte_per_lcore.h>
lib/librte_eal/linuxapp/eal/eal_interrupts.c +0 -1
@@ -50,7 +50,6 @@#include <rte_memory.h> #include <rte_memzone.h> #include <rte_launch.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_lcore.h>
lib/librte_eal/linuxapp/eal/eal_log.c +0 -1
@@ -40,7 +40,6 @@#include <rte_memory.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_launch.h> #include <rte_per_lcore.h>
lib/librte_eal/linuxapp/eal/eal_memory.c +0 -1
@@ -85,7 +85,6 @@#include <rte_memory.h> #include <rte_memzone.h> #include <rte_launch.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_eal_memconfig.h> #include <rte_per_lcore.h>
lib/librte_eal/linuxapp/eal/eal_pci.c +0 -1
@@ -37,7 +37,6 @@#include <rte_log.h> #include <rte_pci.h> -#include <rte_tailq.h> #include <rte_eal_memconfig.h> #include <rte_malloc.h> #include <rte_devargs.h>
lib/librte_eal/linuxapp/eal/eal_pci_uio.c +0 -1
@@ -43,7 +43,6 @@#include <rte_pci.h> #include <rte_common.h> #include <rte_malloc.h> -#include <rte_tailq.h> #include "rte_pci_dev_ids.h" #include "eal_filesystem.h"
lib/librte_eal/linuxapp/eal/eal_pci_vfio.c +0 -1
@@ -41,7 +41,6 @@#include <rte_log.h> #include <rte_pci.h> -#include <rte_tailq.h> #include <rte_eal_memconfig.h> #include <rte_malloc.h> #include <eal_private.h>
lib/librte_eal/linuxapp/eal/eal_pci_vfio_mp_sync.c +0 -1
@@ -49,7 +49,6 @@#include <rte_log.h> #include <rte_pci.h> -#include <rte_tailq.h> #include <rte_eal_memconfig.h> #include <rte_malloc.h>
lib/librte_eal/linuxapp/eal/eal_thread.c +0 -1
@@ -48,7 +48,6 @@#include <rte_memory.h> #include <rte_memzone.h> #include <rte_per_lcore.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_lcore.h>
lib/librte_eal/linuxapp/eal/eal_timer.c +0 -1
@@ -47,7 +47,6 @@#include <rte_common.h> #include <rte_log.h> #include <rte_cycles.h> -#include <rte_tailq.h> #include <rte_memory.h> #include <rte_memzone.h> #include <rte_eal.h>
lib/librte_eal/linuxapp/eal/eal_xen_memory.c +0 -1
@@ -54,7 +54,6 @@#include <rte_memory.h> #include <rte_memzone.h> #include <rte_launch.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_eal_memconfig.h> #include <rte_per_lcore.h>
lib/librte_ether/rte_ethdev.c +0 -1
@@ -52,7 +52,6 @@#include <rte_memcpy.h> #include <rte_memzone.h> #include <rte_launch.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_lcore.h>
lib/librte_hash/rte_fbk_hash.c +0 -1
@@ -40,7 +40,6 @@#include <sys/queue.h> #include <rte_memory.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_eal_memconfig.h> #include <rte_malloc.h>
lib/librte_hash/rte_hash.c +0 -1
@@ -46,7 +46,6 @@#include <rte_branch_prediction.h> #include <rte_memzone.h> #include <rte_malloc.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_eal_memconfig.h> #include <rte_per_lcore.h>
lib/librte_ip_frag/rte_ipv4_reassembly.c +0 -1
@@ -34,7 +34,6 @@#include <stddef.h> #include <rte_debug.h> -#include <rte_tailq.h> #include "ip_frag_common.h"
lib/librte_lpm/rte_lpm.c +0 -1
@@ -45,7 +45,6 @@#include <rte_memory.h> /* for definition of RTE_CACHE_LINE_SIZE */ #include <rte_malloc.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_eal_memconfig.h> #include <rte_per_lcore.h>
lib/librte_lpm/rte_lpm6.c +0 -1
@@ -45,7 +45,6 @@#include <rte_malloc.h> #include <rte_memzone.h> #include <rte_memcpy.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_eal_memconfig.h> #include <rte_per_lcore.h>
lib/librte_malloc/malloc_elem.c +0 -1
@@ -38,7 +38,6 @@#include <rte_memory.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_launch.h> #include <rte_per_lcore.h>
lib/librte_malloc/malloc_heap.c +0 -1
@@ -40,7 +40,6 @@#include <rte_memory.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_eal_memconfig.h> #include <rte_launch.h>
lib/librte_malloc/rte_malloc.c +0 -1
@@ -40,7 +40,6 @@#include <rte_memcpy.h> #include <rte_memory.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_eal_memconfig.h> #include <rte_branch_prediction.h>
lib/librte_mbuf/rte_mbuf.c +0 -1
@@ -48,7 +48,6 @@#include <rte_memory.h> #include <rte_memzone.h> #include <rte_launch.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_lcore.h>
lib/librte_mempool/rte_dom0_mempool.c +0 -1
@@ -47,7 +47,6 @@#include <rte_memzone.h> #include <rte_atomic.h> #include <rte_launch.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_eal_memconfig.h> #include <rte_per_lcore.h>
lib/librte_mempool/rte_mempool.c +0 -1
@@ -48,7 +48,6 @@#include <rte_malloc.h> #include <rte_atomic.h> #include <rte_launch.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_eal_memconfig.h> #include <rte_per_lcore.h>
lib/librte_pmd_e1000/em_ethdev.c +0 -1
@@ -47,7 +47,6 @@#include <rte_ethdev.h> #include <rte_memory.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_atomic.h> #include <rte_malloc.h>
lib/librte_pmd_e1000/em_rxtx.c +0 -1
@@ -51,7 +51,6 @@#include <rte_memcpy.h> #include <rte_memzone.h> #include <rte_launch.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_lcore.h>
lib/librte_pmd_e1000/igb_ethdev.c +0 -1
@@ -47,7 +47,6 @@#include <rte_ethdev.h> #include <rte_memory.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_atomic.h> #include <rte_malloc.h>
lib/librte_pmd_e1000/igb_rxtx.c +0 -1
@@ -51,7 +51,6 @@#include <rte_memcpy.h> #include <rte_memzone.h> #include <rte_launch.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_lcore.h>
lib/librte_pmd_i40e/i40e_ethdev_vf.c +0 -1
@@ -51,7 +51,6 @@#include <rte_branch_prediction.h> #include <rte_memory.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_alarm.h> #include <rte_ether.h>
lib/librte_pmd_ixgbe/ixgbe_ethdev.c +0 -1
@@ -52,7 +52,6 @@#include <rte_branch_prediction.h> #include <rte_memory.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_alarm.h> #include <rte_ether.h>
lib/librte_pmd_ixgbe/ixgbe_rxtx.c +0 -1
@@ -53,7 +53,6 @@#include <rte_memory.h> #include <rte_memzone.h> #include <rte_launch.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_lcore.h>
lib/librte_pmd_vmxnet3/vmxnet3_ethdev.c +0 -1
@@ -52,7 +52,6 @@#include <rte_branch_prediction.h> #include <rte_memory.h> #include <rte_memzone.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_alarm.h> #include <rte_ether.h>
lib/librte_pmd_vmxnet3/vmxnet3_rxtx.c +0 -1
@@ -52,7 +52,6 @@#include <rte_memory.h> #include <rte_memzone.h> #include <rte_launch.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_lcore.h>
lib/librte_reorder/rte_reorder.c +0 -1
@@ -39,7 +39,6 @@#include <rte_memzone.h> #include <rte_eal_memconfig.h> #include <rte_errno.h> -#include <rte_tailq.h> #include <rte_malloc.h> #include "rte_reorder.h"
lib/librte_ring/rte_ring.c +0 -1
@@ -77,7 +77,6 @@#include <rte_memzone.h> #include <rte_malloc.h> #include <rte_launch.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_eal_memconfig.h> #include <rte_atomic.h>
lib/librte_timer/rte_timer.c +1 -1
@@ -36,6 +36,7 @@#include <stdint.h> #include <inttypes.h> #include <assert.h> +#include <sys/queue.h> #include <rte_atomic.h> #include <rte_common.h>
@@ -44,7 +45,6 @@#include <rte_memory.h> #include <rte_memzone.h> #include <rte_launch.h> -#include <rte_tailq.h> #include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_lcore.h>
Signature · 1 line
1.7.10.4
PATCH 4/10 tailq: use a single cast macro
In reply to a message not in the archiveNo need to cast everywhere, define a common macro for this, plus it can be used in future commits.
--- lib/librte_eal/common/include/rte_tailq.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)
lib/librte_eal/common/include/rte_tailq.h +10 -4
@@ -70,6 +70,12 @@ struct rte_tailq_head { };/** +* Return the first tailq entry casted to the right struct. +*/ +#define RTE_TAILQ_CAST (tailq_entry, struct_name) \ + (struct struct_name *)&(tailq_entry)->tailq_head + +/** * Utility macro to make reserving a tailqueue for a particular struct easier. * * @param name
@@ -86,7 +92,7 @@ struct rte_tailq_head {* element in the rte_tailq_head structure. */ #define RTE_TAILQ_RESERVE (name, struct_name) \ - (struct struct_name *)(&rte_eal_tailq_reserve(name)->tailq_head) + RTE_TAILQ_CAST(rte_eal_tailq_reserve(name), struct_name)/** * Utility macro to make reserving a tailqueue for a particular struct easier.
@@ -106,7 +112,7 @@ struct rte_tailq_head {* element in the rte_tailq_head structure. */ #define RTE_TAILQ_RESERVE_BY_IDX (idx, struct_name) \ - (struct struct_name *)(&rte_eal_tailq_reserve_by_idx(idx)->tailq_head) + RTE_TAILQ_CAST(rte_eal_tailq_reserve_by_idx(idx), struct_name)/** * Utility macro to make looking up a tailqueue for a particular struct easier.
@@ -125,7 +131,7 @@ struct rte_tailq_head {* element in the rte_tailq_head structure. */ #define RTE_TAILQ_LOOKUP (name, struct_name) \ - (struct struct_name *)(&rte_eal_tailq_lookup(name)->tailq_head) + RTE_TAILQ_CAST(rte_eal_tailq_lookup(name), struct_name)/** * Utility macro to make looking up a tailqueue for a particular struct easier.
@@ -144,7 +150,7 @@ struct rte_tailq_head {* element in the rte_tailq_head structure. */ #define RTE_TAILQ_LOOKUP_BY_IDX (idx, struct_name) \ - (struct struct_name *)(&rte_eal_tailq_lookup_by_idx(idx)->tailq_head) + RTE_TAILQ_CAST(rte_eal_tailq_lookup_by_idx(idx), struct_name)/** * Reserve a slot in the tailq list for a particular tailq header
Signature · 1 line
1.7.10.4
PATCH 5/10 tailq: get rid of broken "reserve" api
In reply to a message not in the archiveThe "reserve" macros and functions do not check if the requested entry is free. They do nothing more than the lookup function (which itself "creates" entries ...).
The rte_tailq api is marked as "internal use" in documentation and these macros are only used in test application, so just get rid of them.
--- app/test/test_tailq.c | 48 +-------------- lib/librte_eal/bsdapp/eal/rte_eal_version.map | 2 - lib/librte_eal/common/eal_common_tailqs.c | 12 ---- lib/librte_eal/common/include/rte_tailq.h | 75 ++--------------------- lib/librte_eal/linuxapp/eal/rte_eal_version.map | 2 - 5 files changed, 9 insertions(+), 130 deletions(-)
app/test/test_tailq.c +3 -45
@@ -60,7 +60,7 @@ test_tailq_create(void)unsigned i;/* create a first tailq and check its non-null */ - d_head =RTE_TAILQ_RESERVE_BY_IDX (DEFAULT_TAILQ , rte_tailq_entry_head); + d_head =RTE_TAILQ_LOOKUP_BY_IDX (DEFAULT_TAILQ , rte_tailq_entry_head);if (d_head ==NULL )do_return ("Error allocating dummy_q0\n" );
@@ -69,13 +69,13 @@ test_tailq_create(void)TAILQ_INSERT_TAIL (d_head, &d_elem, next);/* try allocating dummy_q0 again, and check for failure */ -if (RTE_TAILQ_RESERVE_BY_IDX (DEFAULT_TAILQ , rte_tailq_entry_head) ==NULL ) +if (RTE_TAILQ_LOOKUP_BY_IDX (DEFAULT_TAILQ , rte_tailq_entry_head) ==NULL )do_return ("Error, non-null result returned when attemption to " "re-allocate a tailq\n" );/* now fill up the tailq slots available and check we get an error */ for (i =RTE_TAILQ_NUM ; i <RTE_MAX_TAILQ ; i++){ -if ((d_head =RTE_TAILQ_RESERVE_BY_IDX (i, +if ((d_head =RTE_TAILQ_LOOKUP_BY_IDX (i, rte_tailq_entry_head)) ==NULL )break ; }
@@ -111,54 +111,12 @@ test_tailq_lookup(void)return 0 ; } -/* test for deprecated functions - mainly for coverage */ -static int -test_tailq_deprecated (void ) -{ -struct rte_tailq_entry_head *d_head; - -/* since TAILQ_RESERVE is not able to create new tailqs, -* we should find an existing one (IOW, RTE_TAILQ_RESERVE behaves identical -* to RTE_TAILQ_LOOKUP). -* -* PCI_RESOURCE_LIST tailq is guaranteed to -* be present in any DPDK app. */ - d_head =RTE_TAILQ_RESERVE ("PCI_RESOURCE_LIST" , rte_tailq_entry_head); -if (d_head ==NULL ) -do_return ("Error finding PCI_RESOURCE_LIST\n" ); - - d_head =RTE_TAILQ_LOOKUP ("PCI_RESOURCE_LIST" , rte_tailq_entry_head); -if (d_head ==NULL ) -do_return ("Error finding PCI_RESOURCE_LIST\n" ); - -/* try doing that with non-existent names */ - d_head =RTE_TAILQ_RESERVE ("random name" , rte_tailq_entry_head); -if (d_head !=NULL ) -do_return ("Non-existent tailq found!\n" ); - - d_head =RTE_TAILQ_LOOKUP ("random name" , rte_tailq_entry_head); -if (d_head !=NULL ) -do_return ("Non-existent tailq found!\n" ); - -/* try doing the same with NULL names */ - d_head =RTE_TAILQ_RESERVE (NULL , rte_tailq_entry_head); -if (d_head !=NULL ) -do_return ("NULL tailq found!\n" ); - - d_head =RTE_TAILQ_LOOKUP (NULL , rte_tailq_entry_head); -if (d_head !=NULL ) -do_return ("NULL tailq found!\n" ); - -return 0 ; -} -static int test_tailq (void ) {int ret =0 ; ret |=test_tailq_create (); ret |=test_tailq_lookup (); - ret |=test_tailq_deprecated ();return ret; }
lib/librte_eal/bsdapp/eal/rte_eal_version.map +0 -2
@@ -45,8 +45,6 @@ DPDK_2.0 { rte_eal_remote_launch; rte_eal_tailq_lookup; rte_eal_tailq_lookup_by_idx; - rte_eal_tailq_reserve; - rte_eal_tailq_reserve_by_idx; rte_eal_wait_lcore; rte_exit; rte_get_hpet_cycles;
lib/librte_eal/common/eal_common_tailqs.c +0 -12
@@ -94,18 +94,6 @@ rte_eal_tailq_lookup_by_idx(const unsigned tailq_idx)return &mcfg->tailq_head[tailq_idx]; } -struct rte_tailq_head * -rte_eal_tailq_reserve (const char *name) -{ -return rte_eal_tailq_lookup (name); -} - -inline struct rte_tailq_head * -rte_eal_tailq_reserve_by_idx (const unsigned tailq_idx) -{ -return rte_eal_tailq_lookup_by_idx (tailq_idx); -} -void rte_dump_tailq (FILE *f) {
lib/librte_eal/common/include/rte_tailq.h +6 -69
101 lines not on this page · raw message
lib/librte_eal/linuxapp/eal/rte_eal_version.map +0 -2
@@ -49,8 +49,6 @@ DPDK_2.0 { rte_eal_remote_launch; rte_eal_tailq_lookup; rte_eal_tailq_lookup_by_idx; - rte_eal_tailq_reserve; - rte_eal_tailq_reserve_by_idx; rte_eal_vdev_init; rte_eal_vdev_uninit; rte_eal_wait_lcore;
Signature · 1 line
1.7.10.4
PATCH 6/10 tailq: remove unused RTE_EAL_TAILQ_* macros
In reply to a message not in the archiveA lot of places just protect against concurrent access and I can not see the gain of having those macros.
--- lib/librte_eal/common/include/rte_eal.h | 58 ------------------------------- lib/librte_mempool/rte_mempool.c | 10 ++++-- 2 files changed, 7 insertions(+), 61 deletions(-)
lib/librte_eal/common/include/rte_eal.h +0 -58
@@ -195,64 +195,6 @@ rte_set_application_usage_hook( rte_usage_hook_t usage_func );*/ #define RTE_EAL_MEMPOOL_RWLOCK (&rte_eal_get_configuration()->mem_config->mplock) - -/** -* Utility macro to do a thread-safe tailq 'INSERT' of rte_mem_config -* -* @param idx -* a kind of tailq define in enum rte_tailq_t -* -* @param type -* type of list(tailq head) -* -* @param elm -* The element will be added into the list -* -*/ -#define RTE_EAL_TAILQ_INSERT_TAIL (idx, type, elm) do { \ - struct type *list; \ - list = RTE_TAILQ_LOOKUP_BY_IDX(idx, type); \ - rte_rwlock_write_lock(RTE_EAL_TAILQ_RWLOCK); \ - TAILQ_INSERT_TAIL(list, elm, next); \ - rte_rwlock_write_unlock(RTE_EAL_TAILQ_RWLOCK); \ -} while (0) - -/** -* Utility macro to do a thread-safe tailq 'REMOVE' of rte_mem_config -* -* @param idx -* a kind of tailq define in enum rte_tailq_t -* -* @param type -* type of list(tailq head) -* -* @param elm -* The element will be remove from the list -* -*/ -#define RTE_EAL_TAILQ_REMOVE (idx, type, elm) do { \ - struct type *list; \ - list = RTE_TAILQ_LOOKUP_BY_IDX(idx, type); \ - rte_rwlock_write_lock(RTE_EAL_TAILQ_RWLOCK); \ - TAILQ_REMOVE(list, elm, next); \ - rte_rwlock_write_unlock(RTE_EAL_TAILQ_RWLOCK); \ -} while (0) \ - - -/** -* macro to check TAILQ exist -* -* @param idx -* a kind of tailq define in enum rte_tailq_t -* -*/ -#define RTE_EAL_TAILQ_EXIST_CHECK (idx) do { \ - if (RTE_TAILQ_LOOKUP_BY_IDX(idx, rte_tailq_head) == NULL){ \ - rte_errno = E_RTE_NO_TAILQ; \ - return NULL; \ - } \ -} while(0) -/** * Whether EAL is using huge pages (disabled by --no-huge option). * The no-huge mode cannot be used with UIO poll-mode drivers like igb/ixgbe.
lib/librte_mempool/rte_mempool.c +7 -3
@@ -403,6 +403,7 @@ rte_mempool_xmem_create(const char *name, unsigned n, unsigned elt_size, {char mz_name[RTE_MEMZONE_NAMESIZE ];char rg_name[RTE_RING_NAMESIZE ]; +struct rte_mempool_list *mempool_list;struct rte_mempool *mp =NULL ;struct rte_tailq_entry *te;struct rte_ring *r;
@@ -432,8 +433,9 @@ rte_mempool_xmem_create(const char *name, unsigned n, unsigned elt_size,#endif /* check that we have an initialised tail queue */ -if (RTE_TAILQ_LOOKUP_BY_IDX (RTE_TAILQ_MEMPOOL , - rte_mempool_list) ==NULL ) { + mempool_list =RTE_TAILQ_LOOKUP_BY_IDX (RTE_TAILQ_MEMPOOL , + rte_mempool_list); +if (mempool_list ==NULL ) { rte_errno =E_RTE_NO_TAILQ ;return NULL ; }
@@ -599,7 +601,9 @@ rte_mempool_xmem_create(const char *name, unsigned n, unsigned elt_size, te->data = (void *) mp; -RTE_EAL_TAILQ_INSERT_TAIL (RTE_TAILQ_MEMPOOL , rte_mempool_list, te); +rte_rwlock_write_lock (RTE_EAL_TAILQ_RWLOCK ); +TAILQ_INSERT_TAIL (mempool_list, te, next); +rte_rwlock_write_unlock (RTE_EAL_TAILQ_RWLOCK ); exit:rte_rwlock_write_unlock (RTE_EAL_MEMPOOL_RWLOCK );
Signature · 1 line
1.7.10.4
PATCH 7/10 tailq: introduce dynamic register system
In reply to a message not in the archiveThis register system makes it possible to reserve a tailq for the dpdk libraries.
The "dynamic" tailqs are right after the "static" tailqs in shared mem. Primary process is responsible for writing the tailq names, so that secondary processes can find them.
This is a temp commit, "static" tailqs are removed after conversion of all users in next commits.
--- app/test/test_tailq.c | 82 +++++++++----- lib/librte_eal/bsdapp/eal/rte_eal_version.map | 1 + lib/librte_eal/common/eal_common_tailqs.c | 130 +++++++++++++++++++++-- lib/librte_eal/common/include/rte_tailq.h | 38 +++++++ lib/librte_eal/linuxapp/eal/rte_eal_version.map | 1 + 5 files changed, 219 insertions(+), 33 deletions(-)
app/test/test_tailq.c +58 -24
@@ -34,6 +34,7 @@#include <stdio.h> #include <stdint.h> #include <stdarg.h> +#include <string.h> #include <errno.h> #include <sys/queue.h>
@@ -49,40 +50,59 @@return 1 ; \ }while (0 ) -#define DEFAULT_TAILQ (RTE_TAILQ_NUM) +static struct rte_tailq_elem rte_dummy_tailq = { + .name ="dummy" , +}; +EAL_REGISTER_TAILQ (rte_dummy_tailq) + +static struct rte_tailq_elem rte_dummy_dyn_tailq = { + .name ="dummy_dyn" , +}; +static struct rte_tailq_elem rte_dummy_dyn2_tailq = { + .name ="dummy_dyn" , +};static struct rte_tailq_entry d_elem; +static struct rte_tailq_entry d_dyn_elem;static int -test_tailq_create (void ) +test_tailq_early (void ) {struct rte_tailq_entry_head *d_head; -unsigned i; -/* create a first tailq and check its non-null */ - d_head =RTE_TAILQ_LOOKUP_BY_IDX (DEFAULT_TAILQ , rte_tailq_entry_head); + d_head =RTE_TAILQ_CAST (rte_dummy_tailq.head, rte_tailq_entry_head);if (d_head ==NULL ) -do_return ("Error allocating dummy_q0\n" ); +do_return ("Error %s has not been initialised\n" , + rte_dummy_tailq.name); -/* check we can add an item to it -*/ +/* check we can add an item to it */ TAILQ_INSERT_TAIL (d_head, &d_elem, next); -/* try allocating dummy_q0 again, and check for failure */ -if (RTE_TAILQ_LOOKUP_BY_IDX (DEFAULT_TAILQ , rte_tailq_entry_head) ==NULL ) -do_return ("Error, non-null result returned when attemption to " -"re-allocate a tailq\n" ); +return 0 ; +} + +static int +test_tailq_create (void ) +{ +struct rte_tailq_entry_head *d_head; + +/* create a tailq and check its non-null (since we are post-eal init) */ +if ((rte_eal_tailq_register (&rte_dummy_dyn_tailq) <0 ) || + (rte_dummy_dyn_tailq.head ==NULL )) +do_return ("Error allocating %s\n" , rte_dummy_dyn_tailq.name); + + d_head =RTE_TAILQ_CAST (rte_dummy_dyn_tailq.head, rte_tailq_entry_head); -/* now fill up the tailq slots available and check we get an error */ -for (i =RTE_TAILQ_NUM ; i <RTE_MAX_TAILQ ; i++){ -if ((d_head =RTE_TAILQ_LOOKUP_BY_IDX (i, - rte_tailq_entry_head)) ==NULL ) -break ; - } +/* check we can add an item to it */ +TAILQ_INSERT_TAIL (d_head, &d_dyn_elem, next); -/* check that we had an error return before RTE_MAX_TAILQ */ -if (i !=RTE_MAX_TAILQ ) -do_return ("Error, we did not have a reservation as expected\n" ); +if (strcmp (rte_dummy_dyn2_tailq.name, rte_dummy_dyn_tailq.name)) +do_return ("Error, something is wrong in the tailq test\n" ); + +/* try allocating again, and check for failure */ +if (!rte_eal_tailq_register (&rte_dummy_dyn2_tailq)) +do_return ("Error, registering the same tailq %s did not fail\n" , + rte_dummy_dyn2_tailq.name);return 0 ; }
@@ -94,8 +114,10 @@ test_tailq_lookup(void)struct rte_tailq_entry_head *d_head;struct rte_tailq_entry *d_ptr; - d_head =RTE_TAILQ_LOOKUP_BY_IDX (DEFAULT_TAILQ , rte_tailq_entry_head); -if (d_head ==NULL ) + d_head =RTE_TAILQ_LOOKUP (rte_dummy_tailq.name, rte_tailq_entry_head); +/* rte_dummy_tailq has been registered by EAL_REGISTER_TAILQ */ +if (d_head ==NULL || + d_head !=RTE_TAILQ_CAST (rte_dummy_tailq.head, rte_tailq_entry_head))do_return ("Error with tailq lookup\n" );TAILQ_FOREACH (d_ptr, d_head, next)
@@ -103,8 +125,19 @@ test_tailq_lookup(void)do_return ("Error with tailq returned from lookup - " "expected element not found\n" ); + d_head =RTE_TAILQ_LOOKUP (rte_dummy_dyn_tailq.name, rte_tailq_entry_head); +/* rte_dummy_dyn_tailq has been registered by test_tailq_create */ +if (d_head ==NULL || + d_head !=RTE_TAILQ_CAST (rte_dummy_dyn_tailq.head, rte_tailq_entry_head)) +do_return ("Error with tailq lookup\n" ); + + TAILQ_FOREACH(d_ptr, d_head, next) +if (d_ptr != &d_dyn_elem) +do_return ("Error with tailq returned from lookup - " +"expected element not found\n" ); +/* now try a bad/error lookup */ - d_head =RTE_TAILQ_LOOKUP_BY_IDX (RTE_MAX_TAILQ , rte_tailq_entry_head); + d_head =RTE_TAILQ_LOOKUP ("coucou" , rte_tailq_entry_head);if (d_head !=NULL )do_return ("Error, lookup does not return NULL for bad tailq name\n" );
@@ -115,6 +148,7 @@ static inttest_tailq (void) {int ret =0 ; + ret |=test_tailq_early (); ret |=test_tailq_create (); ret |=test_tailq_lookup ();return ret;
lib/librte_eal/bsdapp/eal/rte_eal_version.map +1 -0
@@ -45,6 +45,7 @@ DPDK_2.0 { rte_eal_remote_launch; rte_eal_tailq_lookup; rte_eal_tailq_lookup_by_idx; + rte_eal_tailq_register; rte_eal_wait_lcore; rte_exit; rte_get_hpet_cycles;
lib/librte_eal/common/eal_common_tailqs.c +121 -9
173 lines not on this page · raw message
lib/librte_eal/common/include/rte_tailq.h +38 -0
@@ -46,6 +46,7 @@ extern "C" {#include <sys/queue.h> #include <stdio.h> +#include <rte_debug.h> /** dummy structure type used by the rte_tailq APIs */ struct rte_tailq_entry {
@@ -67,6 +68,17 @@ TAILQ_HEAD(rte_tailq_entry_head, rte_tailq_entry);*/ struct rte_tailq_head {struct rte_tailq_entry_head tailq_head;/**< NOTE: must be first element */ +char name[RTE_TAILQ_NAMESIZE ]; +}; + +struct rte_tailq_elem { +/** +* Reference to head in shared mem, updated at init time by +* rte_eal_tailqs_init() +*/ +struct rte_tailq_head *head; +TAILQ_ENTRY (rte_tailq_elem) next; +const char name[RTE_TAILQ_NAMESIZE ]; };/**
@@ -151,6 +163,32 @@ struct rte_tailq_head *rte_eal_tailq_lookup(const char *name);*/ struct rte_tailq_head *rte_eal_tailq_lookup_by_idx (const unsigned idx); +/** +* Register a tail queue. +* +* Register a tail queue from shared memory. +* This function is mainly used by EAL_REGISTER_TAILQ macro which is used to +* register tailq from the different dpdk libraries. Since this macro is a +* constructor, the function has no access to dpdk shared memory, so the +* registered tailq can not be used before call to rte_eal_init() which calls +* rte_eal_tailqs_init(). +* +* @param t +* The tailq element which contains the name of the tailq you want to +* create (/retrieve when in secondary process). +* @return +* 0 on success or -1 in case of an error. +*/ +int rte_eal_tailq_register (struct rte_tailq_elem *t); + +#define EAL_REGISTER_TAILQ (t) \ +void tailqinitfn_ ##t(void); \ +void __attribute__((constructor, used)) tailqinitfn_ ##t(void) \ +{ \ + if (rte_eal_tailq_register(&t) < 0) \ + rte_panic("Cannot initialize tailq: %s\n", t.name); \ +} + #ifdef __cplusplus }#endif
lib/librte_eal/linuxapp/eal/rte_eal_version.map +1 -0
@@ -49,6 +49,7 @@ DPDK_2.0 { rte_eal_remote_launch; rte_eal_tailq_lookup; rte_eal_tailq_lookup_by_idx; + rte_eal_tailq_register; rte_eal_vdev_init; rte_eal_vdev_uninit; rte_eal_wait_lcore;
Signature · 1 line
1.7.10.4
PATCH 8/10 tailq: move to dynamic tailq
In reply to a message not in the archiveUse dynamic tailq rather than static entries.
--- lib/librte_acl/rte_acl.c | 33 +++++++---------------- lib/librte_acl/rte_acl.h | 1 - lib/librte_distributor/rte_distributor.c | 16 +++++------ lib/librte_eal/bsdapp/eal/eal_pci.c | 7 ++++- lib/librte_eal/common/include/rte_tailq_elem.h | 20 -------------- lib/librte_eal/linuxapp/eal/eal_ivshmem.c | 5 ++-- lib/librte_eal/linuxapp/eal/eal_pci.c | 8 ++++-- lib/librte_hash/rte_fbk_hash.c | 32 ++++++++-------------- lib/librte_hash/rte_fbk_hash.h | 1 - lib/librte_hash/rte_hash.c | 27 ++++++------------- lib/librte_hash/rte_hash.h | 1 - lib/librte_lpm/rte_lpm.c | 34 +++++++++--------------- lib/librte_lpm/rte_lpm.h | 1 - lib/librte_lpm/rte_lpm6.c | 26 ++++++------------ lib/librte_lpm/rte_lpm6.h | 1 - lib/librte_mempool/rte_mempool.c | 32 +++++++--------------- lib/librte_mempool/rte_mempool.h | 3 --- lib/librte_reorder/rte_reorder.c | 26 ++++++------------ lib/librte_reorder/rte_reorder.h | 1 - lib/librte_ring/rte_ring.c | 27 +++++++------------ lib/librte_ring/rte_ring.h | 3 ++- 21 files changed, 99 insertions(+), 206 deletions(-)
lib/librte_acl/rte_acl.c +9 -24
@@ -38,6 +38,11 @@TAILQ_HEAD (rte_acl_list, rte_tailq_entry); +static struct rte_tailq_elem rte_acl_tailq = { + .name ="RTE_ACL" , +}; +EAL_REGISTER_TAILQ (rte_acl_tailq) +/* * If the compiler doesn't support AVX2 instructions, * then the dummy one would be used instead for AVX2 classify method.
@@ -129,12 +134,7 @@ rte_acl_find_existing(const char *name)struct rte_acl_list *acl_list;struct rte_tailq_entry *te; -/* check that we have an initialised tail queue */ - acl_list =RTE_TAILQ_LOOKUP_BY_IDX (RTE_TAILQ_ACL , rte_acl_list); -if (acl_list ==NULL ) { - rte_errno =E_RTE_NO_TAILQ ; -return NULL ; - } + acl_list =RTE_TAILQ_CAST (rte_acl_tailq.head, rte_acl_list);rte_rwlock_read_lock (RTE_EAL_TAILQ_RWLOCK ); TAILQ_FOREACH(te, acl_list, next) {
@@ -160,12 +160,7 @@ rte_acl_free(struct rte_acl_ctx *ctx)if (ctx ==NULL )return ; -/* check that we have an initialised tail queue */ - acl_list =RTE_TAILQ_LOOKUP_BY_IDX (RTE_TAILQ_ACL , rte_acl_list); -if (acl_list ==NULL ) { - rte_errno =E_RTE_NO_TAILQ ; -return ; - } + acl_list =RTE_TAILQ_CAST (rte_acl_tailq.head, rte_acl_list);rte_rwlock_write_lock (RTE_EAL_TAILQ_RWLOCK );
@@ -197,12 +192,7 @@ rte_acl_create(const struct rte_acl_param *param)struct rte_tailq_entry *te;char name[sizeof (ctx->name)]; -/* check that we have an initialised tail queue */ - acl_list =RTE_TAILQ_LOOKUP_BY_IDX (RTE_TAILQ_ACL , rte_acl_list); -if (acl_list ==NULL ) { - rte_errno =E_RTE_NO_TAILQ ; -return NULL ; - } + acl_list =RTE_TAILQ_CAST (rte_acl_tailq.head, rte_acl_list);/* check that input parameters are valid. */ if (param ==NULL || param->name ==NULL ) {
@@ -365,12 +355,7 @@ rte_acl_list_dump(void)struct rte_acl_list *acl_list;struct rte_tailq_entry *te; -/* check that we have an initialised tail queue */ - acl_list =RTE_TAILQ_LOOKUP_BY_IDX (RTE_TAILQ_ACL , rte_acl_list); -if (acl_list ==NULL ) { - rte_errno =E_RTE_NO_TAILQ ; -return ; - } + acl_list =RTE_TAILQ_CAST (rte_acl_tailq.head, rte_acl_list);rte_rwlock_read_lock (RTE_EAL_TAILQ_RWLOCK ); TAILQ_FOREACH(te, acl_list, next) {
lib/librte_acl/rte_acl.h +0 -1
@@ -170,7 +170,6 @@ struct rte_acl_param {* Pointer to ACL context structure that is used in future ACL * operations, or NULL on error, with error code set in rte_errno. * Possible rte_errno errors include: -* - E_RTE_NO_TAILQ - no tailq list could be got for the ACL context list * - EINVAL - invalid parameter passed to function */ struct rte_acl_ctx *
lib/librte_distributor/rte_distributor.c +8 -8
@@ -115,6 +115,11 @@ struct rte_distributor {TAILQ_HEAD (rte_distributor_list, rte_distributor); +static struct rte_tailq_elem rte_distributor_tailq = { + .name ="RTE_DISTRIBUTOR" , +}; +EAL_REGISTER_TAILQ (rte_distributor_tailq) +/**** APIs called by workers ****/ void
@@ -460,14 +465,6 @@ rte_distributor_create(const char *name,return NULL ; } -/* check that we have an initialised tail queue */ - distributor_list =RTE_TAILQ_LOOKUP_BY_IDX (RTE_TAILQ_DISTRIBUTOR , - rte_distributor_list); -if (distributor_list ==NULL ) { - rte_errno =E_RTE_NO_TAILQ ; -return NULL ; - } -snprintf (mz_name,sizeof (mz_name),RTE_DISTRIB_PREFIX "%s" , name); mz =rte_memzone_reserve (mz_name,sizeof (*d), socket_id,NO_FLAGS );if (mz ==NULL ) {
@@ -479,6 +476,9 @@ rte_distributor_create(const char *name,snprintf (d->name,sizeof (d->name),"%s" , name); d->num_workers = num_workers; + distributor_list =RTE_TAILQ_CAST (rte_distributor_tailq.head, + rte_distributor_list); +rte_rwlock_write_lock (RTE_EAL_TAILQ_RWLOCK );TAILQ_INSERT_TAIL (distributor_list, d, next);rte_rwlock_write_unlock (RTE_EAL_TAILQ_RWLOCK );
lib/librte_eal/bsdapp/eal/eal_pci.c +6 -1
@@ -107,6 +107,11 @@ TAILQ_HEAD(uio_res_list, uio_resource);static struct uio_res_list *uio_res_list =NULL ; +static struct rte_tailq_elem rte_pci_tailq = { + .name ="PCI_RESOURCE_LIST" , +}; +EAL_REGISTER_TAILQ (rte_pci_tailq) +/* unbind kernel driver for this device */ static int pci_unbind_kernel_driver(struct rte_pci_device *dev __rte_unused)
@@ -492,7 +497,7 @@ rte_eal_pci_init(void) {TAILQ_INIT (&pci_driver_list);TAILQ_INIT (&pci_device_list); - uio_res_list =RTE_TAILQ_LOOKUP_BY_IDX (RTE_TAILQ_PCI , uio_res_list); + uio_res_list =RTE_TAILQ_CAST (rte_pci_tailq.head, uio_res_list);/* for debug purposes, PCI can be disabled */ if (internal_config.no_pci)
lib/librte_eal/common/include/rte_tailq_elem.h +0 -20
@@ -64,26 +64,6 @@#define rte_tailq_end (idx)#endif /* rte_tailq_end */ -rte_tailq_elem(RTE_TAILQ_PCI, "PCI_RESOURCE_LIST") - -rte_tailq_elem(RTE_TAILQ_MEMPOOL, "RTE_MEMPOOL") - -rte_tailq_elem(RTE_TAILQ_RING, "RTE_RING") - -rte_tailq_elem(RTE_TAILQ_HASH, "RTE_HASH") - -rte_tailq_elem(RTE_TAILQ_FBK_HASH, "RTE_FBK_HASH") - -rte_tailq_elem(RTE_TAILQ_LPM, "RTE_LPM") - -rte_tailq_elem(RTE_TAILQ_LPM6, "RTE_LPM6") - -rte_tailq_elem(RTE_TAILQ_ACL, "RTE_ACL") - -rte_tailq_elem(RTE_TAILQ_DISTRIBUTOR, "RTE_DISTRIBUTOR") - -rte_tailq_elem(RTE_TAILQ_REORDER, "RTE_REORDER") -rte_tailq_end (RTE_TAILQ_NUM) #undef rte_tailq_elem
lib/librte_eal/linuxapp/eal/eal_ivshmem.c +2 -3
@@ -53,7 +53,6 @@#include <rte_malloc.h> #include <rte_common.h> #include <rte_ivshmem.h> -#include <rte_tailq_elem.h> #include "eal_internal_cfg.h" #include "eal_private.h"
@@ -764,8 +763,8 @@ rte_eal_ivshmem_obj_init(void)return 0 ;/* check that we have an initialised ring tail queue */ -if ((ring_list = -RTE_TAILQ_LOOKUP_BY_IDX (RTE_TAILQ_RING , rte_ring_list)) ==NULL ) { + ring_list =RTE_TAILQ_LOOKUP (RTE_TAILQ_RING_NAME , rte_ring_list); +if (ring_list ==NULL ) {RTE_LOG (ERR ,EAL ,"No rte_ring tailq found!\n" );return -1 ; }
lib/librte_eal/linuxapp/eal/eal_pci.c +6 -2
@@ -58,6 +58,11 @@struct mapped_pci_res_list *pci_res_list =NULL ; +static struct rte_tailq_elem rte_pci_tailq = { + .name ="PCI_RESOURCE_LIST" , +}; +EAL_REGISTER_TAILQ (rte_pci_tailq) +/* unbind kernel driver for this device */ static intpci_unbind_kernel_driver (struct rte_pci_device *dev)
@@ -765,8 +770,7 @@ rte_eal_pci_init(void) {TAILQ_INIT (&pci_driver_list);TAILQ_INIT (&pci_device_list); - pci_res_list =RTE_TAILQ_LOOKUP_BY_IDX (RTE_TAILQ_PCI , - mapped_pci_res_list); + pci_res_list =RTE_TAILQ_CAST (rte_pci_tailq.head, mapped_pci_res_list);/* for debug purposes, PCI can be disabled */ if (internal_config.no_pci)
lib/librte_hash/rte_fbk_hash.c +11 -21
@@ -55,6 +55,11 @@TAILQ_HEAD (rte_fbk_hash_list, rte_tailq_entry); +static struct rte_tailq_elem rte_fbk_hash_tailq = { + .name ="RTE_FBK_HASH" , +}; +EAL_REGISTER_TAILQ (rte_fbk_hash_tailq) +/** * Performs a lookup for an existing hash table, and returns a pointer to * the table if found.
@@ -72,13 +77,8 @@ rte_fbk_hash_find_existing(const char *name)struct rte_tailq_entry *te;struct rte_fbk_hash_list *fbk_hash_list; -/* check that we have an initialised tail queue */ -if ((fbk_hash_list = -RTE_TAILQ_LOOKUP_BY_IDX (RTE_TAILQ_FBK_HASH , - rte_fbk_hash_list)) ==NULL ) { - rte_errno =E_RTE_NO_TAILQ ; -return NULL ; - } + fbk_hash_list =RTE_TAILQ_CAST (rte_fbk_hash_tailq.head, + rte_fbk_hash_list);rte_rwlock_read_lock (RTE_EAL_TAILQ_RWLOCK ); TAILQ_FOREACH(te, fbk_hash_list, next) {
@@ -115,13 +115,8 @@ rte_fbk_hash_create(const struct rte_fbk_hash_params *params)uint32_t i;struct rte_fbk_hash_list *fbk_hash_list; -/* check that we have an initialised tail queue */ -if ((fbk_hash_list = -RTE_TAILQ_LOOKUP_BY_IDX (RTE_TAILQ_FBK_HASH , - rte_fbk_hash_list)) ==NULL ) { - rte_errno =E_RTE_NO_TAILQ ; -return NULL ; - } + fbk_hash_list =RTE_TAILQ_CAST (rte_fbk_hash_tailq.head, + rte_fbk_hash_list);/* Error checking of parameters. */ if ((!rte_is_power_of_2(params->entries)) ||
@@ -208,13 +203,8 @@ rte_fbk_hash_free(struct rte_fbk_hash_table *ht)if (ht ==NULL )return ; -/* check that we have an initialised tail queue */ -if ((fbk_hash_list = -RTE_TAILQ_LOOKUP_BY_IDX (RTE_TAILQ_FBK_HASH , - rte_fbk_hash_list)) ==NULL ) { - rte_errno =E_RTE_NO_TAILQ ; -return ; - } + fbk_hash_list =RTE_TAILQ_CAST (rte_fbk_hash_tailq.head, + rte_fbk_hash_list);rte_rwlock_write_lock (RTE_EAL_TAILQ_RWLOCK );
lib/librte_hash/rte_fbk_hash.h +0 -1
@@ -372,7 +372,6 @@ struct rte_fbk_hash_table *rte_fbk_hash_find_existing(const char *name);* Possible rte_errno error values include: * - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure * - E_RTE_SECONDARY - function was called from a secondary process instance -* - E_RTE_NO_TAILQ - no tailq list could be got for the fbk hash table list * - EINVAL - invalid parameter value passed to function * - ENOSPC - the maximum number of memzones has already been allocated * - EEXIST - a memzone with the same name already exists
lib/librte_hash/rte_hash.c +8 -19
@@ -58,9 +58,13 @@#include "rte_hash.h" -TAILQ_HEAD (rte_hash_list, rte_tailq_entry); +static struct rte_tailq_elem rte_hash_tailq = { + .name ="RTE_HASH" , +}; +EAL_REGISTER_TAILQ (rte_hash_tailq) + /* Macro to enable/disable run-time checking of function parameters */#if defined(RTE_LIBRTE_HASH_DEBUG )#define RETURN_IF_TRUE (cond, retval) do { \
@@ -144,12 +148,7 @@ rte_hash_find_existing(const char *name)struct rte_tailq_entry *te;struct rte_hash_list *hash_list; -/* check that we have an initialised tail queue */ -if ((hash_list = -RTE_TAILQ_LOOKUP_BY_IDX (RTE_TAILQ_HASH , rte_hash_list)) ==NULL ) { - rte_errno =E_RTE_NO_TAILQ ; -return NULL ; - } + hash_list =RTE_TAILQ_CAST (rte_hash_tailq.head, rte_hash_list);rte_rwlock_read_lock (RTE_EAL_TAILQ_RWLOCK ); TAILQ_FOREACH(te, hash_list, next) {
@@ -176,12 +175,7 @@ rte_hash_create(const struct rte_hash_parameters *params)char hash_name[RTE_HASH_NAMESIZE ];struct rte_hash_list *hash_list; -/* check that we have an initialised tail queue */ -if ((hash_list = -RTE_TAILQ_LOOKUP_BY_IDX (RTE_TAILQ_HASH , rte_hash_list)) ==NULL ) { - rte_errno =E_RTE_NO_TAILQ ; -return NULL ; - } + hash_list =RTE_TAILQ_CAST (rte_hash_tailq.head, rte_hash_list);/* Check for valid parameters */ if ((params == NULL) ||
@@ -274,12 +268,7 @@ rte_hash_free(struct rte_hash *h)if (h ==NULL )return ; -/* check that we have an initialised tail queue */ -if ((hash_list = -RTE_TAILQ_LOOKUP_BY_IDX (RTE_TAILQ_HASH , rte_hash_list)) ==NULL ) { - rte_errno =E_RTE_NO_TAILQ ; -return ; - } + hash_list =RTE_TAILQ_CAST (rte_hash_tailq.head, rte_hash_list);rte_rwlock_write_lock (RTE_EAL_TAILQ_RWLOCK );
lib/librte_hash/rte_hash.h +0 -1
@@ -117,7 +117,6 @@ struct rte_hash {* Possible rte_errno errors include: * - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure * - E_RTE_SECONDARY - function was called from a secondary process instance -* - E_RTE_NO_TAILQ - no tailq list could be got for the hash table list * - ENOENT - missing entry * - EINVAL - invalid parameter passed to function * - ENOSPC - the maximum number of memzones has already been allocated
lib/librte_lpm/rte_lpm.c +12 -22
@@ -57,6 +57,11 @@TAILQ_HEAD (rte_lpm_list, rte_tailq_entry); +static struct rte_tailq_elem rte_lpm_tailq = { + .name ="RTE_LPM" , +}; +EAL_REGISTER_TAILQ(rte_lpm_tailq) +#define MAX_DEPTH_TBL24 24enum valid_flag {
@@ -121,12 +126,7 @@ rte_lpm_find_existing(const char *name)struct rte_tailq_entry *te;struct rte_lpm_list *lpm_list; -/* check that we have an initialised tail queue */ -if ((lpm_list =RTE_TAILQ_LOOKUP_BY_IDX (RTE_TAILQ_LPM , - rte_lpm_list)) ==NULL ) { - rte_errno =E_RTE_NO_TAILQ ; -return NULL ; - } + lpm_list =RTE_TAILQ_CAST (rte_lpm_tailq.head, rte_lpm_list);rte_rwlock_read_lock (RTE_EAL_TAILQ_RWLOCK ); TAILQ_FOREACH(te, lpm_list, next) {
@@ -157,12 +157,7 @@ rte_lpm_create(const char *name, int socket_id, int max_rules,uint32_t mem_size;struct rte_lpm_list *lpm_list; -/* check that we have an initialised tail queue */ -if ((lpm_list =RTE_TAILQ_LOOKUP_BY_IDX (RTE_TAILQ_LPM , - rte_lpm_list)) ==NULL ) { - rte_errno =E_RTE_NO_TAILQ ; -return NULL ; - } + lpm_list =RTE_TAILQ_CAST (rte_lpm_tailq.head, rte_lpm_list);RTE_BUILD_BUG_ON (sizeof (struct rte_lpm_tbl24_entry ) !=2 );RTE_BUILD_BUG_ON (sizeof (struct rte_lpm_tbl8_entry ) !=2 );
@@ -232,12 +227,7 @@ rte_lpm_free(struct rte_lpm *lpm)if (lpm ==NULL )return ; -/* check that we have an initialised tail queue */ -if ((lpm_list = -RTE_TAILQ_LOOKUP_BY_IDX (RTE_TAILQ_LPM , rte_lpm_list)) ==NULL ) { - rte_errno =E_RTE_NO_TAILQ ; -return ; - } + lpm_list =RTE_TAILQ_CAST (rte_lpm_tailq.head, rte_lpm_list);rte_rwlock_write_lock (RTE_EAL_TAILQ_RWLOCK );
@@ -384,8 +374,8 @@ rule_find(struct rte_lpm *lpm, uint32_t ip_masked, uint8_t depth)return (rule_index); } -/* If rule is not found return -E_RTE_NO_TAILQ. */ -return -E_RTE_NO_TAILQ ; +/* If rule is not found return -EINVAL. */ +return -EINVAL ; }/*
@@ -969,10 +959,10 @@ rte_lpm_delete(struct rte_lpm *lpm, uint32_t ip, uint8_t depth)/* * Check if rule_to_delete_index was found. If no rule was found the -* function rule_find returns -E_RTE_NO_TAILQ. +* function rule_find returns -EINVAL. */ if (rule_to_delete_index <0 ) -return -E_RTE_NO_TAILQ ; +return -EINVAL ;/* Delete the rule from the rule table. */ rule_delete (lpm, rule_to_delete_index, depth);
lib/librte_lpm/rte_lpm.h +0 -1
@@ -163,7 +163,6 @@ struct rte_lpm {* to an appropriate values. Possible rte_errno values include: * - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure * - E_RTE_SECONDARY - function was called from a secondary process instance -* - E_RTE_NO_TAILQ - no tailq list could be got for the lpm object list * - EINVAL - invalid parameter passed to function * - ENOSPC - the maximum number of memzones has already been allocated * - EEXIST - a memzone with the same name already exists
lib/librte_lpm/rte_lpm6.c +8 -18
@@ -78,6 +78,11 @@ enum valid_flag {TAILQ_HEAD (rte_lpm6_list, rte_tailq_entry); +static struct rte_tailq_elem rte_lpm6_tailq = { + .name ="RTE_LPM6" , +}; +EAL_REGISTER_TAILQ (rte_lpm6_tailq) +/** Tbl entry structure. It is the same for both tbl24 and tbl8 */ struct rte_lpm6_tbl_entry { uint32_t next_hop: 21; /**< Next hop / next table to be checked. */
@@ -150,12 +155,7 @@ rte_lpm6_create(const char *name, int socket_id,uint64_t mem_size, rules_size;struct rte_lpm6_list *lpm_list; -/* Check that we have an initialised tail queue */ -if ((lpm_list = -RTE_TAILQ_LOOKUP_BY_IDX (RTE_TAILQ_LPM6 , rte_lpm6_list)) ==NULL ) { - rte_errno =E_RTE_NO_TAILQ ; -return NULL ; - } + lpm_list =RTE_TAILQ_CAST (rte_lpm6_tailq.head, rte_lpm6_list);RTE_BUILD_BUG_ON (sizeof (struct rte_lpm6_tbl_entry ) !=sizeof (uint32_t ));
@@ -237,12 +237,7 @@ rte_lpm6_find_existing(const char *name)struct rte_tailq_entry *te;struct rte_lpm6_list *lpm_list; -/* Check that we have an initialised tail queue */ -if ((lpm_list =RTE_TAILQ_LOOKUP_BY_IDX (RTE_TAILQ_LPM6 , - rte_lpm6_list)) ==NULL ) { - rte_errno =E_RTE_NO_TAILQ ; -return NULL ; - } + lpm_list =RTE_TAILQ_CAST (rte_lpm6_tailq.head, rte_lpm6_list);rte_rwlock_read_lock (RTE_EAL_TAILQ_RWLOCK ); TAILQ_FOREACH(te, lpm_list, next) {
@@ -273,12 +268,7 @@ rte_lpm6_free(struct rte_lpm6 *lpm)if (lpm ==NULL )return ; -/* check that we have an initialised tail queue */ -if ((lpm_list = -RTE_TAILQ_LOOKUP_BY_IDX (RTE_TAILQ_LPM , rte_lpm6_list)) ==NULL ) { - rte_errno =E_RTE_NO_TAILQ ; -return ; - } + lpm_list =RTE_TAILQ_CAST (rte_lpm6_tailq.head, rte_lpm6_list);rte_rwlock_write_lock (RTE_EAL_TAILQ_RWLOCK );
lib/librte_lpm/rte_lpm6.h +0 -1
@@ -72,7 +72,6 @@ struct rte_lpm6_config {* to an appropriate values. Possible rte_errno values include: * - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure * - E_RTE_SECONDARY - function was called from a secondary process instance -* - E_RTE_NO_TAILQ - no tailq list could be got for the lpm object list * - EINVAL - invalid parameter passed to function * - ENOSPC - the maximum number of memzones has already been allocated * - EEXIST - a memzone with the same name already exists
lib/librte_mempool/rte_mempool.c +10 -22
@@ -62,6 +62,12 @@TAILQ_HEAD (rte_mempool_list, rte_tailq_entry); +static struct rte_tailq_elem rte_mempool_tailq = +{ + .name ="RTE_MEMPOOL" , +}; +EAL_REGISTER_TAILQ(rte_mempool_tailq) +#define CACHE_FLUSHTHRESH_MULTIPLIER 1.5/*
@@ -432,13 +438,7 @@ rte_mempool_xmem_create(const char *name, unsigned n, unsigned elt_size, RTE_CACHE_LINE_MASK) != 0);#endif -/* check that we have an initialised tail queue */ - mempool_list =RTE_TAILQ_LOOKUP_BY_IDX (RTE_TAILQ_MEMPOOL , - rte_mempool_list); -if (mempool_list ==NULL ) { - rte_errno =E_RTE_NO_TAILQ ; -return NULL ; - } + mempool_list =RTE_TAILQ_CAST (rte_mempool_tailq.head, rte_mempool_list);/* asked cache too big */ if (cache_size >RTE_MEMPOOL_CACHE_MAX_SIZE ) {
@@ -834,11 +834,7 @@ rte_mempool_list_dump(FILE *f)struct rte_tailq_entry *te;struct rte_mempool_list *mempool_list; -if ((mempool_list = -RTE_TAILQ_LOOKUP_BY_IDX (RTE_TAILQ_MEMPOOL , rte_mempool_list)) ==NULL ) { - rte_errno =E_RTE_NO_TAILQ ; -return ; - } + mempool_list =RTE_TAILQ_CAST (rte_mempool_tailq.head, rte_mempool_list);rte_rwlock_read_lock (RTE_EAL_MEMPOOL_RWLOCK );
@@ -858,11 +854,7 @@ rte_mempool_lookup(const char *name)struct rte_tailq_entry *te;struct rte_mempool_list *mempool_list; -if ((mempool_list = -RTE_TAILQ_LOOKUP_BY_IDX (RTE_TAILQ_MEMPOOL , rte_mempool_list)) ==NULL ) { - rte_errno =E_RTE_NO_TAILQ ; -return NULL ; - } + mempool_list =RTE_TAILQ_CAST (rte_mempool_tailq.head, rte_mempool_list);rte_rwlock_read_lock (RTE_EAL_MEMPOOL_RWLOCK );
@@ -888,11 +880,7 @@ void rte_mempool_walk(void (*func)(const struct rte_mempool *, void *),struct rte_tailq_entry *te =NULL ;struct rte_mempool_list *mempool_list; -if ((mempool_list = -RTE_TAILQ_LOOKUP_BY_IDX (RTE_TAILQ_MEMPOOL , rte_mempool_list)) ==NULL ) { - rte_errno =E_RTE_NO_TAILQ ; -return ; - } + mempool_list =RTE_TAILQ_CAST (rte_mempool_tailq.head, rte_mempool_list);rte_rwlock_read_lock (RTE_EAL_MEMPOOL_RWLOCK );
lib/librte_mempool/rte_mempool.h +0 -3
@@ -524,7 +524,6 @@ typedef void (rte_mempool_ctor_t)(struct rte_mempool *, void *);* with rte_errno set appropriately. Possible rte_errno values include: * - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure * - E_RTE_SECONDARY - function was called from a secondary process instance -* - E_RTE_NO_TAILQ - no tailq list could be got for the ring or mempool list * - EINVAL - cache size provided is too large * - ENOSPC - the maximum number of memzones has already been allocated * - EEXIST - a memzone with the same name already exists
@@ -625,7 +624,6 @@ rte_mempool_create(const char *name, unsigned n, unsigned elt_size,* with rte_errno set appropriately. Possible rte_errno values include: * - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure * - E_RTE_SECONDARY - function was called from a secondary process instance -* - E_RTE_NO_TAILQ - no tailq list could be got for the ring or mempool list * - EINVAL - cache size provided is too large * - ENOSPC - the maximum number of memzones has already been allocated * - EEXIST - a memzone with the same name already exists
@@ -716,7 +714,6 @@ rte_mempool_xmem_create(const char *name, unsigned n, unsigned elt_size,* with rte_errno set appropriately. Possible rte_errno values include: * - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure * - E_RTE_SECONDARY - function was called from a secondary process instance -* - E_RTE_NO_TAILQ - no tailq list could be got for the ring or mempool list * - EINVAL - cache size provided is too large * - ENOSPC - the maximum number of memzones has already been allocated * - EEXIST - a memzone with the same name already exists
lib/librte_reorder/rte_reorder.c +8 -18
@@ -45,6 +45,11 @@TAILQ_HEAD (rte_reorder_list, rte_tailq_entry); +static struct rte_tailq_elem rte_reorder_tailq = { + .name ="RTE_REORDER" , +}; +EAL_REGISTER_TAILQ(rte_reorder_tailq) +#define NO_FLAGS 0#define RTE_REORDER_PREFIX "RO_"#define RTE_REORDER_NAMESIZE 32
@@ -126,12 +131,7 @@ rte_reorder_create(const char *name, unsigned socket_id, unsigned int size)const unsigned int bufsize =sizeof (struct rte_reorder_buffer ) + (2 * size *sizeof (struct rte_mbuf *)); -/* check that we have an initialised tail queue */ - reorder_list =RTE_TAILQ_LOOKUP_BY_IDX (RTE_TAILQ_REORDER , rte_reorder_list); -if (!reorder_list) { - rte_errno =E_RTE_NO_TAILQ ; -return NULL ; - } + reorder_list =RTE_TAILQ_CAST (rte_reorder_tailq.head, rte_reorder_list);/* Check user arguments. */ if (!rte_is_power_of_2 (size)) {
@@ -219,12 +219,7 @@ rte_reorder_free(struct rte_reorder_buffer *b)if (b ==NULL )return ; -/* check that we have an initialised tail queue */ - reorder_list =RTE_TAILQ_LOOKUP_BY_IDX (RTE_TAILQ_REORDER , rte_reorder_list); -if (!reorder_list) { - rte_errno =E_RTE_NO_TAILQ ; -return ; - } + reorder_list =RTE_TAILQ_CAST (rte_reorder_tailq.head, rte_reorder_list);rte_rwlock_write_lock (RTE_EAL_TAILQ_RWLOCK );
@@ -255,12 +250,7 @@ rte_reorder_find_existing(const char *name)struct rte_tailq_entry *te;struct rte_reorder_list *reorder_list; -/* check that we have an initialised tail queue */ - reorder_list =RTE_TAILQ_LOOKUP_BY_IDX (RTE_TAILQ_REORDER , rte_reorder_list); -if (!reorder_list) { - rte_errno =E_RTE_NO_TAILQ ; -return NULL ; - } + reorder_list =RTE_TAILQ_CAST (rte_reorder_tailq.head, rte_reorder_list);rte_rwlock_read_lock (RTE_EAL_TAILQ_RWLOCK ); TAILQ_FOREACH(te, reorder_list, next) {
lib/librte_reorder/rte_reorder.h +0 -1
@@ -102,7 +102,6 @@ rte_reorder_init(struct rte_reorder_buffer *b, unsigned int bufsize,* Pointer to reorder buffer instance or NULL if object not found with rte_errno * set appropriately. Possible rte_errno values include: * - ENOENT - required entry not available to return. -* - E_RTE_NO_TAILQ - no tailq list could be got for the * reorder instance list */ struct rte_reorder_buffer *
lib/librte_ring/rte_ring.c +9 -18
@@ -91,6 +91,12 @@TAILQ_HEAD (rte_ring_list, rte_tailq_entry); +static struct rte_tailq_elem rte_ring_tailq = +{ + .name =RTE_TAILQ_RING_NAME , +}; +EAL_REGISTER_TAILQ (rte_ring_tailq) + /* true if x is a power of 2 */#define POWEROF2 (x) ((((x)-1) & (x)) == 0)
@@ -161,12 +167,7 @@ rte_ring_create(const char *name, unsigned count, int socket_id,int mz_flags =0 ;struct rte_ring_list * ring_list =NULL ; -/* check that we have an initialised tail queue */ -if ((ring_list = -RTE_TAILQ_LOOKUP_BY_IDX (RTE_TAILQ_RING , rte_ring_list)) ==NULL ) { - rte_errno =E_RTE_NO_TAILQ ; -return NULL ; - } + ring_list =RTE_TAILQ_CAST (rte_ring_tailq.head, rte_ring_list); ring_size =rte_ring_get_memsize (count);if (ring_size <0 ) {
@@ -287,12 +288,7 @@ rte_ring_list_dump(FILE *f)const struct rte_tailq_entry *te;struct rte_ring_list *ring_list; -/* check that we have an initialised tail queue */ -if ((ring_list = -RTE_TAILQ_LOOKUP_BY_IDX (RTE_TAILQ_RING , rte_ring_list)) ==NULL ) { - rte_errno =E_RTE_NO_TAILQ ; -return ; - } + ring_list =RTE_TAILQ_CAST (rte_ring_tailq.head, rte_ring_list);rte_rwlock_read_lock (RTE_EAL_TAILQ_RWLOCK );
@@ -311,12 +307,7 @@ rte_ring_lookup(const char *name)struct rte_ring *r =NULL ;struct rte_ring_list *ring_list; -/* check that we have an initialized tail queue */ -if ((ring_list = -RTE_TAILQ_LOOKUP_BY_IDX (RTE_TAILQ_RING , rte_ring_list)) ==NULL ) { - rte_errno =E_RTE_NO_TAILQ ; -return NULL ; - } + ring_list =RTE_TAILQ_CAST (rte_ring_tailq.head, rte_ring_list);rte_rwlock_read_lock (RTE_EAL_TAILQ_RWLOCK );
lib/librte_ring/rte_ring.h +2 -1
@@ -101,6 +101,8 @@ extern "C" {#include <rte_atomic.h> #include <rte_branch_prediction.h> +#define RTE_TAILQ_RING_NAME "RTE_RING" +enum rte_ring_queue_behavior {RTE_RING_QUEUE_FIXED =0 ,/* Enq/Deq a fixed number of items from a ring */ RTE_RING_QUEUE_VARIABLE /* Enq/Deq as many items a possible from ring */
@@ -291,7 +293,6 @@ int rte_ring_init(struct rte_ring *r, const char *name, unsigned count,* rte_errno set appropriately. Possible errno values include: * - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure * - E_RTE_SECONDARY - function was called from a secondary process instance -* - E_RTE_NO_TAILQ - no tailq list could be got for the ring list * - EINVAL - count provided is not a power of 2 * - ENOSPC - the maximum number of memzones has already been allocated * - EEXIST - a memzone with the same name already exists
Signature · 1 line
1.7.10.4
PATCH 9/10 tailq: remove static slots
In reply to a message not in the archiveNo static entry remaining, the rte_tailq api is for "internal use" only, get rid of the static slots.
--- lib/librte_eal/bsdapp/eal/rte_eal_version.map | 1 - lib/librte_eal/common/Makefile | 2 +- lib/librte_eal/common/eal_common_tailqs.c | 47 +------------- lib/librte_eal/common/include/rte_eal_memconfig.h | 9 --- lib/librte_eal/common/include/rte_tailq.h | 34 ---------- lib/librte_eal/common/include/rte_tailq_elem.h | 70 --------------------- lib/librte_eal/linuxapp/eal/rte_eal_version.map | 1 - 7 files changed, 3 insertions(+), 161 deletions(-) delete mode 100644 lib/librte_eal/common/include/rte_tailq_elem.h
lib/librte_eal/bsdapp/eal/rte_eal_version.map +0 -1
@@ -44,7 +44,6 @@ DPDK_2.0 { rte_eal_process_type; rte_eal_remote_launch; rte_eal_tailq_lookup; - rte_eal_tailq_lookup_by_idx; rte_eal_tailq_register; rte_eal_wait_lcore; rte_exit;
lib/librte_eal/common/Makefile +1 -1
@@ -36,7 +36,7 @@ INC += rte_debug.h rte_eal.h rte_errno.h rte_launch.h rte_lcore.h INC += rte_log.h rte_memory.h rte_memzone.h rte_pci.h INC += rte_pci_dev_ids.h rte_per_lcore.h rte_random.h INC += rte_rwlock.h rte_tailq.h rte_interrupts.h rte_alarm.h -INC += rte_string_fns.h rte_version.h rte_tailq_elem.h +INC += rte_string_fns.h rte_version.h INC += rte_eal_memconfig.h rte_malloc_heap.h INC += rte_hexdump.h rte_devargs.h rte_dev.h INC += rte_common_vect.h
lib/librte_eal/common/eal_common_tailqs.c +2 -45
81 lines not on this page · raw message
lib/librte_eal/common/include/rte_eal_memconfig.h +0 -9
@@ -45,15 +45,6 @@ extern "C" {#endif /** -* Index type of tailq_head -*/ -enum rte_tailq_t { -#define rte_tailq_elem(idx, name) idx, -#define rte_tailq_end (idx) idx -#include <rte_tailq_elem.h> -}; - -/** * the structure for the memory configuration for the RTE. * Used by the rte_config structure. It is separated out, as for multi-process * support, the memory details should be shared across instances
lib/librte_eal/common/include/rte_tailq.h +0 -34
@@ -107,25 +107,6 @@ struct rte_tailq_elem {RTE_TAILQ_CAST (rte_eal_tailq_lookup (name), struct_name)/** -* Utility macro to make looking up a tailqueue for a particular struct easier. -* -* @param idx -* The tailq idx defined in rte_tail_t to be given to the tail queue. -* -* @param struct_name -* The name of the list type we are using. (Generally this is the same as the -* first parameter passed to TAILQ_HEAD macro) -* -* @return -* The return value from rte_eal_tailq_lookup, typecast to the appropriate -* structure pointer type. -* NULL on error, since the tailq_head is the first -* element in the rte_tailq_head structure. - */ -#define RTE_TAILQ_LOOKUP_BY_IDX (idx, struct_name) \ - RTE_TAILQ_CAST(rte_eal_tailq_lookup_by_idx(idx), struct_name) - -/** * Dump tail queues to the console. * * @param f
@@ -149,21 +130,6 @@ void rte_dump_tailq(FILE *f);struct rte_tailq_head *rte_eal_tailq_lookup (const char *name);/** -* Lookup for a tail queue. -* -* Get a pointer to a tail queue header of a tail -* queue identified by the name given as an argument. -* Note: this function is not multi-thread safe, and should only be called from -* a single thread at a time -* -* @param idx -* The tailq idx defined in rte_tail_t to be given to the tail queue. -* @return -* A pointer to the tail queue head structure. -*/ -struct rte_tailq_head *rte_eal_tailq_lookup_by_idx (const unsigned idx); - -/** * Register a tail queue. * * Register a tail queue from shared memory.
lib/librte_eal/common/include/rte_tailq_elem.h deleted +0 -70
70 lines not on this page · raw message
lib/librte_eal/linuxapp/eal/rte_eal_version.map +0 -1
@@ -48,7 +48,6 @@ DPDK_2.0 { rte_eal_process_type; rte_eal_remote_launch; rte_eal_tailq_lookup; - rte_eal_tailq_lookup_by_idx; rte_eal_tailq_register; rte_eal_vdev_init; rte_eal_vdev_uninit;
Signature · 1 line
1.7.10.4
PATCH 10/10 eal: no need for E_RTE_NO_TAILQ anymore
In reply to a message not in the archiveThere is no remaining reference to this errno.
--- app/test/test_errno.c | 2 +- lib/librte_eal/common/eal_common_errno.c | 2 -- lib/librte_eal/common/include/rte_errno.h | 1 - 3 files changed, 1 insertion(+), 4 deletions(-)
app/test/test_errno.c +1 -1
@@ -58,7 +58,7 @@ test_errno(void)/* use a small selection of standard errors for testing */ int std_errs[] = {EAGAIN ,EBADF ,EACCES ,EINTR ,EINVAL };/* test ALL registered RTE error codes for overlap */ -int rte_errs[] = {E_RTE_SECONDARY ,E_RTE_NO_CONFIG ,E_RTE_NO_TAILQ }; +int rte_errs[] = {E_RTE_SECONDARY ,E_RTE_NO_CONFIG };unsigned i; rte_errno =0 ;
lib/librte_eal/common/eal_common_errno.c +0 -2
@@ -64,8 +64,6 @@ rte_strerror(int errnum)return "Invalid call in secondary process" ;case E_RTE_NO_CONFIG :return "Missing rte_config structure" ; -case E_RTE_NO_TAILQ : -return "No TAILQ initialised" ;default :strerror_r (errnum,RTE_PER_LCORE (retval),RETVAL_SZ ); }
lib/librte_eal/common/include/rte_errno.h +0 -1
@@ -84,7 +84,6 @@ enum {E_RTE_SECONDARY ,/**< Operation not allowed in secondary processes */ E_RTE_NO_CONFIG ,/**< Missing rte_config */ -E_RTE_NO_TAILQ ,/**< Uninitialised TAILQ */ RTE_MAX_ERRNO /**< Max RTE error number */ };
Signature · 1 line
1.7.10.4
2015-03-04 22:50, David Marchand:
Quoted 1 line
143 files changed, 310 insertions(+), 685 deletions(-)
Great job.
As it removes more lines than it adds, it's probably a good cleanup patchset ;)
Signature · 2 lines
Thomas When there is no more things to remove, it's becoming perfect.
Neil Horman
Acked-byQuoted 13 lines · David Marchand
This is a first cleanup at trying to remove references to other dpdk libraries from eal.
This cleanup is focused on
rte_tailqapi which has been marked as "for internal use" for quite some time now.
Rather than have a static list in eal for all users ofrte_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.
Quoted 165 lines
I have tried to think of different cases (libraries loaded before/after eal init...). The unit tests have been updated accordingly.
Signature · 159 lines
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
This all seems pretty reasonable.
It might make sense to add a deprecation notice for this, since its removing public macros, but since we're not really doing that until the 2.0 release is out, I think we can skip it
For the series
Quoted 4 lines
Signature · 1 line
1.7.10.4
A message that is not in the archive (sent off-list or not yet received): 20150306002636.GA6785-0o1r3XBGOEbbgkc5XkKeNuvMHUBZFtU3YPYVAmT7z5s@public.gmane.org
Thomas Monjalon
Applied2015-03-05 19:26, Neil Horman:
Quoted 18 lines · David Marchand
Quoted 13 lines
This is a first cleanup at trying to remove references to other dpdk libraries from eal.
This cleanup is focused on
rte_tailqapi which has been marked as "for internal use" for quite some time now.
Rather than have a static list in eal for all users ofrte_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.Quoted 4 lines
I have tried to think of different cases (libraries loaded before/after eal init...). The unit tests have been updated accordingly.
Quoted 8 lines
This all seems pretty reasonable.
It might make sense to add a deprecation notice for this, since its removing public macros, but since we're not really doing that until the 2.0 release is out, I think we can skip it
For the series
Acked-by Neil Horman <[email protected]>
Applied, thanks
Quoted 21 lines · Thomas Monjalon
2015-03-05 19:26, Neil Horman:
Quoted 20 lines · David Marchand
Quoted 13 lines
This is a first cleanup at trying to remove references to other dpdk libraries from eal.
This cleanup is focused on
rte_tailqapi which has been marked as "for internal use" for quite some time now.
Rather than have a static list in eal for all users ofrte_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.Quoted 4 lines
I have tried to think of different cases (libraries loaded before/after eal init...). The unit tests have been updated accordingly.
This all seems pretty reasonable.
Quoted 7 lines
Quoted 6 lines
It might make sense to add a deprecation notice for this, since its removing public macros, but since we're not really doing that until the 2.0 release is out, I think we can skip it
For the series
Acked-by Neil Horman <[email protected]>Applied, thanks
Hi David,
It seems I cannot invoke testpmd with igb_uio device using latest master branch.
Here are steps I did.
$ T=x86_64-native-linuxapp-gcc make install $ sudo ./tools/dpdk_nic_bind.py -b igb_uio <pci addr> $ sudo ./x86_64-native-linuxapp-gcc/app/testpmd -c f -n 1 -- -i EAL: Detected lcore 0 as core 0 on socket 0
(snip)
EAL: PCI device 0000:84:00.0 on NUMA socket 1 EAL: probe driver: 8086:1521 rte_igb_pmd EAL: PCI memory mapped at 0x7fffc0000000 EAL: PCI memory mapped at 0x7fffc0100000
$
As a result of bisecting, it seems one of following commits may cause the issue.
95b6a46 tailq: remove static slots
a234816 tailq: move to dynamic tailq
Could you please check it?
Thanks,
Tetsuya
A message that is not in the archive (sent off-list or not yet received): 54FFF261.9030407-AlSX/UN32fvPDbFq/[email protected]
Hello Tetsuya,
Quoted 12 lines · Tetsuya Mukawa
$ T=x86_64-native-linuxapp-gcc make install $ sudo ./tools/dpdk_nic_bind.py -b igb_uio <pci addr> $ sudo ./x86_64-native-linuxapp-gcc/app/testpmd -c f -n 1 -- -i EAL: Detected lcore 0 as core 0 on socket 0(snip)
EAL: PCI device 0000:84:00.0 on NUMA socket 1 EAL: probe driver: 8086:1521 rte_igb_pmd EAL: PCI memory mapped at 0x7fffc0000000 EAL: PCI memory mapped at 0x7fffc0100000
Quoted 8 lines
$
As a result of bisecting, it seems one of following commits may cause the issue.
95b6a46 tailq: remove static slots
a234816 tailq: move to dynamic tailq
Hum, ok, there is something wrong with my commit... It can't work, because pci_init is called before tailqs_init. Weird, I really should have seen this before.
Will send a fix.
Signature · 1 line
David Marchand
A message that is not in the archive (sent off-list or not yet received): CALwxeUsVUXU2MW1_DvvQzZ_4H9MSJxUWAq50u_vSRBci5O4sjQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Quoted 19 lines · David Marchand
Quoted 17 lines · Tetsuya Mukawa
$ T=x86_64-native-linuxapp-gcc make install $ sudo ./tools/dpdk_nic_bind.py -b igb_uio <pci addr> $ sudo ./x86_64-native-linuxapp-gcc/app/testpmd -c f -n 1 -- -i EAL: Detected lcore 0 as core 0 on socket 0(snip)
EAL: PCI device 0000:84:00.0 on NUMA socket 1 EAL: probe driver: 8086:1521 rte_igb_pmd EAL: PCI memory mapped at 0x7fffc0000000 EAL: PCI memory mapped at 0x7fffc0100000$
As a result of bisecting, it seems one of following commits may cause the issue.
Quoted 8 lines
Quoted 3 lines
95b6a46 tailq: remove static slots
a234816 tailq: move to dynamic tailqHum, ok, there is something wrong with my commit... It can't work, because
pci_initis called beforetailqs_init. Weird, I really should have seen this before.
Just sent a fix : http://dpdk.org/dev/patchwork/patch/3976/
Can you try it ?
Thanks.
Signature · 1 line
David Marchand
A message that is not in the archive (sent off-list or not yet received): CALwxeUu+vJCuuPxMDQuCk6KWQhBA8bemLNbVuOT1BY5KL_Z+9A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Quoted 7 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of David Marchand
Sent: Wednesday, March 11, 2015 5:29 PM
To: Tetsuya Mukawa
Cc: [email protected]
Subject: Re: [dpdk-dev] [PATCH 00/10] eal:rte_tailqapi cleanup
Quoted 5 lines
On Wed, Mar 11, 2015 at 9:47 AM, David Marchand <[email protected]> wrote:
Just sent a fix : http://dpdk.org/dev/patchwork/patch/3976/
Can you try it ?
Hi David,
I just tested the patch with testpmd and it fixes the previous issue.
John.
A message that is not in the archive (sent off-list or not yet received): B27915DBBA3421428155699D51E4CFE2ECD890-kPTMFJFq+rELt2AQoY/[email protected]
Hello John,
Quoted 9 lines · John
Quoted 1 line
On Wed, Mar 11, 2015 at 9:47 AM, David Marchand <
Quoted 4 lines
wrote:
Just sent a fix : http://dpdk.org/dev/patchwork/patch/3976/
Can you try it ?I just tested the patch with testpmd and it fixes the previous issue.
Ok, thanks, just for the record, can you add your setup ? linux / bsd, uio / vfio (if linux), which pmd ?
Signature · 1 line
David Marchand
A message that is not in the archive (sent off-list or not yet received): CALwxeUuDQqLwqFH-4Y9W0fZPxY1_39kgwmxtnn9yxL7AnNfCzg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
From: David Marchand [mailto:[email protected]]
Sent: Wednesday, March 11, 2015 9:30 PM
To: Mcnamara, John
Cc: Tetsuya Mukawa; [email protected]
Subject: Re: [dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup
Quoted 4 lines
Quoted 1 line
I just tested the patch with testpmd and it fixes the previous issue.
Ok, thanks, just for the record, can you add your setup ? linux / bsd, uio / vfio (if linux), which pmd ?
Hi David,
I always complain when people don't send enough details in bug reports or updates, so sorry about that.
Here we go, it is pretty vanilla but I sure you will get other data points by morning:
$ uname -a
Linux sie-lab-214-036.ir.intel.com 3.6.10-4.fc18.x86_64
#1 SMP Tue Dec 11 18:01:27 UTC 2012 x86_64 x86_64 x86_64 GNU/LinuxUIO with testpmd and skeleton forwarding app
John.
--
A message that is not in the archive (sent off-list or not yet received): B27915DBBA3421428155699D51E4CFE2ECD92D-kPTMFJFq+rELt2AQoY/[email protected]
Quoted 17 lines · John
From: David Marchand [mailto:[email protected]]
Sent: Wednesday, March 11, 2015 9:30 PM
To: Mcnamara, John
Cc: Tetsuya Mukawa; [email protected]
Subject: Re: [dpdk-dev] [PATCH 00/10] eal:rte_tailqapi cleanupQuoted 3 lines
Quoted 1 line
I just tested the patch with testpmd and it fixes the previous issue.
Ok, thanks, just for the record, can you add your setup ? linux / bsd, uio / vfio (if linux), which pmd ?
Hi David,
I always complain when people don't send enough details in bug reports or updates, so sorry about that.
Here we go, it is pretty vanilla but I sure you will get other data points by morning:
Quoted 9 lines
$ uname -a Linux sie-lab-214-036.ir.intel.com 3.6.10-4.fc18.x86_64 #1 SMP Tue Dec 11 18:01:27 UTC 2012 x86_64 x86_64 x86_64 GNU/LinuxUIO with testpmd and skeleton forwarding app
John.
--
Hi David,
I've checked the patch on following environments, and make sure it works fine.
- igb_uio:
- vfio:
- uio_pci_generic
Tested on Ubuntu14.04 (3.13.0-30-generic) with e1000 PMD.
- nic_uio
Tested on FreeBSD 10.1-RELEASE #0 r274401 with e1000 PMD.
Thanks,
Tetsuya
A message that is not in the archive (sent off-list or not yet received): 5500F46F.8020107-AlSX/UN32fvPDbFq/[email protected]
Quoted 35 lines · Tetsuya Mukawa
Quoted 15 lines · John
From: David Marchand [mailto:[email protected]]
Sent: Wednesday, March 11, 2015 9:30 PM
To: Mcnamara, John
Cc: Tetsuya Mukawa; [email protected]
Subject: Re: [dpdk-dev] [PATCH 00/10] eal:rte_tailqapi cleanupQuoted 3 lines
Quoted 1 line
I just tested the patch with testpmd and it fixes the previous issue.
Ok, thanks, just for the record, can you add your setup ? linux / bsd, uio / vfio (if linux), which pmd ?
Hi David,
I always complain when people don't send enough details in bug reports or updates, so sorry about that.
Here we go, it is pretty vanilla but I sure you will get other data points by morning:
Quoted 9 lines
$ uname -a Linux sie-lab-214-036.ir.intel.com 3.6.10-4.fc18.x86_64 #1 SMP Tue Dec 11 18:01:27 UTC 2012 x86_64 x86_64 x86_64 GNU/LinuxUIO with testpmd and skeleton forwarding app
John.
--Hi David,
I've checked the patch on following environments, and make sure it works fine.
-
igb_uio:
- vfio:
-uio_pci_generic
Tested on Ubuntu14.04 (3.13.0-30-generic) with e1000 PMD.
Quoted 6 lines
-
nic_uio
Tested on FreeBSD 10.1-RELEASE #0 r274401 with e1000 PMD.Thanks,
Tetsuya
Sorry for my bad English.
I've already made sure above.
Everything works fine with the patch on my environments.
Tetsuya
Hello John, Tetsuya,
Quoted 13 lines · Tetsuya Mukawa
Quoted 1 line · John
Here we go, it is pretty vanilla but I sure you will get other data
points by morning:
Quoted 6 lines
$ uname -a Linux sie-lab-214-036.ir.intel.com 3.6.10-4.fc18.x86_64 #1 SMP Tue Dec 11 18:01:27 UTC 2012 x86_64 x86_64 x86_64 GNU/LinuxUIO with testpmd and skeleton forwarding app
I've checked the patch on following environments, and make sure it works fine.
Quoted 8 lines
-
igb_uio:
- vfio:
-uio_pci_generic
Tested on Ubuntu14.04 (3.13.0-30-generic) with e1000 PMD.-
nic_uio
Tested on FreeBSD 10.1-RELEASE #0 r274401 with e1000 PMD.
Ok, good.
Big thanks to both of you :-).
The only case remaining would be ivshmem.
Signature · 1 line
David Marchand
A message that is not in the archive (sent off-list or not yet received): CALwxeUsoD3HZ2g4DfWD6A+ccVbpLEcvNaa7w8EewUmK=VDuxHg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Hi David,
I have verified this patch working with ivshmem and vfio driver.
Testing environment:
Commit: 0a530f0d58b0304d3f7515bb14f81fd2b6e6931e OS: Fedora20(3.11.10-301.fc20.x86_64) GCC: gcc version 4.8.3 20140911 QEMU: 1.5.2 with additional ivshmem patch NIC: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection [8086:10fb]
Quoted 41 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of David Marchand
Sent: Thursday, March 12, 2015 1:44 PM
To: Tetsuya Mukawa; Mcnamara, John
Cc: [email protected]
Subject: Re: [dpdk-dev] [PATCH 00/10] eal:rte_tailqapi cleanupHello John, Tetsuya,
Quoted 13 lines · Tetsuya Mukawa
Quoted 1 line · John
Here we go, it is pretty vanilla but I sure you will get other data
points by morning:
Quoted 6 lines
$ uname -a Linux sie-lab-214-036.ir.intel.com 3.6.10-4.fc18.x86_64 #1 SMP Tue Dec 11 18:01:27 UTC 2012 x86_64 x86_64 x86_64 GNU/LinuxUIO with testpmd and skeleton forwarding app
I've checked the patch on following environments, and make sure it works fine.
Quoted 8 lines
-
igb_uio:
- vfio:
-uio_pci_generic
Tested on Ubuntu14.04 (3.13.0-30-generic) with e1000 PMD.-
nic_uio
Tested on FreeBSD 10.1-RELEASE #0 r274401 with e1000 PMD.Ok, good.
Big thanks to both of you :-).The only case remaining would be ivshmem.
--
David Marchand