[dpdk-dev] app/test-pmd: fix rte_pci_tailq not initialized before used
Commit Message
Function rte_eal_pci_init will cast pci resource list and used for insert
probed device later. But all tailq initialized in function
rte_eal_tailqs_init, so rte_eal_pci_init must be called after it.
Signed-off-by: Marvin Liu <yong.liu@intel.com>
Comments
Hello Marvin,
I think this fix will break ivshmem init.
pci_init was moved when introducing ivshmem_init.
If you have a setup for this, can you check ivshmem init with your fix ?
Thanks.
On Wed, Mar 11, 2015 at 9:59 AM, David Marchand <david.marchand@6wind.com>
wrote:
> Hello Marvin,
>
> I think this fix will break ivshmem init.
> pci_init was moved when introducing ivshmem_init.
>
> If you have a setup for this, can you check ivshmem init with your fix ?
>
> Thanks.
>
I just posted a different fix.
If yours breaks ivshmem, please test mine.
Thanks.
@@ -755,9 +755,6 @@ rte_eal_init(int argc, char **argv)
rte_config_init();
- if (rte_eal_pci_init() < 0)
- rte_panic("Cannot init PCI\n");
-
#ifdef RTE_LIBRTE_IVSHMEM
if (rte_eal_ivshmem_init() < 0)
rte_panic("Cannot init IVSHMEM\n");
@@ -792,6 +789,9 @@ rte_eal_init(int argc, char **argv)
if (rte_eal_timer_init() < 0)
rte_panic("Cannot init HPET or TSC timers\n");
+ if (rte_eal_pci_init() < 0)
+ rte_panic("Cannot init PCI\n");
+
eal_check_mem_on_local_socket();
rte_eal_mcfg_complete();