DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup
@ 2015-03-04 21:50 David Marchand
  2015-03-04 21:50 ` [dpdk-dev] [PATCH 01/10] eal: remove yet another remaining reference to pm David Marchand
                   ` (11 more replies)
  0 siblings, 12 replies; 24+ messages in thread
From: David Marchand @ 2015-03-04 21:50 UTC (permalink / raw)
  To: dev

This is a first cleanup at trying to remove references to other dpdk libraries
from eal.

This cleanup is focused on rte_tailq api which has been marked as "for internal
use" for quite some time now.
Rather than have a static list in eal for all users of rte_tailq, a new register
system is introduced.
This register system uses constructors which have no access to dpdk shared
memory, so a two step registration is done: first step inserts the requested
tailq in a local list ("local" in multi process context), then in second step,
eal init allocates/looks up for a real tailq from shared memory for all elements
of this local list.

I have tried to think of different cases (libraries loaded before/after eal
init...). The unit tests have been updated accordingly.


-- 
David Marchand

David Marchand (10):
  eal: remove yet another remaining reference to pm
  pci: use lookup tailq api
  tailq: remove unneeded inclusion of rte_tailq.h
  tailq: use a single cast macro
  tailq: get rid of broken "reserve" api
  tailq: remove unused RTE_EAL_TAILQ_* macros
  tailq: introduce dynamic register system
  tailq: move to dynamic tailq
  tailq: remove static slots
  eal: no need for E_RTE_NO_TAILQ anymore

 app/test-pipeline/config.c                         |    1 -
 app/test-pipeline/init.c                           |    1 -
 app/test-pipeline/main.c                           |    1 -
 app/test-pipeline/runtime.c                        |    1 -
 app/test-pmd/cmdline.c                             |    1 -
 app/test-pmd/config.c                              |    1 -
 app/test-pmd/csumonly.c                            |    1 -
 app/test-pmd/flowgen.c                             |    1 -
 app/test-pmd/ieee1588fwd.c                         |    1 -
 app/test-pmd/iofwd.c                               |    1 -
 app/test-pmd/macfwd-retry.c                        |    1 -
 app/test-pmd/macfwd.c                              |    1 -
 app/test-pmd/macswap.c                             |    1 -
 app/test-pmd/parameters.c                          |    1 -
 app/test-pmd/rxonly.c                              |    1 -
 app/test-pmd/testpmd.c                             |    1 -
 app/test-pmd/txonly.c                              |    1 -
 app/test/commands.c                                |    1 -
 app/test/test.c                                    |    1 -
 app/test/test_atomic.c                             |    1 -
 app/test/test_errno.c                              |    2 +-
 app/test/test_func_reentrancy.c                    |    1 -
 app/test/test_hash.c                               |    1 -
 app/test/test_hash_perf.c                          |    1 -
 app/test/test_logs.c                               |    1 -
 app/test/test_malloc.c                             |    1 -
 app/test/test_mbuf.c                               |    1 -
 app/test/test_mempool.c                            |    1 -
 app/test/test_mempool_perf.c                       |    1 -
 app/test/test_memzone.c                            |    1 -
 app/test/test_mp_secondary.c                       |    1 -
 app/test/test_per_lcore.c                          |    1 -
 app/test/test_ring.c                               |    1 -
 app/test/test_rwlock.c                             |    1 -
 app/test/test_spinlock.c                           |    1 -
 app/test/test_tailq.c                              |  125 ++++++++--------
 app/test/test_timer.c                              |    1 -
 examples/bond/main.c                               |    1 -
 examples/cmdline/main.c                            |    1 -
 examples/dpdk_qat/crypto.c                         |    1 -
 examples/dpdk_qat/main.c                           |    1 -
 examples/exception_path/main.c                     |    1 -
 examples/helloworld/main.c                         |    1 -
 examples/ip_fragmentation/main.c                   |    1 -
 examples/ip_pipeline/config.c                      |    1 -
 examples/ip_pipeline/init.c                        |    1 -
 examples/ip_pipeline/main.c                        |    1 -
 examples/ip_reassembly/main.c                      |    1 -
 examples/ipv4_multicast/main.c                     |    1 -
 examples/kni/main.c                                |    1 -
 examples/l2fwd-ivshmem/guest/guest.c               |    1 -
 examples/l2fwd-jobstats/main.c                     |    1 -
 examples/l2fwd/main.c                              |    1 -
 examples/l3fwd-acl/main.c                          |    1 -
 examples/l3fwd-power/main.c                        |    1 -
 examples/l3fwd-vf/main.c                           |    1 -
 examples/l3fwd/main.c                              |    1 -
 examples/link_status_interrupt/main.c              |    1 -
 examples/load_balancer/config.c                    |    1 -
 examples/load_balancer/init.c                      |    1 -
 examples/load_balancer/main.c                      |    1 -
 examples/load_balancer/runtime.c                   |    1 -
 .../client_server_mp/mp_client/client.c            |    1 -
 .../client_server_mp/mp_server/init.c              |    1 -
 .../client_server_mp/mp_server/main.c              |    1 -
 examples/multi_process/l2fwd_fork/flib.c           |    1 -
 examples/multi_process/l2fwd_fork/main.c           |    1 -
 examples/multi_process/simple_mp/main.c            |    1 -
 examples/multi_process/simple_mp/mp_commands.c     |    1 -
 examples/multi_process/symmetric_mp/main.c         |    1 -
 examples/timer/main.c                              |    1 -
 examples/vhost_xen/xen_vhost.h                     |    1 -
 examples/vhost_xen/xenstore_parse.c                |    1 -
 examples/vmdq/main.c                               |    1 -
 examples/vmdq_dcb/main.c                           |    1 -
 lib/librte_acl/rte_acl.c                           |   33 ++---
 lib/librte_acl/rte_acl.h                           |    1 -
 lib/librte_acl/rte_acl_osdep.h                     |    1 -
 lib/librte_distributor/rte_distributor.c           |   17 ++-
 lib/librte_eal/bsdapp/eal/eal.c                    |    1 -
 lib/librte_eal/bsdapp/eal/eal_pci.c                |    8 +-
 lib/librte_eal/bsdapp/eal/eal_thread.c             |    1 -
 lib/librte_eal/bsdapp/eal/eal_timer.c              |    1 -
 lib/librte_eal/bsdapp/eal/rte_eal_version.map      |    4 +-
 lib/librte_eal/common/Makefile                     |    2 +-
 lib/librte_eal/common/eal_common_errno.c           |    2 -
 lib/librte_eal/common/eal_common_launch.c          |    1 -
 lib/librte_eal/common/eal_common_log.c             |    1 -
 lib/librte_eal/common/eal_common_memory.c          |    1 -
 lib/librte_eal/common/eal_common_memzone.c         |    1 -
 lib/librte_eal/common/eal_common_pci.c             |    1 -
 lib/librte_eal/common/eal_common_tailqs.c          |  152 +++++++++++++-------
 lib/librte_eal/common/include/rte_eal.h            |   58 --------
 lib/librte_eal/common/include/rte_eal_memconfig.h  |    9 --
 lib/librte_eal/common/include/rte_errno.h          |    1 -
 lib/librte_eal/common/include/rte_tailq.h          |  133 ++++++-----------
 lib/librte_eal/common/include/rte_tailq_elem.h     |   92 ------------
 lib/librte_eal/linuxapp/eal/eal.c                  |    1 -
 lib/librte_eal/linuxapp/eal/eal_alarm.c            |    1 -
 lib/librte_eal/linuxapp/eal/eal_hugepage_info.c    |    1 -
 lib/librte_eal/linuxapp/eal/eal_interrupts.c       |    1 -
 lib/librte_eal/linuxapp/eal/eal_ivshmem.c          |    5 +-
 lib/librte_eal/linuxapp/eal/eal_log.c              |    1 -
 lib/librte_eal/linuxapp/eal/eal_memory.c           |    1 -
 lib/librte_eal/linuxapp/eal/eal_pci.c              |    9 +-
 lib/librte_eal/linuxapp/eal/eal_pci_uio.c          |    1 -
 lib/librte_eal/linuxapp/eal/eal_pci_vfio.c         |    1 -
 lib/librte_eal/linuxapp/eal/eal_pci_vfio_mp_sync.c |    1 -
 lib/librte_eal/linuxapp/eal/eal_thread.c           |    1 -
 lib/librte_eal/linuxapp/eal/eal_timer.c            |    1 -
 lib/librte_eal/linuxapp/eal/eal_xen_memory.c       |    1 -
 lib/librte_eal/linuxapp/eal/rte_eal_version.map    |    4 +-
 lib/librte_ether/rte_ethdev.c                      |    1 -
 lib/librte_hash/rte_fbk_hash.c                     |   33 ++---
 lib/librte_hash/rte_fbk_hash.h                     |    1 -
 lib/librte_hash/rte_hash.c                         |   28 ++--
 lib/librte_hash/rte_hash.h                         |    1 -
 lib/librte_ip_frag/rte_ipv4_reassembly.c           |    1 -
 lib/librte_lpm/rte_lpm.c                           |   35 ++---
 lib/librte_lpm/rte_lpm.h                           |    1 -
 lib/librte_lpm/rte_lpm6.c                          |   27 ++--
 lib/librte_lpm/rte_lpm6.h                          |    1 -
 lib/librte_malloc/malloc_elem.c                    |    1 -
 lib/librte_malloc/malloc_heap.c                    |    1 -
 lib/librte_malloc/rte_malloc.c                     |    1 -
 lib/librte_mbuf/rte_mbuf.c                         |    1 -
 lib/librte_mempool/rte_dom0_mempool.c              |    1 -
 lib/librte_mempool/rte_mempool.c                   |   37 ++---
 lib/librte_mempool/rte_mempool.h                   |    3 -
 lib/librte_pmd_e1000/em_ethdev.c                   |    1 -
 lib/librte_pmd_e1000/em_rxtx.c                     |    1 -
 lib/librte_pmd_e1000/igb_ethdev.c                  |    1 -
 lib/librte_pmd_e1000/igb_rxtx.c                    |    1 -
 lib/librte_pmd_i40e/i40e_ethdev_vf.c               |    1 -
 lib/librte_pmd_ixgbe/ixgbe_ethdev.c                |    1 -
 lib/librte_pmd_ixgbe/ixgbe_rxtx.c                  |    1 -
 lib/librte_pmd_vmxnet3/vmxnet3_ethdev.c            |    1 -
 lib/librte_pmd_vmxnet3/vmxnet3_rxtx.c              |    1 -
 lib/librte_reorder/rte_reorder.c                   |   27 ++--
 lib/librte_reorder/rte_reorder.h                   |    1 -
 lib/librte_ring/rte_ring.c                         |   28 ++--
 lib/librte_ring/rte_ring.h                         |    3 +-
 lib/librte_timer/rte_timer.c                       |    2 +-
 143 files changed, 310 insertions(+), 685 deletions(-)
 delete mode 100644 lib/librte_eal/common/include/rte_tailq_elem.h

-- 
1.7.10.4

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

