DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] Fix VMware emulated e1000 doesn't support INTX_DISABLE flag
@ 2015-09-27  8:51 Kirill A. Korinsky
  2015-09-27 21:41 ` Stephen Hemminger
  0 siblings, 1 reply; 4+ messages in thread
From: Kirill A. Korinsky @ 2015-09-27  8:51 UTC (permalink / raw)
  To: dev

When you try to run any DPDK-app in VMWare with e1000/82545EM NIC
you have a lot of lines like:

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

The reason of this error is bad INTX emulation in VMWare
and pci_intx_mask_supported return false every time.
---
 lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
index 865a276..c85f7e5 100644
--- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
+++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
@@ -36,6 +36,7 @@
 #ifdef CONFIG_XEN_DOM0
 #include <xen/xen.h>
 #endif
+#include <asm/hypervisor.h>
 #include <rte_pci_dev_features.h>
 
 #include "compat.h"
@@ -508,7 +509,8 @@ 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)) {
+		/*  VMware emulated e1000 doesn't support INTX_DISABLE flag */
+		if (pci_intx_mask_supported(dev) || x86_hyper == &x86_hyper_vmware) {
 			dev_dbg(&dev->dev, "using INTX");
 			udev->info.irq_flags = IRQF_SHARED;
 			udev->info.irq = dev->irq;
-- 
2.5.3

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

* Re: [dpdk-dev] [PATCH] Fix VMware emulated e1000 doesn't support INTX_DISABLE flag
  2015-09-27  8:51 [dpdk-dev] [PATCH] Fix VMware emulated e1000 doesn't support INTX_DISABLE flag Kirill A. Korinsky
@ 2015-09-27 21:41 ` Stephen Hemminger
  2015-09-28  5:51   ` Kirill A. Korinsky
  2015-09-28 11:33   ` Kirill A. Korinsky
  0 siblings, 2 replies; 4+ messages in thread
From: Stephen Hemminger @ 2015-09-27 21:41 UTC (permalink / raw)
  To: Kirill A. Korinsky; +Cc: dev

On Sun, 27 Sep 2015 12:51:06 +0400
"Kirill A. Korinsky" <kirill@korins.ky> wrote:

