From: Thomas Monjalon <thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
To: Daniel Kan <dan-nm7580oGLDTQT0dZR+AlfA@public.gmane.org>
Cc: dev-VfR2kkLFssw@public.gmane.org
Subject: Re: On vmxnet-pmd crash in DPDK 1.6.0r1
Date: Fri, 21 Mar 2014 15:10:08 +0100 [thread overview]
Message-ID: <29690202.d2trYudiQU@xps13> (raw)
In-Reply-To: <BF719725-C5BE-4CBA-9523-5293C04000BA-nm7580oGLDTQT0dZR+AlfA@public.gmane.org>
10/03/2014 23:29, Daniel Kan :
> virtio-pmd has the same pattern. I wonder if vmxnet3-pmd just blindly copied
> the same paradigm.
>
> 473 static struct eth_driver rte_virtio_pmd = {
> 474 {
> 475 .name = "rte_virtio_pmd",
> 476 .id_table = pci_id_virtio_map,
> 477 #ifdef RTE_EAL_UNBIND_PORTS
> 478 .drv_flags = RTE_PCI_DRV_NEED_IGB_UIO,
> 479 #endif
[...]
> > 266 static struct eth_driver rte_vmxnet3_pmd = {
> > 267 {
> > 268 .name = "rte_vmxnet3_pmd",
> > 269 .id_table = pci_id_vmxnet3_map,
> > 270 #ifdef RTE_EAL_UNBIND_PORTS
> > 271 .drv_flags = RTE_PCI_DRV_NEED_IGB_UIO,
> > 272 #endif
It was the old way of configuring UIO PMD before this patch:
pci: use igb_uio mapping only when needed
http://dpdk.org/browse/dpdk/commit/?id=10ed99419b12b8
The goal of this patch was to fix usage of the extensions virtio-net-pmd and
vmxnet3-usermap.
You can see in this patch that em/igb/ixgbe drivers are updated accordingly.
Then virtio_uio and vmxnet3_uio were released without this patch in mind. So
they were broken.
> > lib/librte_eal/linuxapp/eal/eal_pci.c
> > 1039 #ifdef RTE_EAL_UNBIND_PORTS
> > 1040 if (dr->drv_flags & RTE_PCI_DRV_NEED_IGB_UIO) {
> > 1041 /* unbind driver and load uio resources for Intel NICs */
> > 1042 if (pci_switch_module(dr, dev, 1, IGB_UIO_NAME) < 0)
> > ...
> > 1050 #else
> > 1051 if (dr->drv_flags & RTE_PCI_DRV_NEED_IGB_UIO)
> > 1052 /* just map resources for Intel NICs */
> > 1053 if (pci_uio_map_resource(dev) < 0)
> > 1054 return -1;
> > 1055 #endif
> >
> > If RTE_EAL_UNBIND_PORTS is defined, pci_switch_module will call
> > pci_uio_map_resource.
> >
> > I then looked at the bsdapp’s version, it simply has:
> > lib/librte_eal/bsdapp/eal/eal_pci.c
> > 479 /* just map the NIC resources */
> > 480 if (pci_uio_map_resource(dev) < 0)
> > 481 return -1;
> >
> > I don’t know the history behind why .drv_flags = RTE_PCI_DRV_NEED_IGB_UIO
> > only for RTE_EAL_UNBIND_PORTS. Can we just ensure pci_uio_map_resource is
> > called in linux just like bsd version? One way is to ensure drv_flags is
> > always set to RTE_PCI_DRV_NEED_IGB_UIO, but I don’t know if this fix will
> > break other parts.
I've just sent another patch to update and fix virtio_uio and vmxnet3_uio:
http://dpdk.org/ml/archives/dev/2014-March/001647.html
Feel free to ack it.
Thanks for reporting
--
Thomas
next prev parent reply other threads:[~2014-03-21 14:10 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-04 15:23 Which vmxnet3 pmd is to be used in dpdk 1.6.x? Srinivasan J
[not found] ` <CAEbeQ+q2qZkufmZrHXd2r_JTq2wL-0=xm5-9ngqfqPqq8_A0eQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-03-05 14:28 ` Prashant Upadhyaya
[not found] ` <C7CE7EEF248E2B48BBA63D0ABEEE700C5A2A50609C-2zbAqoMm/rLQX//ci7WS+53eMK7GYZcrXYFosVITYPE@public.gmane.org>
2014-03-05 15:10 ` David Marchand
[not found] ` <CALwxeUsV7NCgQBbL2XCSYm_RLx1tt5pMN_thbxnP_2D3ho4thw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-03-05 15:30 ` Prashant Upadhyaya
2014-03-06 6:50 ` Prashant Upadhyaya
[not found] ` <C7CE7EEF248E2B48BBA63D0ABEEE700C5A2A506142-2zbAqoMm/rLQX//ci7WS+53eMK7GYZcrXYFosVITYPE@public.gmane.org>
2014-03-06 7:18 ` Prashant Upadhyaya
[not found] ` <C7CE7EEF248E2B48BBA63D0ABEEE700C5A2A506166-2zbAqoMm/rLQX//ci7WS+53eMK7GYZcrXYFosVITYPE@public.gmane.org>
2014-03-07 3:38 ` Srinivasan J
[not found] ` <CAEbeQ+rpRdH-=WgLE_GC6dvcrFnLCq2p+gz7fPY4uZKR5mE5vw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-03-07 5:13 ` Prashant Upadhyaya
[not found] ` <C7CE7EEF248E2B48BBA63D0ABEEE700C5A2A5062FF-2zbAqoMm/rLQX//ci7WS+53eMK7GYZcrXYFosVITYPE@public.gmane.org>
2014-03-08 19:08 ` Srinivasan J
[not found] ` <CAEbeQ+oOx=UGPyLgpe-Uj0=vf1aCrKxEBhfAT_UOS13GrmQ5_Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-03-10 8:00 ` Prashant Upadhyaya
[not found] ` <C7CE7EEF248E2B48BBA63D0ABEEE700C61F80094E7-2zbAqoMm/rLQX//ci7WS+53eMK7GYZcrXYFosVITYPE@public.gmane.org>
2014-03-10 10:54 ` Prashant Upadhyaya
2014-03-10 15:50 ` Stephen Hemminger
[not found] ` <20140310085048.71a49faf-We1ePj4FEcvRI77zikRAJc56i+j3xesD0e7PPNI6Mm0@public.gmane.org>
2014-03-11 5:27 ` Prashant Upadhyaya
[not found] ` <C7CE7EEF248E2B48BBA63D0ABEEE700C61F800965A-2zbAqoMm/rLQX//ci7WS+53eMK7GYZcrXYFosVITYPE@public.gmane.org>
2014-03-11 8:52 ` Prashant Upadhyaya
2014-03-21 8:11 ` Prashant Upadhyaya
[not found] ` <C7CE7EEF248E2B48BBA63D0ABEEE700C61FB347581-2zbAqoMm/rLQX//ci7WS+53eMK7GYZcrXYFosVITYPE@public.gmane.org>
2014-05-06 5:48 ` Prashant Upadhyaya
2014-03-11 5:33 ` On vmxnet-pmd crash in DPDK 1.6.0r1 Daniel Kan
[not found] ` <010A5C29-965A-4DB3-BA3F-2525914016A0-nm7580oGLDTQT0dZR+AlfA@public.gmane.org>
2014-03-11 6:20 ` Daniel Kan
[not found] ` <FA87CC34-EBB8-4F7B-8E1D-C440520969BA-nm7580oGLDTQT0dZR+AlfA@public.gmane.org>
2014-03-11 6:29 ` Daniel Kan
[not found] ` <BF719725-C5BE-4CBA-9523-5293C04000BA-nm7580oGLDTQT0dZR+AlfA@public.gmane.org>
2014-03-21 14:10 ` Thomas Monjalon [this message]
2014-03-05 14:55 ` Which vmxnet3 pmd is to be used in dpdk 1.6.x? 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=29690202.d2trYudiQU@xps13 \
--to=thomas.monjalon-pdr9zngts4eavxtiumwx3w@public.gmane.org \
--cc=dan-nm7580oGLDTQT0dZR+AlfA@public.gmane.org \
--cc=dev-VfR2kkLFssw@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.