* [dpdk-dev] [PATCH 01/10] eal: remove yet another remaining reference to pm
  2015-03-04 21:50 [dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup David Marchand
@ 2015-03-04 21:50 ` David Marchand
  2015-03-04 21:50 ` [dpdk-dev] [PATCH 02/10] pci: use lookup tailq api David Marchand
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 24+ messages in thread
From: David Marchand @ 2015-03-04 21:50 UTC (permalink / raw)
  To: dev

Hopefully, this is the last reference to pm.

Signed-off-by: David Marchand <david.marchand@6wind.com>
---
 lib/librte_eal/common/include/rte_tailq_elem.h |    2 --
 1 file changed, 2 deletions(-)

diff --git a/lib/librte_eal/common/include/rte_tailq_elem.h b/lib/librte_eal/common/include/rte_tailq_elem.h
index 3013869..01fc769 100644
--- a/lib/librte_eal/common/include/rte_tailq_elem.h
+++ b/lib/librte_eal/common/include/rte_tailq_elem.h
@@ -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")
-- 
1.7.10.4

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

* [dpdk-dev] [PATCH 02/10] pci: use lookup tailq api
  2015-03-04 21:50 [dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup David Marchand
  2015-03-04 21:50 ` [dpdk-dev] [PATCH 01/10] eal: remove yet another remaining reference to pm David Marchand
@ 2015-03-04 21:50 ` David Marchand
  2015-03-04 21:50 ` [dpdk-dev] [PATCH 03/10] tailq: remove unneeded inclusion of rte_tailq.h David Marchand
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 24+ messages in thread
From: David Marchand @ 2015-03-04 21:50 UTC (permalink / raw)
  To: dev

There is no reason why we should use the "reserve" tailq api, since the pci
entry is already statically reserved.

Signed-off-by: David Marchand <david.marchand@6wind.com>
---
 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(-)

diff --git a/lib/librte_eal/bsdapp/eal/eal_pci.c b/lib/librte_eal/bsdapp/eal/eal_pci.c
index e692b35..4d2fbbb 100644
--- a/lib/librte_eal/bsdapp/eal/eal_pci.c
+++ b/lib/librte_eal/bsdapp/eal/eal_pci.c
@@ -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)
diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c
index 6d4932d..8f44f09 100644
--- a/lib/librte_eal/linuxapp/eal/eal_pci.c
+++ b/lib/librte_eal/linuxapp/eal/eal_pci.c
@@ -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)
-- 
1.7.10.4

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

* [dpdk-dev] [PATCH 03/10] tailq: remove unneeded inclusion of rte_tailq.h
  2015-03-04 21:50 [dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup David Marchand
  2015-03-04 21:50 ` [dpdk-dev] [PATCH 01/10] eal: remove yet another remaining reference to pm David Marchand
  2015-03-04 21:50 ` [dpdk-dev] [PATCH 02/10] pci: use lookup tailq api David Marchand
@ 2015-03-04 21:50 ` David Marchand
  2015-03-04 21:50 ` [dpdk-dev] [PATCH 04/10] tailq: use a single cast macro David Marchand
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 24+ messages in thread
From: David Marchand @ 2015-03-04 21:50 UTC (permalink / raw)
  To: dev

Only keep inclusion where really needed.

Signed-off-by: David Marchand <david.marchand@6wind.com>
---
 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(-)

diff --git a/app/test-pipeline/config.c b/app/test-pipeline/config.c
index 85b6996..72e018c 100644
--- a/app/test-pipeline/config.c
+++ b/app/test-pipeline/config.c
@@ -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>
diff --git a/app/test-pipeline/init.c b/app/test-pipeline/init.c
index cd2ebc4..05f4503 100644
--- a/app/test-pipeline/init.c
+++ b/app/test-pipeline/init.c
@@ -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>
diff --git a/app/test-pipeline/main.c b/app/test-pipeline/main.c
index 129b1fc..685ebd4 100644
--- a/app/test-pipeline/main.c
+++ b/app/test-pipeline/main.c
@@ -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>
diff --git a/app/test-pipeline/runtime.c b/app/test-pipeline/runtime.c
index 1f1ea5f..42a6142 100644
--- a/app/test-pipeline/runtime.c
+++ b/app/test-pipeline/runtime.c
@@ -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>
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index c8312be..fab3c3e 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -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>
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 49be819..0abeba7 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -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>
diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index 52cbd8a..c180ff2 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -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>
diff --git a/app/test-pmd/flowgen.c b/app/test-pmd/flowgen.c
index 8b4ed9a..72016c9 100644
--- a/app/test-pmd/flowgen.c
+++ b/app/test-pmd/flowgen.c
@@ -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>
diff --git a/app/test-pmd/ieee1588fwd.c b/app/test-pmd/ieee1588fwd.c
index 976aa28..84237c1 100644
--- a/app/test-pmd/ieee1588fwd.c
+++ b/app/test-pmd/ieee1588fwd.c
@@ -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>
diff --git a/app/test-pmd/iofwd.c b/app/test-pmd/iofwd.c
index 02a5977..8840d86 100644
--- a/app/test-pmd/iofwd.c
+++ b/app/test-pmd/iofwd.c
@@ -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>
diff --git a/app/test-pmd/macfwd-retry.c b/app/test-pmd/macfwd-retry.c
index 83da26f..3a96b3d 100644
--- a/app/test-pmd/macfwd-retry.c
+++ b/app/test-pmd/macfwd-retry.c
@@ -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>
diff --git a/app/test-pmd/macfwd.c b/app/test-pmd/macfwd.c
index aa3d705..035e5eb 100644
--- a/app/test-pmd/macfwd.c
+++ b/app/test-pmd/macfwd.c
@@ -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>
diff --git a/app/test-pmd/macswap.c b/app/test-pmd/macswap.c
index ec61657..6729849 100644
--- a/app/test-pmd/macswap.c
+++ b/app/test-pmd/macswap.c
@@ -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>
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index fa5f2a8..7949f0c 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -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>
diff --git a/app/test-pmd/rxonly.c b/app/test-pmd/rxonly.c
index fdfe990..ac56090 100644
--- a/app/test-pmd/rxonly.c
+++ b/app/test-pmd/rxonly.c
@@ -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>
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 61291be..a4583d6 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -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>
diff --git a/app/test-pmd/txonly.c b/app/test-pmd/txonly.c
index c984670..ca32c85 100644
--- a/app/test-pmd/txonly.c
+++ b/app/test-pmd/txonly.c
@@ -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>
diff --git a/app/test/commands.c b/app/test/commands.c
index 92a17ed..9cb9606 100644
--- a/app/test/commands.c
+++ b/app/test/commands.c
@@ -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>
diff --git a/app/test/test.c b/app/test/test.c
index 0d3d3ed..e8992f4 100644
--- a/app/test/test.c
+++ b/app/test/test.c
@@ -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>
diff --git a/app/test/test_atomic.c b/app/test/test_atomic.c
index 3347413..588f530 100644
--- a/app/test/test_atomic.c
+++ b/app/test/test_atomic.c
@@ -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>
diff --git a/app/test/test_func_reentrancy.c b/app/test/test_func_reentrancy.c
index 45928fa..dc070af 100644
--- a/app/test/test_func_reentrancy.c
+++ b/app/test/test_func_reentrancy.c
@@ -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>
diff --git a/app/test/test_hash.c b/app/test/test_hash.c
index 653dd86..6a5d044 100644
--- a/app/test/test_hash.c
+++ b/app/test/test_hash.c
@@ -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>
diff --git a/app/test/test_hash_perf.c b/app/test/test_hash_perf.c
index 842b218..bd531ec 100644
--- a/app/test/test_hash_perf.c
+++ b/app/test/test_hash_perf.c
@@ -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>
diff --git a/app/test/test_logs.c b/app/test/test_logs.c
index 2063c74..18a3b6a 100644
--- a/app/test/test_logs.c
+++ b/app/test/test_logs.c
@@ -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>
diff --git a/app/test/test_malloc.c b/app/test/test_malloc.c
index 8c53132..ea6f651 100644
--- a/app/test/test_malloc.c
+++ b/app/test/test_malloc.c
@@ -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>
diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c
index 9de6dea..1ff66cb 100644
--- a/app/test/test_mbuf.c
+++ b/app/test/test_mbuf.c
@@ -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>
diff --git a/app/test/test_mempool.c b/app/test/test_mempool.c
index de85c9c..9eb0d5d 100644
--- a/app/test/test_mempool.c
+++ b/app/test/test_mempool.c
@@ -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>
diff --git a/app/test/test_mempool_perf.c b/app/test/test_mempool_perf.c
index 57c0e5e..1f7539c 100644
--- a/app/test/test_mempool_perf.c
+++ b/app/test/test_mempool_perf.c
@@ -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>
diff --git a/app/test/test_memzone.c b/app/test/test_memzone.c
index 5da6903..9c7a1cb 100644
--- a/app/test/test_memzone.c
+++ b/app/test/test_memzone.c
@@ -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>
diff --git a/app/test/test_mp_secondary.c b/app/test/test_mp_secondary.c
index b5d6802..2f941b5 100644
--- a/app/test/test_mp_secondary.c
+++ b/app/test/test_mp_secondary.c
@@ -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>
diff --git a/app/test/test_per_lcore.c b/app/test/test_per_lcore.c
index 1a5a232..b16449a 100644
--- a/app/test/test_per_lcore.c
+++ b/app/test/test_per_lcore.c
@@ -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>
diff --git a/app/test/test_ring.c b/app/test/test_ring.c
index ce25329..e5614de 100644
--- a/app/test/test_ring.c
+++ b/app/test/test_ring.c
@@ -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>
diff --git a/app/test/test_rwlock.c b/app/test/test_rwlock.c
index c4e6e95..b383bba 100644
--- a/app/test/test_rwlock.c
+++ b/app/test/test_rwlock.c
@@ -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>
diff --git a/app/test/test_spinlock.c b/app/test/test_spinlock.c
index c95b0c0..16ced7f 100644
--- a/app/test/test_spinlock.c
+++ b/app/test/test_spinlock.c
@@ -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>
diff --git a/app/test/test_tailq.c b/app/test/test_tailq.c
index 4d32c6f..b0f9a78 100644
--- a/app/test/test_tailq.c
+++ b/app/test/test_tailq.c
@@ -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"
 
diff --git a/app/test/test_timer.c b/app/test/test_timer.c
index 79fa955..73da5b6 100644
--- a/app/test/test_timer.c
+++ b/app/test/test_timer.c
@@ -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>
diff --git a/examples/bond/main.c b/examples/bond/main.c
index 7da6bfc..67c283d 100644
--- a/examples/bond/main.c
+++ b/examples/bond/main.c
@@ -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>
diff --git a/examples/cmdline/main.c b/examples/cmdline/main.c
index f8ee0a5..c966df0 100644
--- a/examples/cmdline/main.c
+++ b/examples/cmdline/main.c
@@ -72,7 +72,6 @@
 
 #include <rte_memory.h>
 #include <rte_memzone.h>
-#include <rte_tailq.h>
 #include <rte_eal.h>
 #include <rte_debug.h>
 
diff --git a/examples/dpdk_qat/crypto.c b/examples/dpdk_qat/crypto.c
index f0471e0..00e0eb5 100644
--- a/examples/dpdk_qat/crypto.c
+++ b/examples/dpdk_qat/crypto.c
@@ -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>
diff --git a/examples/dpdk_qat/main.c b/examples/dpdk_qat/main.c
index 22f5ebf..20e78bc 100644
--- a/examples/dpdk_qat/main.c
+++ b/examples/dpdk_qat/main.c
@@ -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>
diff --git a/examples/exception_path/main.c b/examples/exception_path/main.c
index 830cfd8..14582de 100644
--- a/examples/exception_path/main.c
+++ b/examples/exception_path/main.c
@@ -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>
diff --git a/examples/helloworld/main.c b/examples/helloworld/main.c
index a4bbd11..8b7a2de 100644
--- a/examples/helloworld/main.c
+++ b/examples/helloworld/main.c
@@ -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>
diff --git a/examples/ip_fragmentation/main.c b/examples/ip_fragmentation/main.c
index eac5427..93ea2a1 100644
--- a/examples/ip_fragmentation/main.c
+++ b/examples/ip_fragmentation/main.c
@@ -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>
diff --git a/examples/ip_pipeline/config.c b/examples/ip_pipeline/config.c
index 2af0b00..9414a7b 100644
--- a/examples/ip_pipeline/config.c
+++ b/examples/ip_pipeline/config.c
@@ -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>
diff --git a/examples/ip_pipeline/init.c b/examples/ip_pipeline/init.c
index e7ff86a..96aee2b 100644
--- a/examples/ip_pipeline/init.c
+++ b/examples/ip_pipeline/init.c
@@ -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>
diff --git a/examples/ip_pipeline/main.c b/examples/ip_pipeline/main.c
index 7eee187..eb750b6 100644
--- a/examples/ip_pipeline/main.c
+++ b/examples/ip_pipeline/main.c
@@ -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>
diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c
index 8492153..75ecfed 100644
--- a/examples/ip_reassembly/main.c
+++ b/examples/ip_reassembly/main.c
@@ -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>
diff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c
index 7ddb835..eed5611 100644
--- a/examples/ipv4_multicast/main.c
+++ b/examples/ipv4_multicast/main.c
@@ -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>
diff --git a/examples/kni/main.c b/examples/kni/main.c
index 2bff1e1..19d25d4 100644
--- a/examples/kni/main.c
+++ b/examples/kni/main.c
@@ -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>
diff --git a/examples/l2fwd-ivshmem/guest/guest.c b/examples/l2fwd-ivshmem/guest/guest.c
index 6e0db36..7c49521 100644
--- a/examples/l2fwd-ivshmem/guest/guest.c
+++ b/examples/l2fwd-ivshmem/guest/guest.c
@@ -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>
diff --git a/examples/l2fwd-jobstats/main.c b/examples/l2fwd-jobstats/main.c
index a5a1aaa..67a9bad 100644
--- a/examples/l2fwd-jobstats/main.c
+++ b/examples/l2fwd-jobstats/main.c
@@ -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>
diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c
index e684234..17621ee 100644
--- a/examples/l2fwd/main.c
+++ b/examples/l2fwd/main.c
@@ -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>
diff --git a/examples/l3fwd-acl/main.c b/examples/l3fwd-acl/main.c
index 9d84b20..fce55f3 100644
--- a/examples/l3fwd-acl/main.c
+++ b/examples/l3fwd-acl/main.c
@@ -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>
diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
index f6b55b9..4221239 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -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>
diff --git a/examples/l3fwd-vf/main.c b/examples/l3fwd-vf/main.c
index 7cc7228..20ba03a 100644
--- a/examples/l3fwd-vf/main.c
+++ b/examples/l3fwd-vf/main.c
@@ -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>
diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c
index 6f7d7d4..3edb250 100644
--- a/examples/l3fwd/main.c
+++ b/examples/l3fwd/main.c
@@ -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>
diff --git a/examples/link_status_interrupt/main.c b/examples/link_status_interrupt/main.c
index 0e01fc0..e6fb218 100644
--- a/examples/link_status_interrupt/main.c
+++ b/examples/link_status_interrupt/main.c
@@ -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>
diff --git a/examples/load_balancer/config.c b/examples/load_balancer/config.c
index 6e2fad0..35f1441 100644
--- a/examples/load_balancer/config.c
+++ b/examples/load_balancer/config.c
@@ -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>
diff --git a/examples/load_balancer/init.c b/examples/load_balancer/init.c
index aeff5ca..b35f797 100644
--- a/examples/load_balancer/init.c
+++ b/examples/load_balancer/init.c
@@ -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>
diff --git a/examples/load_balancer/main.c b/examples/load_balancer/main.c
index d0e2c05..7ede358 100644
--- a/examples/load_balancer/main.c
+++ b/examples/load_balancer/main.c
@@ -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>
diff --git a/examples/load_balancer/runtime.c b/examples/load_balancer/runtime.c
index a53f33f..adec4ba 100644
--- a/examples/load_balancer/runtime.c
+++ b/examples/load_balancer/runtime.c
@@ -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>
diff --git a/examples/multi_process/client_server_mp/mp_client/client.c b/examples/multi_process/client_server_mp/mp_client/client.c
index af8f819..bf049a4 100644
--- a/examples/multi_process/client_server_mp/mp_client/client.c
+++ b/examples/multi_process/client_server_mp/mp_client/client.c
@@ -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>
diff --git a/examples/multi_process/client_server_mp/mp_server/init.c b/examples/multi_process/client_server_mp/mp_server/init.c
index bec1cb6..aadee76 100644
--- a/examples/multi_process/client_server_mp/mp_server/init.c
+++ b/examples/multi_process/client_server_mp/mp_server/init.c
@@ -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>
diff --git a/examples/multi_process/client_server_mp/mp_server/main.c b/examples/multi_process/client_server_mp/mp_server/main.c
index 01ccd37..de54c67 100644
--- a/examples/multi_process/client_server_mp/mp_server/main.c
+++ b/examples/multi_process/client_server_mp/mp_server/main.c
@@ -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>
diff --git a/examples/multi_process/l2fwd_fork/flib.c b/examples/multi_process/l2fwd_fork/flib.c
index 095e2f7..343f09f 100644
--- a/examples/multi_process/l2fwd_fork/flib.c
+++ b/examples/multi_process/l2fwd_fork/flib.c
@@ -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>
diff --git a/examples/multi_process/l2fwd_fork/main.c b/examples/multi_process/l2fwd_fork/main.c
index 78a04ca..04a5d20 100644
--- a/examples/multi_process/l2fwd_fork/main.c
+++ b/examples/multi_process/l2fwd_fork/main.c
@@ -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>
diff --git a/examples/multi_process/simple_mp/main.c b/examples/multi_process/simple_mp/main.c
index 8e1ace9..2843d94 100644
--- a/examples/multi_process/simple_mp/main.c
+++ b/examples/multi_process/simple_mp/main.c
@@ -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>
diff --git a/examples/multi_process/simple_mp/mp_commands.c b/examples/multi_process/simple_mp/mp_commands.c
index bf882c9..8da244b 100644
--- a/examples/multi_process/simple_mp/mp_commands.c
+++ b/examples/multi_process/simple_mp/mp_commands.c
@@ -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>
diff --git a/examples/multi_process/symmetric_mp/main.c b/examples/multi_process/symmetric_mp/main.c
index 2fc2acf..48448b4 100644
--- a/examples/multi_process/symmetric_mp/main.c
+++ b/examples/multi_process/symmetric_mp/main.c
@@ -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>
diff --git a/examples/timer/main.c b/examples/timer/main.c
index 5a5d33c..37ad559 100644
--- a/examples/timer/main.c
+++ b/examples/timer/main.c
@@ -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>
diff --git a/examples/vhost_xen/xen_vhost.h b/examples/vhost_xen/xen_vhost.h
index 8c0d15a..2fc304c 100644
--- a/examples/vhost_xen/xen_vhost.h
+++ b/examples/vhost_xen/xen_vhost.h
@@ -36,7 +36,6 @@
 
 #include <stdint.h>
 
-#include <rte_tailq.h>
 #include <rte_ether.h>
 
 #include "virtio-net.h"
diff --git a/examples/vhost_xen/xenstore_parse.c b/examples/vhost_xen/xenstore_parse.c
index df191ac..eb629e2 100644
--- a/examples/vhost_xen/xenstore_parse.c
+++ b/examples/vhost_xen/xenstore_parse.c
@@ -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>
diff --git a/examples/vmdq/main.c b/examples/vmdq/main.c
index 2c6a649..7001860 100644
--- a/examples/vmdq/main.c
+++ b/examples/vmdq/main.c
@@ -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>
diff --git a/examples/vmdq_dcb/main.c b/examples/vmdq_dcb/main.c
index 61d3e34..048c167 100644
--- a/examples/vmdq_dcb/main.c
+++ b/examples/vmdq_dcb/main.c
@@ -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>
diff --git a/lib/librte_acl/rte_acl_osdep.h b/lib/librte_acl/rte_acl_osdep.h
index 121c1b4..6287c84 100644
--- a/lib/librte_acl/rte_acl_osdep.h
+++ b/lib/librte_acl/rte_acl_osdep.h
@@ -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>
diff --git a/lib/librte_distributor/rte_distributor.c b/lib/librte_distributor/rte_distributor.c
index e0fdb4c..84e78bb 100644
--- a/lib/librte_distributor/rte_distributor.c
+++ b/lib/librte_distributor/rte_distributor.c
@@ -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"
 
diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c
index 0e67471..871d5f4 100644
--- a/lib/librte_eal/bsdapp/eal/eal.c
+++ b/lib/librte_eal/bsdapp/eal/eal.c
@@ -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>
diff --git a/lib/librte_eal/bsdapp/eal/eal_pci.c b/lib/librte_eal/bsdapp/eal/eal_pci.c
index 4d2fbbb..5457a21 100644
--- a/lib/librte_eal/bsdapp/eal/eal_pci.c
+++ b/lib/librte_eal/bsdapp/eal/eal_pci.c
@@ -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>
diff --git a/lib/librte_eal/bsdapp/eal/eal_thread.c b/lib/librte_eal/bsdapp/eal/eal_thread.c
index ca95c72..9a03437 100644
--- a/lib/librte_eal/bsdapp/eal/eal_thread.c
+++ b/lib/librte_eal/bsdapp/eal/eal_thread.c
@@ -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>
diff --git a/lib/librte_eal/bsdapp/eal/eal_timer.c b/lib/librte_eal/bsdapp/eal/eal_timer.c
index 3163496..7147abe 100644
--- a/lib/librte_eal/bsdapp/eal/eal_timer.c
+++ b/lib/librte_eal/bsdapp/eal/eal_timer.c
@@ -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>
diff --git a/lib/librte_eal/common/eal_common_launch.c b/lib/librte_eal/common/eal_common_launch.c
index 599f83b..152d1c3 100644
--- a/lib/librte_eal/common/eal_common_launch.c
+++ b/lib/librte_eal/common/eal_common_launch.c
@@ -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>
diff --git a/lib/librte_eal/common/eal_common_log.c b/lib/librte_eal/common/eal_common_log.c
index e8dc94a..ff44d23 100644
--- a/lib/librte_eal/common/eal_common_log.c
+++ b/lib/librte_eal/common/eal_common_log.c
@@ -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>
diff --git a/lib/librte_eal/common/eal_common_memory.c b/lib/librte_eal/common/eal_common_memory.c
index 77830f8..9a07b1e 100644
--- a/lib/librte_eal/common/eal_common_memory.c
+++ b/lib/librte_eal/common/eal_common_memory.c
@@ -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>
diff --git a/lib/librte_eal/common/eal_common_memzone.c b/lib/librte_eal/common/eal_common_memzone.c
index a588012..888f9e5 100644
--- a/lib/librte_eal/common/eal_common_memzone.c
+++ b/lib/librte_eal/common/eal_common_memzone.c
@@ -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>
diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c
index 5b6b55d..808b87b 100644
--- a/lib/librte_eal/common/eal_common_pci.c
+++ b/lib/librte_eal/common/eal_common_pci.c
@@ -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>
diff --git a/lib/librte_eal/common/eal_common_tailqs.c b/lib/librte_eal/common/eal_common_tailqs.c
index db9a185..a61e3f3 100644
--- a/lib/librte_eal/common/eal_common_tailqs.c
+++ b/lib/librte_eal/common/eal_common_tailqs.c
@@ -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>
diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c
index 16f9e7c..bd770cf 100644
--- a/lib/librte_eal/linuxapp/eal/eal.c
+++ b/lib/librte_eal/linuxapp/eal/eal.c
@@ -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>
diff --git a/lib/librte_eal/linuxapp/eal/eal_alarm.c b/lib/librte_eal/linuxapp/eal/eal_alarm.c
index e8da32f..a0eae1e 100644
--- a/lib/librte_eal/linuxapp/eal/eal_alarm.c
+++ b/lib/librte_eal/linuxapp/eal/eal_alarm.c
@@ -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>
diff --git a/lib/librte_eal/linuxapp/eal/eal_hugepage_info.c b/lib/librte_eal/linuxapp/eal/eal_hugepage_info.c
index 8d29e06..028e309 100644
--- a/lib/librte_eal/linuxapp/eal/eal_hugepage_info.c
+++ b/lib/librte_eal/linuxapp/eal/eal_hugepage_info.c
@@ -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>
diff --git a/lib/librte_eal/linuxapp/eal/eal_interrupts.c b/lib/librte_eal/linuxapp/eal/eal_interrupts.c
index 8c5b834..66deda2 100644
--- a/lib/librte_eal/linuxapp/eal/eal_interrupts.c
+++ b/lib/librte_eal/linuxapp/eal/eal_interrupts.c
@@ -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>
diff --git a/lib/librte_eal/linuxapp/eal/eal_log.c b/lib/librte_eal/linuxapp/eal/eal_log.c
index a2d9056..0b133c3 100644
--- a/lib/librte_eal/linuxapp/eal/eal_log.c
+++ b/lib/librte_eal/linuxapp/eal/eal_log.c
@@ -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>
diff --git a/lib/librte_eal/linuxapp/eal/eal_memory.c b/lib/librte_eal/linuxapp/eal/eal_memory.c
index a67a1b0..5f9f92e 100644
--- a/lib/librte_eal/linuxapp/eal/eal_memory.c
+++ b/lib/librte_eal/linuxapp/eal/eal_memory.c
@@ -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>
diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c
index 8f44f09..595f17b 100644
--- a/lib/librte_eal/linuxapp/eal/eal_pci.c
+++ b/lib/librte_eal/linuxapp/eal/eal_pci.c
@@ -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>
diff --git a/lib/librte_eal/linuxapp/eal/eal_pci_uio.c b/lib/librte_eal/linuxapp/eal/eal_pci_uio.c
index 0b397ca..ebbc2d3 100644
--- a/lib/librte_eal/linuxapp/eal/eal_pci_uio.c
+++ b/lib/librte_eal/linuxapp/eal/eal_pci_uio.c
@@ -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"
diff --git a/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c b/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c
index ee9660f..9b0c151 100644
--- a/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c
+++ b/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c
@@ -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>
diff --git a/lib/librte_eal/linuxapp/eal/eal_pci_vfio_mp_sync.c b/lib/librte_eal/linuxapp/eal/eal_pci_vfio_mp_sync.c
index 6588fb1..fec7080 100644
--- a/lib/librte_eal/linuxapp/eal/eal_pci_vfio_mp_sync.c
+++ b/lib/librte_eal/linuxapp/eal/eal_pci_vfio_mp_sync.c
@@ -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>
 
diff --git a/lib/librte_eal/linuxapp/eal/eal_thread.c b/lib/librte_eal/linuxapp/eal/eal_thread.c
index 5635c7d..18bd8e0 100644
--- a/lib/librte_eal/linuxapp/eal/eal_thread.c
+++ b/lib/librte_eal/linuxapp/eal/eal_thread.c
@@ -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>
diff --git a/lib/librte_eal/linuxapp/eal/eal_timer.c b/lib/librte_eal/linuxapp/eal/eal_timer.c
index ca57916..169c6e1 100644
--- a/lib/librte_eal/linuxapp/eal/eal_timer.c
+++ b/lib/librte_eal/linuxapp/eal/eal_timer.c
@@ -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>
diff --git a/lib/librte_eal/linuxapp/eal/eal_xen_memory.c b/lib/librte_eal/linuxapp/eal/eal_xen_memory.c
index ee5cc2d..9246f83 100644
--- a/lib/librte_eal/linuxapp/eal/eal_xen_memory.c
+++ b/lib/librte_eal/linuxapp/eal/eal_xen_memory.c
@@ -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>
diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
index 6ea7a17..3b91394 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -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>
diff --git a/lib/librte_hash/rte_fbk_hash.c b/lib/librte_hash/rte_fbk_hash.c
index 421e1cd..c342c0d 100644
--- a/lib/librte_hash/rte_fbk_hash.c
+++ b/lib/librte_hash/rte_fbk_hash.c
@@ -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>
diff --git a/lib/librte_hash/rte_hash.c b/lib/librte_hash/rte_hash.c
index ba827d2..b6a2b2f 100644
--- a/lib/librte_hash/rte_hash.c
+++ b/lib/librte_hash/rte_hash.c
@@ -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>
diff --git a/lib/librte_ip_frag/rte_ipv4_reassembly.c b/lib/librte_ip_frag/rte_ipv4_reassembly.c
index 0b8ceeb..841ac14 100644
--- a/lib/librte_ip_frag/rte_ipv4_reassembly.c
+++ b/lib/librte_ip_frag/rte_ipv4_reassembly.c
@@ -34,7 +34,6 @@
 #include <stddef.h>
 
 #include <rte_debug.h>
-#include <rte_tailq.h>
 
 #include "ip_frag_common.h"
 
diff --git a/lib/librte_lpm/rte_lpm.c b/lib/librte_lpm/rte_lpm.c
index cc51210..264cde8 100644
--- a/lib/librte_lpm/rte_lpm.c
+++ b/lib/librte_lpm/rte_lpm.c
@@ -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>
diff --git a/lib/librte_lpm/rte_lpm6.c b/lib/librte_lpm/rte_lpm6.c
index 42e6d80..d72f9b3 100644
--- a/lib/librte_lpm/rte_lpm6.c
+++ b/lib/librte_lpm/rte_lpm6.c
@@ -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>
diff --git a/lib/librte_malloc/malloc_elem.c b/lib/librte_malloc/malloc_elem.c
index ef26e47..fd0532e 100644
--- a/lib/librte_malloc/malloc_elem.c
+++ b/lib/librte_malloc/malloc_elem.c
@@ -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>
diff --git a/lib/librte_malloc/malloc_heap.c b/lib/librte_malloc/malloc_heap.c
index 95fcfec..defb903 100644
--- a/lib/librte_malloc/malloc_heap.c
+++ b/lib/librte_malloc/malloc_heap.c
@@ -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>
diff --git a/lib/librte_malloc/rte_malloc.c b/lib/librte_malloc/rte_malloc.c
index 8811718..c313a57 100644
--- a/lib/librte_malloc/rte_malloc.c
+++ b/lib/librte_malloc/rte_malloc.c
@@ -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>
diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c
index 4c940bd..526b18d 100644
--- a/lib/librte_mbuf/rte_mbuf.c
+++ b/lib/librte_mbuf/rte_mbuf.c
@@ -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>
diff --git a/lib/librte_mempool/rte_dom0_mempool.c b/lib/librte_mempool/rte_dom0_mempool.c
index 9ec68fb..8900171 100644
--- a/lib/librte_mempool/rte_dom0_mempool.c
+++ b/lib/librte_mempool/rte_dom0_mempool.c
@@ -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>
diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c
index 4cf6c25..bb40523 100644
--- a/lib/librte_mempool/rte_mempool.c
+++ b/lib/librte_mempool/rte_mempool.c
@@ -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>
diff --git a/lib/librte_pmd_e1000/em_ethdev.c b/lib/librte_pmd_e1000/em_ethdev.c
index 3f2897e..834efd6 100644
--- a/lib/librte_pmd_e1000/em_ethdev.c
+++ b/lib/librte_pmd_e1000/em_ethdev.c
@@ -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>
diff --git a/lib/librte_pmd_e1000/em_rxtx.c b/lib/librte_pmd_e1000/em_rxtx.c
index aa0b88c..8e20920 100644
--- a/lib/librte_pmd_e1000/em_rxtx.c
+++ b/lib/librte_pmd_e1000/em_rxtx.c
@@ -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>
diff --git a/lib/librte_pmd_e1000/igb_ethdev.c b/lib/librte_pmd_e1000/igb_ethdev.c
index 504ae74..d006b5f 100644
--- a/lib/librte_pmd_e1000/igb_ethdev.c
+++ b/lib/librte_pmd_e1000/igb_ethdev.c
@@ -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>
diff --git a/lib/librte_pmd_e1000/igb_rxtx.c b/lib/librte_pmd_e1000/igb_rxtx.c
index cdf2cac..946b39d 100644
--- a/lib/librte_pmd_e1000/igb_rxtx.c
+++ b/lib/librte_pmd_e1000/igb_rxtx.c
@@ -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>
diff --git a/lib/librte_pmd_i40e/i40e_ethdev_vf.c b/lib/librte_pmd_i40e/i40e_ethdev_vf.c
index f031c19..59db531 100644
--- a/lib/librte_pmd_i40e/i40e_ethdev_vf.c
+++ b/lib/librte_pmd_i40e/i40e_ethdev_vf.c
@@ -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>
diff --git a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c b/lib/librte_pmd_ixgbe/ixgbe_ethdev.c
index 9bdc046..9f63297 100644
--- a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c
+++ b/lib/librte_pmd_ixgbe/ixgbe_ethdev.c
@@ -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>
diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
index 3059375..e1d207f 100644
--- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
+++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
@@ -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>
diff --git a/lib/librte_pmd_vmxnet3/vmxnet3_ethdev.c b/lib/librte_pmd_vmxnet3/vmxnet3_ethdev.c
index 6068c60..b83d9d7 100644
--- a/lib/librte_pmd_vmxnet3/vmxnet3_ethdev.c
+++ b/lib/librte_pmd_vmxnet3/vmxnet3_ethdev.c
@@ -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>
diff --git a/lib/librte_pmd_vmxnet3/vmxnet3_rxtx.c b/lib/librte_pmd_vmxnet3/vmxnet3_rxtx.c
index 4d8a010..a530c80 100644
--- a/lib/librte_pmd_vmxnet3/vmxnet3_rxtx.c
+++ b/lib/librte_pmd_vmxnet3/vmxnet3_rxtx.c
@@ -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>
diff --git a/lib/librte_reorder/rte_reorder.c b/lib/librte_reorder/rte_reorder.c
index 42d2a47..c5ce794 100644
--- a/lib/librte_reorder/rte_reorder.c
+++ b/lib/librte_reorder/rte_reorder.c
@@ -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"
diff --git a/lib/librte_ring/rte_ring.c b/lib/librte_ring/rte_ring.c
index f5899c4..92ecf04 100644
--- a/lib/librte_ring/rte_ring.c
+++ b/lib/librte_ring/rte_ring.c
@@ -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>
diff --git a/lib/librte_timer/rte_timer.c b/lib/librte_timer/rte_timer.c
index 15d2243..8e9243a 100644
--- a/lib/librte_timer/rte_timer.c
+++ b/lib/librte_timer/rte_timer.c
@@ -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>
-- 
1.7.10.4

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

* [dpdk-dev] [PATCH 04/10] tailq: use a single cast macro
  2015-03-04 21:50 [dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup David Marchand
                   ` (2 preceding siblings ...)
  2015-03-04 21:50 ` [dpdk-dev] [PATCH 03/10] tailq: remove unneeded inclusion of rte_tailq.h David Marchand
@ 2015-03-04 21:50 ` David Marchand
  2015-03-04 21:50 ` [dpdk-dev] [PATCH 05/10] tailq: get rid of broken "reserve" api David Marchand
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 24+ messages in thread
From: David Marchand @ 2015-03-04 21:50 UTC (permalink / raw)
  To: dev

No need to cast everywhere, define a common macro for this, plus it can be used
in future commits.

Signed-off-by: David Marchand <david.marchand@6wind.com>
---
 lib/librte_eal/common/include/rte_tailq.h |   14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/lib/librte_eal/common/include/rte_tailq.h b/lib/librte_eal/common/include/rte_tailq.h
index b34e5ed..6ac4b9b 100644
--- a/lib/librte_eal/common/include/rte_tailq.h
+++ b/lib/librte_eal/common/include/rte_tailq.h
@@ -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
-- 
1.7.10.4

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

* [dpdk-dev] [PATCH 05/10] tailq: get rid of broken "reserve" api
  2015-03-04 21:50 [dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup David Marchand
                   ` (3 preceding siblings ...)
  2015-03-04 21:50 ` [dpdk-dev] [PATCH 04/10] tailq: use a single cast macro David Marchand
@ 2015-03-04 21:50 ` David Marchand
  2015-03-04 21:50 ` [dpdk-dev] [PATCH 06/10] tailq: remove unused RTE_EAL_TAILQ_* macros David Marchand
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 24+ messages in thread
From: David Marchand @ 2015-03-04 21:50 UTC (permalink / raw)
  To: dev

The "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.

Signed-off-by: David Marchand <david.marchand@6wind.com>
---
 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(-)

diff --git a/app/test/test_tailq.c b/app/test/test_tailq.c
index b0f9a78..56656f0 100644
--- a/app/test/test_tailq.c
+++ b/app/test/test_tailq.c
@@ -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;
 }
 
diff --git a/lib/librte_eal/bsdapp/eal/rte_eal_version.map b/lib/librte_eal/bsdapp/eal/rte_eal_version.map
index d83524d..c94fe8e 100644
--- a/lib/librte_eal/bsdapp/eal/rte_eal_version.map
+++ b/lib/librte_eal/bsdapp/eal/rte_eal_version.map
@@ -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;
diff --git a/lib/librte_eal/common/eal_common_tailqs.c b/lib/librte_eal/common/eal_common_tailqs.c
index a61e3f3..975ee74 100644
--- a/lib/librte_eal/common/eal_common_tailqs.c
+++ b/lib/librte_eal/common/eal_common_tailqs.c
@@ -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)
 {
diff --git a/lib/librte_eal/common/include/rte_tailq.h b/lib/librte_eal/common/include/rte_tailq.h
index 6ac4b9b..6b7278c 100644
--- a/lib/librte_eal/common/include/rte_tailq.h
+++ b/lib/librte_eal/common/include/rte_tailq.h
@@ -76,45 +76,6 @@ struct rte_tailq_head {
 	(struct struct_name *)&(tailq_entry)->tailq_head
 
 /**
- * Utility macro to make reserving a tailqueue for a particular struct easier.
- *
- * @param name
- *   The name to be given to the tailq - used by lookup to find it later
- *
- * @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_reserve, 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_RESERVE(name, struct_name) \
-	RTE_TAILQ_CAST(rte_eal_tailq_reserve(name), struct_name)
-
-/**
- * Utility macro to make reserving a tailqueue for a particular struct easier.
- *
- * @param idx
- *   The tailq idx defined in rte_tail_t to be given to the tail queue.
- *       - used by lookup to find it later
- *
- * @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_reserve, 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_RESERVE_BY_IDX(idx, struct_name) \
-	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.
  *
  * @param name
@@ -153,30 +114,6 @@ struct rte_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
- * Note: this function, along with rte_tailq_lookup, is not multi-thread safe,
- * and both these functions should only be called from a single thread at a time
- *
- * @param name
- *   The name to be given to the tail queue.
- * @return
- *   A pointer to the newly reserved tailq entry
- */
-struct rte_tailq_head *rte_eal_tailq_reserve(const char *name);
-
-/**
- * Reserve a slot in the tailq list for a particular tailq header
- * Note: this function, along with rte_tailq_lookup, is not multi-thread safe,
- * and both these functions 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 newly reserved tailq entry
- */
-struct rte_tailq_head *rte_eal_tailq_reserve_by_idx(const unsigned idx);
-
-/**
  * Dump tail queues to the console.
  *
  * @param f
@@ -187,10 +124,10 @@ void rte_dump_tailq(FILE *f);
 /**
  * Lookup for a tail queue.
  *
- * Get a pointer to a tail queue header of an already reserved tail
+ * Get a pointer to a tail queue header of a tail
  * queue identified by the name given as an argument.
- * Note: this function, along with rte_tailq_reserve, is not multi-thread safe,
- * and both these functions should only be called from a single thread at a time
+ * Note: this function is not multi-thread safe, and should only be called from
+ * a single thread at a time
  *
  * @param name
  *   The name of the queue.
@@ -202,10 +139,10 @@ 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 an already reserved tail
+ * Get a pointer to a tail queue header of a tail
  * queue identified by the name given as an argument.
- * Note: this function, along with rte_tailq_reserve, is not multi-thread safe,
- * and both these functions should only be called from a single thread at a time
+ * 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.
diff --git a/lib/librte_eal/linuxapp/eal/rte_eal_version.map b/lib/librte_eal/linuxapp/eal/rte_eal_version.map
index 54f5ff1..a1ba203 100644
--- a/lib/librte_eal/linuxapp/eal/rte_eal_version.map
+++ b/lib/librte_eal/linuxapp/eal/rte_eal_version.map
@@ -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;
-- 
1.7.10.4

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

* [dpdk-dev] [PATCH 06/10] tailq: remove unused RTE_EAL_TAILQ_* macros
  2015-03-04 21:50 [dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup David Marchand
                   ` (4 preceding siblings ...)
  2015-03-04 21:50 ` [dpdk-dev] [PATCH 05/10] tailq: get rid of broken "reserve" api David Marchand
@ 2015-03-04 21:50 ` David Marchand
  2015-03-04 21:50 ` [dpdk-dev] [PATCH 07/10] tailq: introduce dynamic register system David Marchand
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 24+ messages in thread
From: David Marchand @ 2015-03-04 21:50 UTC (permalink / raw)
  To: dev

A lot of places just protect against concurrent access and I can not see the
gain of having those macros.

Signed-off-by: David Marchand <david.marchand@6wind.com>
---
 lib/librte_eal/common/include/rte_eal.h |   58 -------------------------------
 lib/librte_mempool/rte_mempool.c        |   10 ++++--
 2 files changed, 7 insertions(+), 61 deletions(-)

diff --git a/lib/librte_eal/common/include/rte_eal.h b/lib/librte_eal/common/include/rte_eal.h
index b72606b..1385a73 100644
--- a/lib/librte_eal/common/include/rte_eal.h
+++ b/lib/librte_eal/common/include/rte_eal.h
@@ -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.
diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c
index bb40523..3301e97 100644
--- a/lib/librte_mempool/rte_mempool.c
+++ b/lib/librte_mempool/rte_mempool.c
@@ -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);
-- 
1.7.10.4

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

* [dpdk-dev] [PATCH 07/10] tailq: introduce dynamic register system
  2015-03-04 21:50 [dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup David Marchand
                   ` (5 preceding siblings ...)
  2015-03-04 21:50 ` [dpdk-dev] [PATCH 06/10] tailq: remove unused RTE_EAL_TAILQ_* macros David Marchand
@ 2015-03-04 21:50 ` David Marchand
  2015-03-04 21:50 ` [dpdk-dev] [PATCH 08/10] tailq: move to dynamic tailq David Marchand
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 24+ messages in thread
From: David Marchand @ 2015-03-04 21:50 UTC (permalink / raw)
  To: dev

This 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.

Signed-off-by: David Marchand <david.marchand@6wind.com>
---
 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(-)

diff --git a/app/test/test_tailq.c b/app/test/test_tailq.c
index 56656f0..c046a8a 100644
--- a/app/test/test_tailq.c
+++ b/app/test/test_tailq.c
@@ -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 int
 test_tailq(void)
 {
 	int ret = 0;
+	ret |= test_tailq_early();
 	ret |= test_tailq_create();
 	ret |= test_tailq_lookup();
 	return ret;
diff --git a/lib/librte_eal/bsdapp/eal/rte_eal_version.map b/lib/librte_eal/bsdapp/eal/rte_eal_version.map
index c94fe8e..e42ea74 100644
--- a/lib/librte_eal/bsdapp/eal/rte_eal_version.map
+++ b/lib/librte_eal/bsdapp/eal/rte_eal_version.map
@@ -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;
diff --git a/lib/librte_eal/common/eal_common_tailqs.c b/lib/librte_eal/common/eal_common_tailqs.c
index 975ee74..3c4e70d 100644
--- a/lib/librte_eal/common/eal_common_tailqs.c
+++ b/lib/librte_eal/common/eal_common_tailqs.c
@@ -51,6 +51,7 @@
 #include <rte_branch_prediction.h>
 #include <rte_log.h>
 #include <rte_string_fns.h>
+#include <rte_debug.h>
 
 #include "eal_private.h"
 
@@ -62,6 +63,14 @@ const char* rte_tailq_names[RTE_MAX_TAILQ] = {
 #include <rte_tailq_elem.h>
 };
 
+TAILQ_HEAD(rte_tailq_elem_head, rte_tailq_elem);
+/* local tailq list */
+static struct rte_tailq_elem_head rte_tailq_elem_head =
+	TAILQ_HEAD_INITIALIZER(rte_tailq_elem_head);
+
+/* number of tailqs registered, -1 before call to rte_eal_tailqs_init */
+static int rte_tailqs_count = -1;
+
 struct rte_tailq_head *
 rte_eal_tailq_lookup(const char *name)
 {
@@ -72,9 +81,13 @@ rte_eal_tailq_lookup(const char *name)
 		return NULL;
 
 	for (i = 0; i < RTE_MAX_TAILQ; i++) {
-		if (rte_tailq_names[i] == NULL)
-			continue;
-		if (!strncmp(name, rte_tailq_names[i], RTE_TAILQ_NAMESIZE-1))
+		if (i < RTE_TAILQ_NUM &&
+		    !strncmp(name, rte_tailq_names[i], RTE_TAILQ_NAMESIZE-1))
+			return &mcfg->tailq_head[i];
+
+		/* if past static entries, look at shared mem for names */
+		if (!strncmp(name, mcfg->tailq_head[i].name,
+			     RTE_TAILQ_NAMESIZE-1))
 			return &mcfg->tailq_head[i];
 	}
 
@@ -103,31 +116,130 @@ rte_dump_tailq(FILE *f)
 	mcfg = rte_eal_get_configuration()->mem_config;
 
 	rte_rwlock_read_lock(&mcfg->qlock);
-	for (i=0; i < RTE_MAX_TAILQ; i++) {
+	for (i = 0; i < RTE_MAX_TAILQ; i++) {
 		const struct rte_tailq_head *tailq = &mcfg->tailq_head[i];
 		const struct rte_tailq_entry_head *head = &tailq->tailq_head;
+		const char *name = "nil";
 
-		fprintf(f, "Tailq %u: qname:<%s>, tqh_first:%p, tqh_last:%p\n", i,
-		       (rte_tailq_names[i] != NULL ? rte_tailq_names[i]:"nil"),
-		       head->tqh_first, head->tqh_last);
+		if (rte_tailq_names[i])
+			name = rte_tailq_names[i];
+		else if (tailq->name)
+			name = tailq->name;
+
+		fprintf(f, "Tailq %u: qname:<%s>, tqh_first:%p, tqh_last:%p\n",
+			i, name, head->tqh_first, head->tqh_last);
 	}
 	rte_rwlock_read_unlock(&mcfg->qlock);
 }
 
+static struct rte_tailq_head *
+rte_eal_tailq_create(const char *name)
+{
+	struct rte_tailq_head *head = NULL;
+
+	if (!rte_eal_tailq_lookup(name) &&
+	    (rte_tailqs_count + 1 < RTE_MAX_TAILQ)) {
+		struct rte_mem_config *mcfg;
+
+		mcfg = rte_eal_get_configuration()->mem_config;
+		head = &mcfg->tailq_head[rte_tailqs_count];
+		snprintf(head->name, sizeof(head->name) - 1, "%s", name);
+		TAILQ_INIT(&head->tailq_head);
+		rte_tailqs_count++;
+	}
+
+	return head;
+}
+
+/* local register, used to store "early" tailqs before rte_eal_init() and to
+ * ensure secondary process only registers tailqs once. */
+static int
+rte_eal_tailq_local_register(struct rte_tailq_elem *t)
+{
+	struct rte_tailq_elem *temp;
+
+	TAILQ_FOREACH(temp, &rte_tailq_elem_head, next) {
+		if (!strncmp(t->name, temp->name, sizeof(temp->name)))
+			return -1;
+	}
+
+	TAILQ_INSERT_TAIL(&rte_tailq_elem_head, t, next);
+	return 0;
+}
+
+static void
+rte_eal_tailq_update(struct rte_tailq_elem *t)
+{
+	if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
+		/* primary process is the only one that creates */
+		t->head = rte_eal_tailq_create(t->name);
+	} else {
+		t->head = rte_eal_tailq_lookup(t->name);
+	}
+}
+
+int
+rte_eal_tailq_register(struct rte_tailq_elem *t)
+{
+	if (rte_eal_tailq_local_register(t) < 0) {
+		rte_log(RTE_LOG_ERR, RTE_LOGTYPE_EAL,
+			"%s tailq is already registered\n", t->name);
+		goto error;
+	}
+
+	/* if a register happens after rte_eal_tailqs_init(), then we can update
+	 * tailq head */
+	if (rte_tailqs_count >= 0) {
+		rte_eal_tailq_update(t);
+		if (t->head == NULL) {
+			rte_log(RTE_LOG_ERR, RTE_LOGTYPE_EAL,
+				"Cannot initialize tailq: %s\n", t->name);
+			TAILQ_REMOVE(&rte_tailq_elem_head, t, next);
+			goto error;
+		}
+	}
+
+	return 0;
+
+error:
+	t->head = NULL;
+	return -1;
+}
+
 int
 rte_eal_tailqs_init(void)
 {
 	unsigned i;
 	struct rte_mem_config *mcfg = NULL;
+	struct rte_tailq_elem *t;
 
 	RTE_BUILD_BUG_ON(RTE_MAX_TAILQ < RTE_TAILQ_NUM);
 
 	if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
 		mcfg = rte_eal_get_configuration()->mem_config;
-		for (i = 0; i < RTE_MAX_TAILQ; i++)
+		for (i = 0; i < RTE_TAILQ_NUM; i++)
 			TAILQ_INIT(&mcfg->tailq_head[i].tailq_head);
 	}
 
+	/* mark those static entries as already taken */
+	rte_tailqs_count = RTE_TAILQ_NUM;
+
+	TAILQ_FOREACH(t, &rte_tailq_elem_head, next) {
+		/* second part of register job for "early" tailqs, see
+		 * rte_eal_tailq_register and EAL_REGISTER_TAILQ */
+		rte_eal_tailq_update(t);
+		if (t->head == NULL) {
+			rte_log(RTE_LOG_ERR, RTE_LOGTYPE_EAL,
+				"Cannot initialize tailq: %s\n", t->name);
+			/* no need to TAILQ_REMOVE, we are going to panic in
+			 * rte_eal_init() */
+			goto fail;
+		}
+	}
+
 	return 0;
-}
 
+fail:
+	rte_dump_tailq(stderr);
+	return -1;
+}
diff --git a/lib/librte_eal/common/include/rte_tailq.h b/lib/librte_eal/common/include/rte_tailq.h
index 6b7278c..df11183 100644
--- a/lib/librte_eal/common/include/rte_tailq.h
+++ b/lib/librte_eal/common/include/rte_tailq.h
@@ -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
diff --git a/lib/librte_eal/linuxapp/eal/rte_eal_version.map b/lib/librte_eal/linuxapp/eal/rte_eal_version.map
index a1ba203..3db5856 100644
--- a/lib/librte_eal/linuxapp/eal/rte_eal_version.map
+++ b/lib/librte_eal/linuxapp/eal/rte_eal_version.map
@@ -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;
-- 
1.7.10.4

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

* [dpdk-dev] [PATCH 08/10] tailq: move to dynamic tailq
  2015-03-04 21:50 [dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup David Marchand
                   ` (6 preceding siblings ...)
  2015-03-04 21:50 ` [dpdk-dev] [PATCH 07/10] tailq: introduce dynamic register system David Marchand
@ 2015-03-04 21:50 ` David Marchand
  2015-03-04 21:50 ` [dpdk-dev] [PATCH 09/10] tailq: remove static slots David Marchand
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 24+ messages in thread
From: David Marchand @ 2015-03-04 21:50 UTC (permalink / raw)
  To: dev

Use dynamic tailq rather than static entries.

Signed-off-by: David Marchand <david.marchand@6wind.com>
---
 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(-)

diff --git a/lib/librte_acl/rte_acl.c b/lib/librte_acl/rte_acl.c
index 7d10301..b6ddeeb 100644
--- a/lib/librte_acl/rte_acl.c
+++ b/lib/librte_acl/rte_acl.c
@@ -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) {
diff --git a/lib/librte_acl/rte_acl.h b/lib/librte_acl/rte_acl.h
index 30aea03..3a93730 100644
--- a/lib/librte_acl/rte_acl.h
+++ b/lib/librte_acl/rte_acl.h
@@ -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 *
diff --git a/lib/librte_distributor/rte_distributor.c b/lib/librte_distributor/rte_distributor.c
index 84e78bb..f3f778c 100644
--- a/lib/librte_distributor/rte_distributor.c
+++ b/lib/librte_distributor/rte_distributor.c
@@ -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);
diff --git a/lib/librte_eal/bsdapp/eal/eal_pci.c b/lib/librte_eal/bsdapp/eal/eal_pci.c
index 5457a21..3a0fda5 100644
--- a/lib/librte_eal/bsdapp/eal/eal_pci.c
+++ b/lib/librte_eal/bsdapp/eal/eal_pci.c
@@ -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)
diff --git a/lib/librte_eal/common/include/rte_tailq_elem.h b/lib/librte_eal/common/include/rte_tailq_elem.h
index 01fc769..e88211c 100644
--- a/lib/librte_eal/common/include/rte_tailq_elem.h
+++ b/lib/librte_eal/common/include/rte_tailq_elem.h
@@ -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
diff --git a/lib/librte_eal/linuxapp/eal/eal_ivshmem.c b/lib/librte_eal/linuxapp/eal/eal_ivshmem.c
index 413a9ba..2deaeb7 100644
--- a/lib/librte_eal/linuxapp/eal/eal_ivshmem.c
+++ b/lib/librte_eal/linuxapp/eal/eal_ivshmem.c
@@ -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;
 	}
diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c
index 595f17b..c42e843 100644
--- a/lib/librte_eal/linuxapp/eal/eal_pci.c
+++ b/lib/librte_eal/linuxapp/eal/eal_pci.c
@@ -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 int
 pci_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)
diff --git a/lib/librte_hash/rte_fbk_hash.c b/lib/librte_hash/rte_fbk_hash.c
index c342c0d..356ddfe 100644
--- a/lib/librte_hash/rte_fbk_hash.c
+++ b/lib/librte_hash/rte_fbk_hash.c
@@ -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);
 
diff --git a/lib/librte_hash/rte_fbk_hash.h b/lib/librte_hash/rte_fbk_hash.h
index 3d229bf..c9b5a6a 100644
--- a/lib/librte_hash/rte_fbk_hash.h
+++ b/lib/librte_hash/rte_fbk_hash.h
@@ -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
diff --git a/lib/librte_hash/rte_hash.c b/lib/librte_hash/rte_hash.c
index b6a2b2f..9245716 100644
--- a/lib/librte_hash/rte_hash.c
+++ b/lib/librte_hash/rte_hash.c
@@ -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);
 
diff --git a/lib/librte_hash/rte_hash.h b/lib/librte_hash/rte_hash.h
index 2ecaf1a..821a9d4 100644
--- a/lib/librte_hash/rte_hash.h
+++ b/lib/librte_hash/rte_hash.h
@@ -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
diff --git a/lib/librte_lpm/rte_lpm.c b/lib/librte_lpm/rte_lpm.c
index 264cde8..0945b81 100644
--- a/lib/librte_lpm/rte_lpm.c
+++ b/lib/librte_lpm/rte_lpm.c
@@ -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 24
 
 enum 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);
diff --git a/lib/librte_lpm/rte_lpm.h b/lib/librte_lpm/rte_lpm.h
index 586300b..e6c25b6 100644
--- a/lib/librte_lpm/rte_lpm.h
+++ b/lib/librte_lpm/rte_lpm.h
@@ -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
diff --git a/lib/librte_lpm/rte_lpm6.c b/lib/librte_lpm/rte_lpm6.c
index d72f9b3..6c2b293 100644
--- a/lib/librte_lpm/rte_lpm6.c
+++ b/lib/librte_lpm/rte_lpm6.c
@@ -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);
 
diff --git a/lib/librte_lpm/rte_lpm6.h b/lib/librte_lpm/rte_lpm6.h
index 4db810f..cedcea8 100644
--- a/lib/librte_lpm/rte_lpm6.h
+++ b/lib/librte_lpm/rte_lpm6.h
@@ -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
diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c
index 3301e97..9405b92 100644
--- a/lib/librte_mempool/rte_mempool.c
+++ b/lib/librte_mempool/rte_mempool.c
@@ -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);
 
diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h
index 39f7233..9001312 100644
--- a/lib/librte_mempool/rte_mempool.h
+++ b/lib/librte_mempool/rte_mempool.h
@@ -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
diff --git a/lib/librte_reorder/rte_reorder.c b/lib/librte_reorder/rte_reorder.c
index c5ce794..88f1baf 100644
--- a/lib/librte_reorder/rte_reorder.c
+++ b/lib/librte_reorder/rte_reorder.c
@@ -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) {
diff --git a/lib/librte_reorder/rte_reorder.h b/lib/librte_reorder/rte_reorder.h
index 8300bf0..c7a2934 100644
--- a/lib/librte_reorder/rte_reorder.h
+++ b/lib/librte_reorder/rte_reorder.h
@@ -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 *
diff --git a/lib/librte_ring/rte_ring.c b/lib/librte_ring/rte_ring.c
index 92ecf04..1b4361d 100644
--- a/lib/librte_ring/rte_ring.c
+++ b/lib/librte_ring/rte_ring.c
@@ -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);
 
diff --git a/lib/librte_ring/rte_ring.h b/lib/librte_ring/rte_ring.h
index bdf69b7..af68888 100644
--- a/lib/librte_ring/rte_ring.h
+++ b/lib/librte_ring/rte_ring.h
@@ -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
-- 
1.7.10.4

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

* [dpdk-dev] [PATCH 09/10] tailq: remove static slots
  2015-03-04 21:50 [dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup David Marchand
                   ` (7 preceding siblings ...)
  2015-03-04 21:50 ` [dpdk-dev] [PATCH 08/10] tailq: move to dynamic tailq David Marchand
@ 2015-03-04 21:50 ` David Marchand
  2015-03-04 21:50 ` [dpdk-dev] [PATCH 10/10] eal: no need for E_RTE_NO_TAILQ anymore David Marchand
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 24+ messages in thread
From: David Marchand @ 2015-03-04 21:50 UTC (permalink / raw)
  To: dev

No static entry remaining, the rte_tailq api is for "internal use" only, get rid
of the static slots.

Signed-off-by: David Marchand <david.marchand@6wind.com>
---
 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

diff --git a/lib/librte_eal/bsdapp/eal/rte_eal_version.map b/lib/librte_eal/bsdapp/eal/rte_eal_version.map
index e42ea74..67b6a6c 100644
--- a/lib/librte_eal/bsdapp/eal/rte_eal_version.map
+++ b/lib/librte_eal/bsdapp/eal/rte_eal_version.map
@@ -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;
diff --git a/lib/librte_eal/common/Makefile b/lib/librte_eal/common/Makefile
index 52c1a5f..cf961a7 100644
--- a/lib/librte_eal/common/Makefile
+++ b/lib/librte_eal/common/Makefile
@@ -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
diff --git a/lib/librte_eal/common/eal_common_tailqs.c b/lib/librte_eal/common/eal_common_tailqs.c
index 3c4e70d..d9551cd 100644
--- a/lib/librte_eal/common/eal_common_tailqs.c
+++ b/lib/librte_eal/common/eal_common_tailqs.c
@@ -55,14 +55,6 @@
 
 #include "eal_private.h"
 
-/**
- * Name of tailq_head
- */
-const char* rte_tailq_names[RTE_MAX_TAILQ] = {
-#define rte_tailq_elem(idx, name)     name,
-#include <rte_tailq_elem.h>
-};
-
 TAILQ_HEAD(rte_tailq_elem_head, rte_tailq_elem);
 /* local tailq list */
 static struct rte_tailq_elem_head rte_tailq_elem_head =
@@ -81,11 +73,6 @@ rte_eal_tailq_lookup(const char *name)
 		return NULL;
 
 	for (i = 0; i < RTE_MAX_TAILQ; i++) {
-		if (i < RTE_TAILQ_NUM &&
-		    !strncmp(name, rte_tailq_names[i], RTE_TAILQ_NAMESIZE-1))
-			return &mcfg->tailq_head[i];
-
-		/* if past static entries, look at shared mem for names */
 		if (!strncmp(name, mcfg->tailq_head[i].name,
 			     RTE_TAILQ_NAMESIZE-1))
 			return &mcfg->tailq_head[i];
@@ -94,19 +81,6 @@ rte_eal_tailq_lookup(const char *name)
 	return NULL;
 }
 
-inline struct rte_tailq_head *
-rte_eal_tailq_lookup_by_idx(const unsigned tailq_idx)
-{
-	struct rte_mem_config *mcfg = rte_eal_get_configuration()->mem_config;
-
-	if (tailq_idx >= RTE_MAX_TAILQ) {
-		RTE_LOG(ERR, EAL, "%s(): No more room in config\n", __func__);
-		return NULL;
-	}
-
-	return &mcfg->tailq_head[tailq_idx];
-}
-
 void
 rte_dump_tailq(FILE *f)
 {
@@ -119,15 +93,9 @@ rte_dump_tailq(FILE *f)
 	for (i = 0; i < RTE_MAX_TAILQ; i++) {
 		const struct rte_tailq_head *tailq = &mcfg->tailq_head[i];
 		const struct rte_tailq_entry_head *head = &tailq->tailq_head;
-		const char *name = "nil";
-
-		if (rte_tailq_names[i])
-			name = rte_tailq_names[i];
-		else if (tailq->name)
-			name = tailq->name;
 
 		fprintf(f, "Tailq %u: qname:<%s>, tqh_first:%p, tqh_last:%p\n",
-			i, name, head->tqh_first, head->tqh_last);
+			i, tailq->name, head->tqh_first, head->tqh_last);
 	}
 	rte_rwlock_read_unlock(&mcfg->qlock);
 }
@@ -209,20 +177,9 @@ error:
 int
 rte_eal_tailqs_init(void)
 {
-	unsigned i;
-	struct rte_mem_config *mcfg = NULL;
 	struct rte_tailq_elem *t;
 
-	RTE_BUILD_BUG_ON(RTE_MAX_TAILQ < RTE_TAILQ_NUM);
-
-	if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
-		mcfg = rte_eal_get_configuration()->mem_config;
-		for (i = 0; i < RTE_TAILQ_NUM; i++)
-			TAILQ_INIT(&mcfg->tailq_head[i].tailq_head);
-	}
-
-	/* mark those static entries as already taken */
-	rte_tailqs_count = RTE_TAILQ_NUM;
+	rte_tailqs_count = 0;
 
 	TAILQ_FOREACH(t, &rte_tailq_elem_head, next) {
 		/* second part of register job for "early" tailqs, see
diff --git a/lib/librte_eal/common/include/rte_eal_memconfig.h b/lib/librte_eal/common/include/rte_eal_memconfig.h
index d6359e5..34f5abc 100644
--- a/lib/librte_eal/common/include/rte_eal_memconfig.h
+++ b/lib/librte_eal/common/include/rte_eal_memconfig.h
@@ -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
diff --git a/lib/librte_eal/common/include/rte_tailq.h b/lib/librte_eal/common/include/rte_tailq.h
index df11183..4a686e6 100644
--- a/lib/librte_eal/common/include/rte_tailq.h
+++ b/lib/librte_eal/common/include/rte_tailq.h
@@ -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.
diff --git a/lib/librte_eal/common/include/rte_tailq_elem.h b/lib/librte_eal/common/include/rte_tailq_elem.h
deleted file mode 100644
index e88211c..0000000
--- a/lib/librte_eal/common/include/rte_tailq_elem.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*-
- *   BSD LICENSE
- *
- *   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or without
- *   modification, are permitted provided that the following conditions
- *   are met:
- *
- *     * Redistributions of source code must retain the above copyright
- *       notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above copyright
- *       notice, this list of conditions and the following disclaimer in
- *       the documentation and/or other materials provided with the
- *       distribution.
- *     * Neither the name of Intel Corporation nor the names of its
- *       contributors may be used to endorse or promote products derived
- *       from this software without specific prior written permission.
- *
- *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * @file
- *
- * This file contains the type of the tailq elem recognised by DPDK, which
- * can be used to fill out an array of structures describing the tailq.
- *
- * In order to populate an array, the user of this file must define this macro:
- * rte_tailq_elem(idx, name). For example:
- *
- * @code
- * enum rte_tailq_t {
- * #define rte_tailq_elem(idx, name)     idx,
- * #define rte_tailq_end(idx)            idx
- * #include <rte_tailq_elem.h>
- * };
- *
- * const char* rte_tailq_names[RTE_MAX_TAILQ] = {
- * #define rte_tailq_elem(idx, name)     name,
- * #include <rte_tailq_elem.h>
- * };
- * @endcode
- *
- * Note that this file can be included multiple times within the same file.
- */
-
-#ifndef rte_tailq_elem
-#define rte_tailq_elem(idx, name)
-#endif /* rte_tailq_elem */
-
-#ifndef rte_tailq_end
-#define rte_tailq_end(idx)
-#endif /* rte_tailq_end */
-
-rte_tailq_end(RTE_TAILQ_NUM)
-
-#undef rte_tailq_elem
-#undef rte_tailq_end
diff --git a/lib/librte_eal/linuxapp/eal/rte_eal_version.map b/lib/librte_eal/linuxapp/eal/rte_eal_version.map
index 3db5856..7e850a9 100644
--- a/lib/librte_eal/linuxapp/eal/rte_eal_version.map
+++ b/lib/librte_eal/linuxapp/eal/rte_eal_version.map
@@ -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;
-- 
1.7.10.4

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

* [dpdk-dev] [PATCH 10/10] eal: no need for E_RTE_NO_TAILQ anymore
  2015-03-04 21:50 [dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup David Marchand
                   ` (8 preceding siblings ...)
  2015-03-04 21:50 ` [dpdk-dev] [PATCH 09/10] tailq: remove static slots David Marchand
@ 2015-03-04 21:50 ` David Marchand
  2015-03-04 22:55 ` [dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup Thomas Monjalon
  2015-03-06  0:26 ` Neil Horman
  11 siblings, 0 replies; 24+ messages in thread
From: David Marchand @ 2015-03-04 21:50 UTC (permalink / raw)
  To: dev

There is no remaining reference to this errno.

Signed-off-by: David Marchand <david.marchand@6wind.com>
---
 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(-)

diff --git a/app/test/test_errno.c b/app/test/test_errno.c
index c903b19..f221eac 100644
--- a/app/test/test_errno.c
+++ b/app/test/test_errno.c
@@ -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;
diff --git a/lib/librte_eal/common/eal_common_errno.c b/lib/librte_eal/common/eal_common_errno.c
index 259f895..de48d8e 100644
--- a/lib/librte_eal/common/eal_common_errno.c
+++ b/lib/librte_eal/common/eal_common_errno.c
@@ -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);
 		}