> When you try to run any DPDK-app in VMWare with e1000/82545EM NIC
> you have a lot of lines like:
> 
>   EAL: Error reading from file descriptor 9: Input/output error
> 
> The reason of this error is bad INTX emulation in VMWare
> and pci_intx_mask_supported return false every time.
> ---
>  lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
> index 865a276..c85f7e5 100644
> --- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
> +++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
> @@ -36,6 +36,7 @@
>  #ifdef CONFIG_XEN_DOM0
>  #include <xen/xen.h>
>  #endif
> +#include <asm/hypervisor.h>
>  #include <rte_pci_dev_features.h>
>  
>  #include "compat.h"
> @@ -508,7 +509,8 @@ 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)) {
> +		/*  VMware emulated e1000 doesn't support INTX_DISABLE flag */
> +		if (pci_intx_mask_supported(dev) || x86_hyper == &x86_hyper_vmware) {
>  			dev_dbg(&dev->dev, "using INTX");
>  			udev->info.irq_flags = IRQF_SHARED;
>  			udev->info.irq = dev->irq;

I don't think driver should be expecting INTx to work on VMware.
If kernel test fails, it means masking is broken (in VMware).


It is better for driver (E1000 PMD) to report that Link state interrupt does
not work (if IRQ setup fails). Then application can test if LSC irq works
and not enable it.

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

* Re: [dpdk-dev] [PATCH] Fix VMware emulated e1000 doesn't support INTX_DISABLE flag
  2015-09-27 21:41 ` Stephen Hemminger
@ 2015-09-28  5:51   ` Kirill A. Korinsky
  2015-09-28 11:33   ` Kirill A. Korinsky
  1 sibling, 0 replies; 4+ messages in thread
From: Kirill A. Korinsky @ 2015-09-28  5:51 UTC (permalink / raw)
  To: dev


> On 28 Sep 2015, at 01:41, Stephen Hemminger <stephen@networkplumber.org> wrote:
> 
> On Sun, 27 Sep 2015 12:51:06 +0400
> "Kirill A. Korinsky" <kirill@korins.ky> wrote:
> 
>> When you try to run any DPDK-app in VMWare with e1000/82545EM NIC
>> you have a lot of lines like:
>> 
>>  EAL: Error reading from file descriptor 9: Input/output error
>> 
>> The reason of this error is bad INTX emulation in VMWare
>> and pci_intx_mask_supported return false every time.
>> ---
>> lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 4 +++-
>> 1 file changed, 3 insertions(+), 1 deletion(-)
>> 
>> diff --git a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
>> index 865a276..c85f7e5 100644
>> --- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
>> +++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
>> @@ -36,6 +36,7 @@
>> #ifdef CONFIG_XEN_DOM0
>> #include <xen/xen.h>
>> #endif
>> +#include <asm/hypervisor.h>
>> #include <rte_pci_dev_features.h>
>> 
>> #include "compat.h"
>> @@ -508,7 +509,8 @@ 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)) {
>> +		/*  VMware emulated e1000 doesn't support INTX_DISABLE flag */
>> +		if (pci_intx_mask_supported(dev) || x86_hyper == &x86_hyper_vmware) {
>> 			dev_dbg(&dev->dev, "using INTX");
>> 			udev->info.irq_flags = IRQF_SHARED;
>> 			udev->info.irq = dev->irq;
> 
> I don't think driver should be expecting INTx to work on VMware.
> If kernel test fails, it means masking is broken (in VMware).
> 
> 
> It is better for driver (E1000 PMD) to report that Link state interrupt does
> not work (if IRQ setup fails). Then application can test if LSC irq works
> and not enable it.

Sounds reasonable.

Thanks! 

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

* Re: [dpdk-dev] [PATCH] Fix VMware emulated e1000 doesn't support INTX_DISABLE flag
  2015-09-27 21:41 ` Stephen Hemminger
  2015-09-28  5:51   ` Kirill A. Korinsky
@ 2015-09-28 11:33   ` Kirill A. Korinsky
  1 sibling, 0 replies; 4+ messages in thread
From: Kirill A. Korinsky @ 2015-09-28 11:33 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dev


> On 28 Sep 2015, at 01:41, Stephen Hemminger <stephen@networkplumber.org> wrote:
> 
> On Sun, 27 Sep 2015 12:51:06 +0400
> "Kirill A. Korinsky" <kirill@korins.ky> wrote:
> 
>> When you try to run any DPDK-app in VMWare with e1000/82545EM NIC
>> you have a lot of lines like:
>> 
>>  EAL: Error reading from file descriptor 9: Input/output error
>> 
>> The reason of this error is bad INTX emulation in VMWare
>> and pci_intx_mask_supported return false every time.
>> ---
>> lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 4 +++-
>> 1 file changed, 3 insertions(+), 1 deletion(-)
>> 
>> diff --git a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
>> index 865a276..c85f7e5 100644
>> --- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
>> +++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
>> @@ -36,6 +36,7 @@
>> #ifdef CONFIG_XEN_DOM0
>> #include <xen/xen.h>
>> #endif
>> +#include <asm/hypervisor.h>
>> #include <rte_pci_dev_features.h>
>> 
>> #include "compat.h"
>> @@ -508,7 +509,8 @@ 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)) {
>> +		/*  VMware emulated e1000 doesn't support INTX_DISABLE flag */
>> +		if (pci_intx_mask_supported(dev) || x86_hyper == &x86_hyper_vmware) {
>> 			dev_dbg(&dev->dev, "using INTX");
>> 			udev->info.irq_flags = IRQF_SHARED;
>> 			udev->info.irq = dev->irq;
> 
> I don't think driver should be expecting INTx to work on VMware.
> If kernel test fails, it means masking is broken (in VMware).
> 
> 
> It is better for driver (E1000 PMD) to report that Link state interrupt does
> not work (if IRQ setup fails). Then application can test if LSC irq works
> and not enable it.

I found temporary workaround for VMware: you must change ethernet[ID].virtualDev = "e1000" to "e1000e" in vmx configuration file this virtual machine.

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

end of thread, other threads:[~2015-09-28 11:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-27  8:51 [dpdk-dev] [PATCH] Fix VMware emulated e1000 doesn't support INTX_DISABLE flag Kirill A. Korinsky
2015-09-27 21:41 ` Stephen Hemminger
2015-09-28  5:51   ` Kirill A. Korinsky
2015-09-28 11:33   ` Kirill A. Korinsky

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