From: Daniel Kan <dan@nyansa.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] vmxnet3: fixed segfault when initializing vmxnet3 pmd on linux platform
Date: Wed, 12 Mar 2014 13:19:59 -0700 [thread overview]
Message-ID: <1394655599-5991-1-git-send-email-dan@nyansa.com> (raw)
The vmxnet3 PCI hardware resources were never memory mapped when RE_EAL_UNBIND_PORTS is not defined.
Specifically, pci_dev->mem_resource is not mapped. The fix is to always set drv_flags with RTE_PCI_DRV_NEED_IGU for vmxnet3. This ensures pci_uio_map_resource() is called.
Signed-off-by: Daniel Kan <dan@nyansa.com>
---
lib/librte_pmd_vmxnet3/vmxnet3_ethdev.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/lib/librte_pmd_vmxnet3/vmxnet3_ethdev.c b/lib/librte_pmd_vmxnet3/vmxnet3_ethdev.c
index 6757aa2..8259cfe 100644
--- a/lib/librte_pmd_vmxnet3/vmxnet3_ethdev.c
+++ b/lib/librte_pmd_vmxnet3/vmxnet3_ethdev.c
@@ -267,9 +267,7 @@ static struct eth_driver rte_vmxnet3_pmd = {
{
.name = "rte_vmxnet3_pmd",
.id_table = pci_id_vmxnet3_map,
-#ifdef RTE_EAL_UNBIND_PORTS
.drv_flags = RTE_PCI_DRV_NEED_IGB_UIO,
-#endif
},
.eth_dev_init = eth_vmxnet3_dev_init,
.dev_private_size = sizeof(struct vmxnet3_adapter),
--
1.7.9.5
next reply other threads:[~2014-03-12 20:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-12 20:19 Daniel Kan [this message]
2014-03-21 14:46 ` Thomas Monjalon
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=1394655599-5991-1-git-send-email-dan@nyansa.com \
--to=dan@nyansa.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).