From: Yong Liu <yong.liu@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] app/test-pmd: fix rte_pci_tailq not initialized before used
Date: Wed, 11 Mar 2015 16:43:56 +0800 [thread overview]
Message-ID: <1426063436-15939-1-git-send-email-yong.liu@intel.com> (raw)
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>
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
next reply other threads:[~2015-03-11 8:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-11 8:43 Yong Liu [this message]
2015-03-11 8:59 ` David Marchand
2015-03-11 17:26 ` David Marchand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1426063436-15939-1-git-send-email-yong.liu@intel.com \
--to=yong.liu@intel.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).