DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] vmxnet3: fixed segfault when initializing vmxnet3 pmd on linux platform
@ 2014-03-12 20:19 Daniel Kan
  2014-03-21 14:46 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Kan @ 2014-03-12 20:19 UTC (permalink / raw)
  To: dev

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] vmxnet3: fixed segfault when initializing vmxnet3 pmd on linux platform
  2014-03-12 20:19 [dpdk-dev] [PATCH] vmxnet3: fixed segfault when initializing vmxnet3 pmd on linux platform Daniel Kan
@ 2014-03-21 14:46 ` Thomas Monjalon
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2014-03-21 14:46 UTC (permalink / raw)
  To: Daniel Kan; +Cc: dev

12/03/2014 13:19, Daniel Kan :
> 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>

I forgot your patch when I've sent this one:
	http://dpdk.org/ml/archives/dev/2014-March/001647.html
I've merged them and applied for 1.6.0r2:
	http://dpdk.org/browse/dpdk/commit/?id=18f02ff759

Thank you
-- 
Thomas

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-03-21 14:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-12 20:19 [dpdk-dev] [PATCH] vmxnet3: fixed segfault when initializing vmxnet3 pmd on linux platform Daniel Kan
2014-03-21 14:46 ` Thomas Monjalon

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).