From 5d4759b0c98e96a7aafc14876d58a7eb85feacc5 Mon Sep 17 00:00:00 2001 From: Damjan Marion Date: Tue, 25 Oct 2016 15:45:10 +0200 Subject: dpdk: remove dpdk_pmd_constructor_init This is not needed anymore, likely because we use --whole-archive parameter during linking. Change-Id: Iab0f2ec647b63c59663faceacfbc60aa4a4b84a6 Signed-off-by: Damjan Marion --- vnet/vnet/devices/dpdk/dpdk.h | 71 ------------------------------------------- vpp/vnet/main.c | 6 +--- 2 files changed, 1 insertion(+), 76 deletions(-) diff --git a/vnet/vnet/devices/dpdk/dpdk.h b/vnet/vnet/devices/dpdk/dpdk.h index 2e72f5fa..603a67d8 100644 --- a/vnet/vnet/devices/dpdk/dpdk.h +++ b/vnet/vnet/devices/dpdk/dpdk.h @@ -48,7 +48,6 @@ #include #endif #include -#include #include #include #include @@ -708,76 +707,6 @@ clib_error_t *unformat_rss_fn (unformat_input_t * input, uword * rss_fn); clib_error_t *unformat_hqos (unformat_input_t * input, dpdk_device_config_hqos_t * hqos); - -static inline void -dpdk_pmd_constructor_init () -{ - /* Add references to DPDK Driver Constructor functions to get the dynamic - * loader to pull in the driver library & run the constructors. - */ -#define _(d) \ - do { \ - void devinitfn_ ##d(void); \ - __attribute__((unused)) void (* volatile pf)(void); \ - pf = devinitfn_ ##d; \ - } while(0); - -#ifdef RTE_LIBRTE_EM_PMD - _(em_pmd_drv) -#endif -#ifdef RTE_LIBRTE_IGB_PMD - _(pmd_igb_drv) -#endif -#ifdef RTE_LIBRTE_IXGBE_PMD - _(rte_ixgbe_driver) -#endif -#ifdef RTE_LIBRTE_I40E_PMD - _(rte_i40e_driver) _(rte_i40evf_driver) -#endif -#ifdef RTE_LIBRTE_FM10K_PMD - _(rte_fm10k_driver) -#endif -#ifdef RTE_LIBRTE_VIRTIO_PMD - _(rte_virtio_driver) -#endif -#ifdef RTE_LIBRTE_VMXNET3_PMD - _(rte_vmxnet3_driver) -#endif -#ifdef RTE_LIBRTE_VICE_PMD - _(rte_vice_driver) -#endif -#ifdef RTE_LIBRTE_ENIC_PMD - _(rte_enic_driver) -#endif -#ifdef RTE_LIBRTE_PMD_AF_PACKET - _(pmd_af_packet_drv) -#endif -#ifdef RTE_LIBRTE_CXGBE_PMD - _(rte_cxgbe_driver) -#endif -#ifdef RTE_LIBRTE_PMD_BOND - _(bond_drv) -#endif -#ifdef RTE_LIBRTE_DPAA2_PMD - _(pmd_dpaa2_drv) -#endif -#undef _ -/* - * At the moment, the ThunderX NIC driver doesn't have - * an entry point named "devinitfn_rte_xxx_driver" - */ -#define _(d) \ - do { \ - void d(void); \ - __attribute__((unused)) void (* volatile pf)(void); \ - pf = d; \ - } while(0); -#ifdef RTE_LIBRTE_THUNDERVNIC_PMD - _(rte_nicvf_pmd_init) -#endif -#undef _ -} - uword admin_up_down_process (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f); diff --git a/vpp/vnet/main.c b/vpp/vnet/main.c index ce497388..32332cb6 100644 --- a/vpp/vnet/main.c +++ b/vpp/vnet/main.c @@ -248,11 +248,7 @@ defaulted: { vm->init_functions_called = hash_create (0, /* value bytes */ 0); vpe_main_init (vm); -#if DPDK -#if !DPDK_SHARED_LIB - dpdk_pmd_constructor_init (); -#endif -#else +#if DPDK == 0 unix_physmem_init (vm, 0 /* fail_if_physical_memory_not_present */ ); #endif vlib_set_get_handoff_structure_cb (&vnet_get_handoff_structure); -- cgit 1.2.3-korg