Message ID | 1443343866-363-1-git-send-email-kirill@korins.ky (mailing list archive) |
---|---|
State | Rejected, archived |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id C9D575958; Sun, 27 Sep 2015 10:52:09 +0200 (CEST) Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sg2apc01on0107.outbound.protection.outlook.com [104.47.125.107]) by dpdk.org (Postfix) with ESMTP id C152D5947 for <dev@dpdk.org>; Sun, 27 Sep 2015 10:52:07 +0200 (CEST) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=kirill@korins.ky; Received: from localhost.localdomain (31.146.93.215) by HK2PR0301MB1252.apcprd03.prod.outlook.com (10.162.245.27) with Microsoft SMTP Server (TLS) id 15.1.280.20; Sun, 27 Sep 2015 08:52:01 +0000 From: "Kirill A. Korinsky" <kirill@korins.ky> To: <dev@dpdk.org> Date: Sun, 27 Sep 2015 12:51:06 +0400 Message-ID: <1443343866-363-1-git-send-email-kirill@korins.ky> X-Mailer: git-send-email 2.5.3 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [31.146.93.215] X-ClientProxiedBy: HE1PR03CA0006.eurprd03.prod.outlook.com (25.163.170.144) To HK2PR0301MB1252.apcprd03.prod.outlook.com (25.162.245.27) X-Microsoft-Exchange-Diagnostics: 1; HK2PR0301MB1252; 2:fQVkAs5VrFb4Li/alBnjiMQXwfy1P115UMaDEKRtI9catTTJ1atOSVSWkuunD+JrOGtv4XZXFAIdag9/1dhvggXE1WTieTFWC8RK7FDexCO8dYsuTeCwmftWMhIox3CDRoN39JzVbVSjYLeZj7Uy9ZosIKhXSu6c+rdzbkCDTr4=; 3:miMW9zz4mFlgj1i0M6QMSBgaYdDlNhjMZga54YwvJ/Qxelf2AAOuApDGCK2oWVv7CJh+Jwm+vmxfT2dlNyleZG8osmeJxeY3OgsJfr4yt+EhGkJNrLE6++CnVG9SGgl3PVmrasIRc7wwJCVk7EZAcA==; 25:Wk1RqsqnJlcUL2jyoNeSLERXge+KMtWy8PkOM6YSrWIsQhBQ6S5qrinq4hpM3O1li4BW/WdeoZwUH5NTB61iqi5kPRfo3NMSiBy6PTR9tZzrKmrzL3gg/Fg9d8Kf/oZhLVuwxmyg3IuaBzPj2BDybbBVMrW9PmjM77F2hnAJBGR2B4YuK4snHQzFWTXad3GJbAN7829CwGALHdrZJ/dzOumgwHS/SB1CMMizg3qAgz9OMBd1l0zd/P9UCmHEF9W8EksNSXtETKV9rRK9SHnwQA== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:HK2PR0301MB1252; X-Microsoft-Antispam-PRVS: <HK2PR0301MB1252CB6010076A406543C0A3DD400@HK2PR0301MB1252.apcprd03.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(520078)(8121501046)(3002001); SRVR:HK2PR0301MB1252; BCL:0; PCL:0; RULEID:; SRVR:HK2PR0301MB1252; X-Microsoft-Exchange-Diagnostics: 1; HK2PR0301MB1252; 4:KqhHcfc05hkXA9b7uN9fGlFRX1VYg138OQ3ZH1Tlifcz8xZMxrL60jOiWtx4P2z5OFs4ijNjmxBMj792iYt8vgvilq2SAtds8E9orUwmZ+JezMDKVU5qxuWSIVKpdMdoXKs7j9ukZ3YpB7sl5NJE+qowixIFMfnfB9JoPBHTX7+SYyjkeWDWYIAxtg+n9TrtsUnnUbcnDmxLkkJiuHj0XkgDmX8dMQD+Phv/lMuQlj3Rp+nz5CPTah+n4zqHPqLUyK6ws/MElbn6RK/GpW1cVCTSnhDyGxHq32bmlzpI6J6FUVEs+AOP6ptBhnU4Pkv1XWU4YVv1LwLu+ZD6K+eDtGRVSNQJ14dx+1KEdVgcrd8= X-Forefront-PRVS: 07126E493C X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(6069001)(199003)(189002)(33646002)(87976001)(19580395003)(81156007)(86362001)(5001830100001)(5001860100001)(4001540100001)(97736004)(40100003)(5007970100001)(92566002)(122386002)(5004730100002)(64706001)(47776003)(66066001)(42186005)(5003940100001)(50466002)(101416001)(50226001)(105586002)(48376002)(50986999)(107886002)(110136002)(74482002)(2351001)(229853001)(189998001)(5001960100002)(450100001)(46102003)(77096005)(77156002)(68736005)(62966003)(106356001)(36756003); DIR:OUT; SFP:1102; SCL:1; SRVR:HK2PR0301MB1252; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; A:0; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: korins.ky does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HK2PR0301MB1252; 23:Et4qvycYrCVPNLvwfkMhm2ns5pzAAtGVtnOzKJD?= =?us-ascii?Q?OzGsf9Hjt+KDWuuzTaL2QQMwD0/Gat0J6Dhd217QfebeoVXdLTDFOM0C5S98?= =?us-ascii?Q?/9tmYiHIz6w6+3CB9D1w0yWJe6BHIha8VgBISmGx4RzL3+0kCtbWk+F7tni4?= =?us-ascii?Q?GYMyck/THoeFvY7avqjZxWVqBp0XwK1hD/IghY5bMtVDseiwg7CsNosCyFVU?= =?us-ascii?Q?IHCSNByhgRyaNXTYO4hYZgYitFmWk/1uOdaXbyq4DnbHZF3EMIVCVv8TK8fC?= =?us-ascii?Q?mbwIswPhMLUgYkV8gtRC1U9knLBCGC+rzhuOPX6JjG1ugQ2H+9i5bOZJzacw?= =?us-ascii?Q?Q4fuB8RlvhxEIjdFPd0+AlafJM0Lz2BL0YUl68lWHW2y1vcKjZMR+Vxy3cJF?= =?us-ascii?Q?5rPGXnRJGWFsL/fwPaz4G6u12BrI0cJPdKZgqNQ7UumGC0iZjq+g+xL+nJSv?= =?us-ascii?Q?LvsJ6f6R295YSMtacoXtxfEbxxrbKZiqhdOr49w5DwH5YVFjVZdvcdJuKquA?= =?us-ascii?Q?uid3k+JykLBsWJBR89wdxgVvc0+7mbTHoSoNTdwAsrICV4ZXH+KqdObSpxAs?= =?us-ascii?Q?YlbY370ADuRlJ/5TiNv9hpvIjehQx38yI6CdCOlMYHeKHkFmx2dQ75WanS9a?= =?us-ascii?Q?9Cylg6b8mwY/vOZ2bJmsyq8Qq92ss0j13woHOQ4ni3inAbDSW529bO1UpFiW?= =?us-ascii?Q?I2CRkt0ejJ/67J5RiXL1GRLENq7NZhHtE7F3dofx1t2SYI0OTMQcaox8Ed5j?= =?us-ascii?Q?ix1+Mpmcfda0xFndRxR3BODnM7fYWhF53H2oaz7SCQ9ERKl0UMTqeUt/luE9?= =?us-ascii?Q?RAlFptYqMgik90hJ+wy8YwWeMIF0vRFhc06GCrgYEHDRxDmuwNyAjlH2uWKd?= =?us-ascii?Q?LLpeu/1leZaULD55KsifSTfCJAYvCpMx1+ax6Hx1UOSPk6IBhCJ28g5yHyDb?= =?us-ascii?Q?QP6rn23sN68hkaZVAjG135Upbq+1rh8Ly6xrkj42LwnbRSaALOJ4+J5gvqFd?= =?us-ascii?Q?AegHwuFS0ksewusRp9LCh4NXFJD3ZJpUTU+mJnXLhRLl4dUorcbQwUdCXtPW?= =?us-ascii?Q?uKdd02H77yn53pNMT2+nSNt7ghiunI7MgIhuE+/aVSBlYun3dDQu+49Kbo76?= =?us-ascii?Q?+dV6GfTJvJ2okbaxVfoLSMRo5mSsDh2OyY8D5GsRVdzTvZvDF+JJpZv3OFuF?= =?us-ascii?Q?8L7U81w7Jt4eDefA=3D?= X-Microsoft-Exchange-Diagnostics: 1; HK2PR0301MB1252; 5:wSOt+xirXVVThufyXE3Njhufyro6pgPsAmrSTfiRf5oZ/j4xY3OjEjZT1UYrOER8jePOg8CgkZZaQyWTYl5JisRYWAdtDy66FA54+EZZAbSBXRePp5IqkGhDLI2pQfJRl58LMIHtdnlmefEFCH7UUQ==; 24:nEv8R0swL2mftkECy9TZYMhlr5VUta9wVXeaU6/pPgG8hoN8nLJ4qwMPxMY1MgX1Z1ich1YzhFpmUlOJF7ewNqnBrQZoyjUyiDpMyUrMEH8=; 20:9DJvKUfI13Ubj8mzOrAlCP151z5DiIwKfnMBBFj0XBeCovv2nJtWq1n8iBn28o3dEH41Jbc1WneCRIuckGzpXw== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: korins.ky X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Sep 2015 08:52:01.9610 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HK2PR0301MB1252 Subject: [dpdk-dev] [PATCH] Fix VMware emulated e1000 doesn't support INTX_DISABLE flag X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK <dev.dpdk.org> List-Unsubscribe: <http://dpdk.org/ml/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://dpdk.org/ml/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <http://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Commit Message
Kirill A. Korinsky
Sept. 27, 2015, 8:51 a.m. UTC
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(-)
Comments
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.
> 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!
> 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.
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;