DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Daniel Kan <dan@nyansa.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] 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@nyansa.com>

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

  reply	other threads:[~2014-03-21 14:08 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-04 15:23 [dpdk-dev] Which vmxnet3 pmd is to be used in dpdk 1.6.x? Srinivasan J
2014-03-05 14:28 ` Prashant Upadhyaya
2014-03-05 15:10   ` David Marchand
2014-03-05 15:30     ` Prashant Upadhyaya
2014-03-06  6:50     ` Prashant Upadhyaya
2014-03-06  7:18       ` Prashant Upadhyaya
2014-03-07  3:38         ` Srinivasan J
2014-03-07  5:13           ` Prashant Upadhyaya
2014-03-08 19:08             ` Srinivasan J
2014-03-10  8:00               ` Prashant Upadhyaya
2014-03-10 10:54                 ` Prashant Upadhyaya
2014-03-10 15:50                 ` Stephen Hemminger
2014-03-11  5:27                   ` Prashant Upadhyaya
2014-03-11  8:52                     ` Prashant Upadhyaya
2014-03-21  8:11                     ` Prashant Upadhyaya
2014-05-06  5:48                       ` Prashant Upadhyaya
2014-03-11  5:33                 ` [dpdk-dev] On vmxnet-pmd crash in DPDK 1.6.0r1 Daniel Kan
2014-03-11  6:20                   ` Daniel Kan
2014-03-11  6:29                     ` Daniel Kan
2014-03-21 14:10                       ` Thomas Monjalon [this message]
2014-03-05 14:55 ` [dpdk-dev] 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@6wind.com \
    --cc=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).