From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f47.google.com (mail-wg0-f47.google.com [74.125.82.47]) by dpdk.org (Postfix) with ESMTP id C7BB25A7A for ; Wed, 4 Mar 2015 22:50:16 +0100 (CET) Received: by wggx12 with SMTP id x12so49556720wgg.6 for ; Wed, 04 Mar 2015 13:50:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=9V2vG2opAl1x3jDxoT4yFjVkdB7kXzQUcwu7R0mw3XU=; b=RMyeqleKDhMJoVGIHUB/7embCM18kIKJd10vNcM2wMNxB/GpSE6+JAvyNEHSLip8C2 X2mu45OChDv04CUEZK0wUNo0CryCmmGA0GLU69DtH3bqWnV5kKfsP1nH58rOx8FnvQKY 9qN9suDg39CMsfgPEJezNpa9OKBDeZT7JeXXoCpBB5h/cNBtO3Hk6YtpA9mtolbQp0/w Im39w3t3brCOT+DVqeL/0AiDrhghF6MDU58VoK5mqn8d16l/pI9cfAXQx3aGzUPvXA3R OXx1gKHExmfDJRM6738dFjE3rB3cYV9Fe3gSZ1IAMzrEerdJ94SJohWtYUA5jn66B2We TjMA== X-Gm-Message-State: ALoCoQn9h5qu6XibXScbqRU2iot/de4QAhHhTj1TV4hvWUQbek5E6ip5Cwo4GBTGlvs695+dcOEZ X-Received: by 10.194.237.34 with SMTP id uz2mr11668118wjc.157.1425505816628; Wed, 04 Mar 2015 13:50:16 -0800 (PST) Received: from alcyon.dev.6wind.com (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id bf8sm6037947wjb.37.2015.03.04.13.50.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Mar 2015 13:50:14 -0800 (PST) From: David Marchand To: dev@dpdk.org Date: Wed, 4 Mar 2015 22:50:00 +0100 Message-Id: <1425505810-9269-1-git-send-email-david.marchand@6wind.com> X-Mailer: git-send-email 1.7.10.4 Subject: [dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2015 21:50:17 -0000 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