DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] igb_uio: fix vmware e1000 input/output error
@ 2016-03-21  9:01 Qian Xu
  2016-03-21 10:07 ` Thomas Monjalon
  0 siblings, 1 reply; 4+ messages in thread
From: Qian Xu @ 2016-03-21  9:01 UTC (permalink / raw)
  To: dev; +Cc: Qian Xu, Masaru OKI

In vmware esxi 6.0, add the emulated e1000 device to guest, then
launch the VM, we will see the error meassage as below:

EAL: Error reading from file descriptor 21: Input/output error

INTX is badly emulated in Vmware, INTX toggle check didn't work
with Vmware e1000 device. The patch is to fix the issue. And the
patch is from http://dpdk.org/dev/patchwork/patch/945/, so Masaru
OKI is the author. Qian just updated the patch for latest code.

Signed-off-by: Masaru OKI<m-oki@stratosphere.co.jp>

diff --git a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
index 72b2692..f5e9aeb 100644
--- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
+++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
@@ -450,14 +450,11 @@ igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
 		}
 		/* fall back to INTX */
 	case RTE_INTR_MODE_LEGACY:
-		if (pci_intx_mask_supported(dev)) {
-			dev_dbg(&dev->dev, "using INTX");
-			udev->info.irq_flags = IRQF_SHARED;
-			udev->info.irq = dev->irq;
-			udev->mode = RTE_INTR_MODE_LEGACY;
-			break;
-		}
-		dev_notice(&dev->dev, "PCI INTX mask not supported\n");
+                dev_dbg(&dev->dev, "using INTX");
+                udev->info.irq_flags = IRQF_SHARED;
+                udev->info.irq = dev->irq;
+                udev->mode = RTE_INTR_MODE_LEGACY;
+                break;
 		/* fall back to no IRQ */
 	case RTE_INTR_MODE_NONE:
 		udev->mode = RTE_INTR_MODE_NONE;
-- 
2.1.0

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

* Re: [dpdk-dev] [PATCH] igb_uio: fix vmware e1000 input/output error
  2016-03-21  9:01 [dpdk-dev] [PATCH] igb_uio: fix vmware e1000 input/output error Qian Xu
@ 2016-03-21 10:07 ` Thomas Monjalon
  2016-03-23  1:23   ` Xu, Qian Q
  2016-03-23  2:05   ` Stephen Hemminger
  0 siblings, 2 replies; 4+ messages in thread
From: Thomas Monjalon @ 2016-03-21 10:07 UTC (permalink / raw)
  To: Qian Xu, Masaru OKI; +Cc: dev, stephen

2016-03-21 17:01, Qian Xu:
> INTX is badly emulated in Vmware, INTX toggle check didn't work
> with Vmware e1000 device. The patch is to fix the issue.

Is it possible to detect a VMware e1000 device?

> --- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
> +++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
>  	case RTE_INTR_MODE_LEGACY:
> -		if (pci_intx_mask_supported(dev)) {
> -			dev_dbg(&dev->dev, "using INTX");
> -			udev->info.irq_flags = IRQF_SHARED;
> -			udev->info.irq = dev->irq;
> -			udev->mode = RTE_INTR_MODE_LEGACY;
> -			break;
> -		}
> -		dev_notice(&dev->dev, "PCI INTX mask not supported\n");
> +                dev_dbg(&dev->dev, "using INTX");
> +                udev->info.irq_flags = IRQF_SHARED;
> +                udev->info.irq = dev->irq;
> +                udev->mode = RTE_INTR_MODE_LEGACY;
> +                break;
>  		/* fall back to no IRQ */
>  	case RTE_INTR_MODE_NONE:

This patch is removing the INTX support detection and the
fallback to no IRQ.

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

