* [PATCH] app/test-pmd: fix rte_pci_tailq not initialized before used
@ 2015-03-11 8:43 Yong Liu
[not found] ` <1426063436-15939-1-git-send-email-yong.liu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Yong Liu @ 2015-03-11 8:43 UTC (permalink / raw)
To: dev-VfR2kkLFssw
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-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c
index bd770cf..576f9f8 100644
--- a/lib/librte_eal/linuxapp/eal/eal.c
+++ b/lib/librte_eal/linuxapp/eal/eal.c
@@ -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();
--
1.9.3
^ permalink raw reply related [flat|nested] 3+ messages in thread[parent not found: <1426063436-15939-1-git-send-email-yong.liu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH] app/test-pmd: fix rte_pci_tailq not initialized before used [not found] ` <1426063436-15939-1-git-send-email-yong.liu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> @ 2015-03-11 8:59 ` David Marchand [not found] ` <CALwxeUt59X_rj0_tXb9y4NEd6wB2UOJg5As4qF+vBmXuTEaEoQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: David Marchand @ 2015-03-11 8:59 UTC (permalink / raw) To: Yong Liu; +Cc: dev-VfR2kkLFssw@public.gmane.org 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. -- David Marchand On Wed, Mar 11, 2015 at 9:43 AM, Yong Liu <yong.liu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> wrote: > 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-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> > > diff --git a/lib/librte_eal/linuxapp/eal/eal.c > b/lib/librte_eal/linuxapp/eal/eal.c > index bd770cf..576f9f8 100644 > --- a/lib/librte_eal/linuxapp/eal/eal.c > +++ b/lib/librte_eal/linuxapp/eal/eal.c > @@ -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(); > -- > 1.9.3 > > ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <CALwxeUt59X_rj0_tXb9y4NEd6wB2UOJg5As4qF+vBmXuTEaEoQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH] app/test-pmd: fix rte_pci_tailq not initialized before used [not found] ` <CALwxeUt59X_rj0_tXb9y4NEd6wB2UOJg5As4qF+vBmXuTEaEoQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2015-03-11 17:26 ` David Marchand 0 siblings, 0 replies; 3+ messages in thread From: David Marchand @ 2015-03-11 17:26 UTC (permalink / raw) To: Yong Liu; +Cc: dev-VfR2kkLFssw@public.gmane.org On Wed, Mar 11, 2015 at 9:59 AM, David Marchand <david.marchand-pdR9zngts4EAvxtiuMwx3w@public.gmane.org> 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. -- David Marchand ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-03-11 17:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-11 8:43 [PATCH] app/test-pmd: fix rte_pci_tailq not initialized before used Yong Liu
[not found] ` <1426063436-15939-1-git-send-email-yong.liu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-03-11 8:59 ` David Marchand
[not found] ` <CALwxeUt59X_rj0_tXb9y4NEd6wB2UOJg5As4qF+vBmXuTEaEoQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-03-11 17:26 ` David Marchand
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).