diff --git a/lib/librte_eal/common/include/rte_errno.h b/lib/librte_eal/common/include/rte_errno.h
index 45910cd..2e5cc45 100644
--- a/lib/librte_eal/common/include/rte_errno.h
+++ b/lib/librte_eal/common/include/rte_errno.h
@@ -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 */
 };
-- 
1.7.10.4

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

* Re: [dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup
  2015-03-04 21:50 [dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup David Marchand
                   ` (9 preceding siblings ...)
  2015-03-04 21:50 ` [dpdk-dev] [PATCH 10/10] eal: no need for E_RTE_NO_TAILQ anymore David Marchand
@ 2015-03-04 22:55 ` Thomas Monjalon
  2015-03-06  0:26 ` Neil Horman
  11 siblings, 0 replies; 24+ messages in thread
From: Thomas Monjalon @ 2015-03-04 22:55 UTC (permalink / raw)
  To: David Marchand; +Cc: dev

2015-03-04 22:50, David Marchand:
> 143 files changed, 310 insertions(+), 685 deletions(-)

Great job.
As it removes more lines than it adds, it's probably a good cleanup patchset ;)

-- 
Thomas
When there is no more things to remove, it's becoming perfect.

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

* Re: [dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup
  2015-03-04 21:50 [dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup David Marchand
                   ` (10 preceding siblings ...)
  2015-03-04 22:55 ` [dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup Thomas Monjalon
@ 2015-03-06  0:26 ` Neil Horman
  2015-03-10 11:20   ` Thomas Monjalon
  11 siblings, 1 reply; 24+ messages in thread
From: Neil Horman @ 2015-03-06  0:26 UTC (permalink / raw)
  To: David Marchand; +Cc: dev

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

> -- 
> 1.7.10.4
> 
> 

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

* Re: [dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup
  2015-03-06  0:26 ` Neil Horman
@ 2015-03-10 11:20   ` Thomas Monjalon
  2015-03-11  7:44     ` Tetsuya Mukawa
  0 siblings, 1 reply; 24+ messages in thread
From: Thomas Monjalon @ 2015-03-10 11:20 UTC (permalink / raw)
  To: David Marchand; +Cc: dev

2015-03-05 19:26, Neil Horman:
> On Wed, Mar 04, 2015 at 10:50:00PM +0100, David Marchand wrote:
> > 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.
> > 
> > 
> 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 <nhorman@tuxdriver.com>

Applied, thanks

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

* Re: [dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup
  2015-03-10 11:20   ` Thomas Monjalon
@ 2015-03-11  7:44     ` Tetsuya Mukawa
  2015-03-11  8:47       ` David Marchand
  0 siblings, 1 reply; 24+ messages in thread
From: Tetsuya Mukawa @ 2015-03-11  7:44 UTC (permalink / raw)
  To: David Marchand; +Cc: dev

On 2015/03/10 20:20, Thomas Monjalon wrote:
> 2015-03-05 19:26, Neil Horman:
>> On Wed, Mar 04, 2015 at 10:50:00PM +0100, David Marchand wrote:
>>> 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.
>>>
>>>
>> 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 <nhorman@tuxdriver.com>
> 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

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

* Re: [dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup
  2015-03-11  7:44     ` Tetsuya Mukawa
@ 2015-03-11  8:47       ` David Marchand
  2015-03-11 17:28         ` David Marchand
  0 siblings, 1 reply; 24+ messages in thread
From: David Marchand @ 2015-03-11  8:47 UTC (permalink / raw)
  To: Tetsuya Mukawa; +Cc: dev

Hello Tetsuya,

On Wed, Mar 11, 2015 at 8:44 AM, Tetsuya Mukawa <mukawa@igel.co.jp> wrote:

>
> $ 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
>

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.

-- 
David Marchand

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

* Re: [dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup
  2015-03-11  8:47       ` David Marchand
@ 2015-03-11 17:28         ` David Marchand
  2015-03-11 20:24           ` Mcnamara, John
  0 siblings, 1 reply; 24+ messages in thread
From: David Marchand @ 2015-03-11 17:28 UTC (permalink / raw)
  To: Tetsuya Mukawa; +Cc: dev

On Wed, Mar 11, 2015 at 9:47 AM, David Marchand <david.marchand@6wind.com>
wrote:

> On Wed, Mar 11, 2015 at 8:44 AM, Tetsuya Mukawa <mukawa@igel.co.jp> wrote:
>
>>
>> $ 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
>>
>
> 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.
>

Just sent a fix : http://dpdk.org/dev/patchwork/patch/3976/
Can you try it ?

Thanks.

-- 
David Marchand

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

* Re: [dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup
  2015-03-11 17:28         ` David Marchand
@ 2015-03-11 20:24           ` Mcnamara, John
  2015-03-11 21:29             ` David Marchand
  0 siblings, 1 reply; 24+ messages in thread
From: Mcnamara, John @ 2015-03-11 20:24 UTC (permalink / raw)
  To: David Marchand, Tetsuya Mukawa; +Cc: dev

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of David Marchand
> Sent: Wednesday, March 11, 2015 5:29 PM
> To: Tetsuya Mukawa
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup
> 
> On Wed, Mar 11, 2015 at 9:47 AM, David Marchand <david.marchand@6wind.com>
> 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.
-- 



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

* Re: [dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup
  2015-03-11 20:24           ` Mcnamara, John
@ 2015-03-11 21:29             ` David Marchand
  2015-03-11 22:25               ` Mcnamara, John
  0 siblings, 1 reply; 24+ messages in thread
From: David Marchand @ 2015-03-11 21:29 UTC (permalink / raw)
  To: Mcnamara, John; +Cc: dev

Hello John,

On Wed, Mar 11, 2015 at 9:24 PM, Mcnamara, John <john.mcnamara@intel.com>
wrote:

> > On Wed, Mar 11, 2015 at 9:47 AM, David Marchand <
> david.marchand@6wind.com>
> > 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 ?


-- 
David Marchand

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

* Re: [dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup
  2015-03-11 21:29             ` David Marchand
@ 2015-03-11 22:25               ` Mcnamara, John
  2015-03-12  2:05                 ` Tetsuya Mukawa
  0 siblings, 1 reply; 24+ messages in thread
From: Mcnamara, John @ 2015-03-11 22:25 UTC (permalink / raw)
  To: David Marchand; +Cc: dev



From: David Marchand [mailto:david.marchand@6wind.com] 
Sent: Wednesday, March 11, 2015 9:30 PM
To: Mcnamara, John
Cc: Tetsuya Mukawa; dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup

>> 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/Linux
    
    UIO with testpmd and skeleton forwarding app

John.
--


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

* Re: [dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup
  2015-03-11 22:25               ` Mcnamara, John
@ 2015-03-12  2:05                 ` Tetsuya Mukawa
  2015-03-12  2:12                   ` Tetsuya Mukawa
  2015-03-12  5:44                   ` David Marchand
  0 siblings, 2 replies; 24+ messages in thread
From: Tetsuya Mukawa @ 2015-03-12  2:05 UTC (permalink / raw)
  To: Mcnamara, John, David Marchand; +Cc: dev

On 2015/03/12 7:25, Mcnamara, John wrote:
>
> From: David Marchand [mailto:david.marchand@6wind.com] 
> Sent: Wednesday, March 11, 2015 9:30 PM
> To: Mcnamara, John
> Cc: Tetsuya Mukawa; dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup
>
>>> 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/Linux
>     
>     UIO 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

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

* Re: [dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup
  2015-03-12  2:05                 ` Tetsuya Mukawa
@ 2015-03-12  2:12                   ` Tetsuya Mukawa
  2015-03-12  5:44                   ` David Marchand
  1 sibling, 0 replies; 24+ messages in thread
From: Tetsuya Mukawa @ 2015-03-12  2:12 UTC (permalink / raw)
  To: Mcnamara, John, David Marchand; +Cc: dev

On 2015/03/12 11:05, Tetsuya Mukawa wrote:
> On 2015/03/12 7:25, Mcnamara, John wrote:
>> From: David Marchand [mailto:david.marchand@6wind.com] 
>> Sent: Wednesday, March 11, 2015 9:30 PM
>> To: Mcnamara, John
>> Cc: Tetsuya Mukawa; dev@dpdk.org
>> Subject: Re: [dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup
>>
>>>> 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/Linux
>>     
>>     UIO 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
>
Sorry for my bad English.
I've already made sure above.
Everything works fine with the patch on my environments.

Tetsuya

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

* Re: [dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup
  2015-03-12  2:05                 ` Tetsuya Mukawa
  2015-03-12  2:12                   ` Tetsuya Mukawa
@ 2015-03-12  5:44                   ` David Marchand
  2015-03-12  8:38                     ` Liu, Yong
  1 sibling, 1 reply; 24+ messages in thread
From: David Marchand @ 2015-03-12  5:44 UTC (permalink / raw)
  To: Tetsuya Mukawa, Mcnamara, John; +Cc: dev

Hello John, Tetsuya,

On Thu, Mar 12, 2015 at 3:05 AM, Tetsuya Mukawa <mukawa@igel.co.jp> wrote:

> On 2015/03/12 7:25, Mcnamara, John wrote:
> > 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/Linux
> >
> >     UIO with testpmd and skeleton forwarding app
>
> 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.
>

Ok, good.
Big thanks to both of you :-).

The only case remaining would be ivshmem.


-- 
David Marchand

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

* Re: [dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup
  2015-03-12  5:44                   ` David Marchand
@ 2015-03-12  8:38                     ` Liu, Yong
  0 siblings, 0 replies; 24+ messages in thread
From: Liu, Yong @ 2015-03-12  8:38 UTC (permalink / raw)
  To: David Marchand, Tetsuya Mukawa, Mcnamara, John; +Cc: dev

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]

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of David Marchand
> Sent: Thursday, March 12, 2015 1:44 PM
> To: Tetsuya Mukawa; Mcnamara, John
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup
> 
> Hello John, Tetsuya,
> 
> On Thu, Mar 12, 2015 at 3:05 AM, Tetsuya Mukawa <mukawa@igel.co.jp> wrote:
> 
> > On 2015/03/12 7:25, Mcnamara, John wrote:
> > > 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/Linux
> > >
> > >     UIO with testpmd and skeleton forwarding app
> >
> > 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.
> >
> 
> Ok, good.
> Big thanks to both of you :-).
> 
> The only case remaining would be ivshmem.
> 
> 
> --
> David Marchand

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

end of thread, other threads:[~2015-03-12  8:38 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-04 21:50 [dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup David Marchand
2015-03-04 21:50 ` [dpdk-dev] [PATCH 01/10] eal: remove yet another remaining reference to pm David Marchand
2015-03-04 21:50 ` [dpdk-dev] [PATCH 02/10] pci: use lookup tailq api David Marchand
2015-03-04 21:50 ` [dpdk-dev] [PATCH 03/10] tailq: remove unneeded inclusion of rte_tailq.h David Marchand
2015-03-04 21:50 ` [dpdk-dev] [PATCH 04/10] tailq: use a single cast macro David Marchand
2015-03-04 21:50 ` [dpdk-dev] [PATCH 05/10] tailq: get rid of broken "reserve" api David Marchand
2015-03-04 21:50 ` [dpdk-dev] [PATCH 06/10] tailq: remove unused RTE_EAL_TAILQ_* macros David Marchand
2015-03-04 21:50 ` [dpdk-dev] [PATCH 07/10] tailq: introduce dynamic register system David Marchand
2015-03-04 21:50 ` [dpdk-dev] [PATCH 08/10] tailq: move to dynamic tailq David Marchand
2015-03-04 21:50 ` [dpdk-dev] [PATCH 09/10] tailq: remove static slots David Marchand
2015-03-04 21:50 ` [dpdk-dev] [PATCH 10/10] eal: no need for E_RTE_NO_TAILQ anymore David Marchand
2015-03-04 22:55 ` [dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup Thomas Monjalon
2015-03-06  0:26 ` Neil Horman
2015-03-10 11:20   ` Thomas Monjalon
2015-03-11  7:44     ` Tetsuya Mukawa
2015-03-11  8:47       ` David Marchand
2015-03-11 17:28         ` David Marchand
2015-03-11 20:24           ` Mcnamara, John
2015-03-11 21:29             ` David Marchand
2015-03-11 22:25               ` Mcnamara, John
2015-03-12  2:05                 ` Tetsuya Mukawa
2015-03-12  2:12                   ` Tetsuya Mukawa
2015-03-12  5:44                   ` David Marchand
2015-03-12  8:38                     ` Liu, Yong

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git