* Re: [dpdk-dev] [PATCH] igb_uio: fix vmware e1000 input/output error
  2016-03-21 10:07 ` Thomas Monjalon
@ 2016-03-23  1:23   ` Xu, Qian Q
  2016-03-23  2:05   ` Stephen Hemminger
  1 sibling, 0 replies; 4+ messages in thread
From: Xu, Qian Q @ 2016-03-23  1:23 UTC (permalink / raw)
  To: Thomas Monjalon, Masaru OKI; +Cc: dev, stephen, Patel, Rashmin N, Shah, Rahul R

In fact, Masaru is the author, and I'm not sure how to detect a VWMARE E1000 device, anyone from vmware can check this? Thx. 

Thanks
Qian


-----Original Message-----
From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] 
Sent: Monday, March 21, 2016 6:08 PM
To: Xu, Qian Q; Masaru OKI
Cc: dev@dpdk.org; stephen@networkplumber.org
Subject: Re: [dpdk-dev] [PATCH] igb_uio: fix vmware e1000 input/output error

2016-03-21 17:01, Qian Xu:
> INTX is badly emulated in Vmware, INTX toggle check didn't work with 
> Vmware e1000 device. The patch is to fix the issue.

Is it possible to detect a VMware e1000 device?

> --- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
> +++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
>  	case RTE_INTR_MODE_LEGACY:
> -		if (pci_intx_mask_supported(dev)) {
> -			dev_dbg(&dev->dev, "using INTX");
> -			udev->info.irq_flags = IRQF_SHARED;
> -			udev->info.irq = dev->irq;
> -			udev->mode = RTE_INTR_MODE_LEGACY;
> -			break;
> -		}
> -		dev_notice(&dev->dev, "PCI INTX mask not supported\n");
> +                dev_dbg(&dev->dev, "using INTX");
> +                udev->info.irq_flags = IRQF_SHARED;
> +                udev->info.irq = dev->irq;
> +                udev->mode = RTE_INTR_MODE_LEGACY;
> +                break;
>  		/* fall back to no IRQ */
>  	case RTE_INTR_MODE_NONE:

This patch is removing the INTX support detection and the fallback to no IRQ.

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

* Re: [dpdk-dev] [PATCH] igb_uio: fix vmware e1000 input/output error
  2016-03-21 10:07 ` Thomas Monjalon
  2016-03-23  1:23   ` Xu, Qian Q
@ 2016-03-23  2:05   ` Stephen Hemminger
  1 sibling, 0 replies; 4+ messages in thread
From: Stephen Hemminger @ 2016-03-23  2:05 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Qian Xu, Masaru OKI, dev

On Mon, 21 Mar 2016 11:07:56 +0100
Thomas Monjalon <thomas.monjalon@6wind.com> wrote:

> 2016-03-21 17:01, Qian Xu:
> > INTX is badly emulated in Vmware, INTX toggle check didn't work
> > with Vmware e1000 device. The patch is to fix the issue.
> 
> Is it possible to detect a VMware e1000 device?
> 
> > --- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
> > +++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
> >  	case RTE_INTR_MODE_LEGACY:
> > -		if (pci_intx_mask_supported(dev)) {
> > -			dev_dbg(&dev->dev, "using INTX");
> > -			udev->info.irq_flags = IRQF_SHARED;
> > -			udev->info.irq = dev->irq;
> > -			udev->mode = RTE_INTR_MODE_LEGACY;
> > -			break;
> > -		}
> > -		dev_notice(&dev->dev, "PCI INTX mask not supported\n");
> > +                dev_dbg(&dev->dev, "using INTX");
> > +                udev->info.irq_flags = IRQF_SHARED;
> > +                udev->info.irq = dev->irq;
> > +                udev->mode = RTE_INTR_MODE_LEGACY;
> > +                break;
> >  		/* fall back to no IRQ */
> >  	case RTE_INTR_MODE_NONE:
> 
> This patch is removing the INTX support detection and the
> fallback to no IRQ.
> 

I agree with Thomas. If the kernel's "does INTx work" test fails then
most likely VMware is broken and later attempts to mask the interrupt
won't work. Better to have the DPDK abstraction layer
handle this. The EAL should:
 1) log a message when detected
 2) report that link state (and data) interrupts are not supported
    by setting proper flags so application knows that LSC is not available.
 3) give an error return on all attempts to enable interrupts.

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

end of thread, other threads:[~2016-03-23  2:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-21  9:01 [dpdk-dev] [PATCH] igb_uio: fix vmware e1000 input/output error Qian Xu
2016-03-21 10:07 ` Thomas Monjalon
2016-03-23  1:23   ` Xu, Qian Q
2016-03-23  2:05   ` Stephen Hemminger

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