From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from APC01-PU1-obe.outbound.protection.outlook.com (mail-pu1apc01on0101.outbound.protection.outlook.com [104.47.126.101]) by dpdk.org (Postfix) with ESMTP id BB4211DB1 for ; Mon, 28 Sep 2015 13:33:28 +0200 (CEST) Received: from SIXPR0301MB1258.apcprd03.prod.outlook.com (10.162.179.15) by SIXPR0301MB1259.apcprd03.prod.outlook.com (10.162.179.150) with Microsoft SMTP Server (TLS) id 15.1.280.20; Mon, 28 Sep 2015 11:33:23 +0000 Received: from SIXPR0301MB1258.apcprd03.prod.outlook.com ([10.162.179.15]) by SIXPR0301MB1258.apcprd03.prod.outlook.com ([10.162.179.15]) with mapi id 15.01.0280.017; Mon, 28 Sep 2015 11:33:23 +0000 From: "Kirill A. Korinsky" To: Stephen Hemminger Thread-Topic: [dpdk-dev] [PATCH] Fix VMware emulated e1000 doesn't support INTX_DISABLE flag Thread-Index: AQHQ+W1TDkhydYX6C06V1K2t7ZcSMp5R0BsA Date: Mon, 28 Sep 2015 11:33:23 +0000 Message-ID: <3F087D4E-3C62-4379-82CA-1A11EBA6DFA8@korins.ky> References: <1443343866-363-1-git-send-email-kirill@korins.ky> <20150927144157.77708f7c@urahara> In-Reply-To: <20150927144157.77708f7c@urahara> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=kirill@korins.ky; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [31.146.93.215] x-microsoft-exchange-diagnostics: 1; SIXPR0301MB1259; 5:uzKtGC+sdgpERrmcEzXZAIM6r2t6lURUouog3ZxPAu1+oHxz/8E3NLlMoaFxn7c5gTfbhgih8P2SNNmhcihjU5U8DHxdaYovu2wN61LIW1sPv/xRQbj7swXlPwFb4ptK/nPNdMeE5BVk4/oVTupmDA==; 24:wHFLyhjb8HpjONI6x0s78Xay88Lb/E8A1QQuMAsH6iJoyXaQ7IqLlAOSunqTs844jGueck00PmXQDPKsQYl53iSGpgsZVIKX6fNbldgrbmU=; 20:AGVbnwHkBK1PmaJs+pQg4AHmhKUwy04tp5RG0IhXFTqhtYL19EAS4nZE3paNT8t2Iwrio7gdwDR+Ax7mO7UB0Q== x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SIXPR0301MB1259; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(520078)(8121501046)(3002001); SRVR:SIXPR0301MB1259; BCL:0; PCL:0; RULEID:; SRVR:SIXPR0301MB1259; x-forefront-prvs: 0713BC207F x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(199003)(24454002)(189002)(40100003)(5002640100001)(74482002)(46102003)(5004730100002)(5001960100002)(122556002)(10400500002)(19580405001)(97736004)(19580395003)(87936001)(110136002)(5001860100001)(5007970100001)(189998001)(5001830100001)(86362001)(77156002)(50986999)(62966003)(92566002)(76176999)(5001920100001)(54356999)(83716003)(68736005)(81156007)(4001540100001)(101416001)(2950100001)(36756003)(77096005)(2900100001)(106116001)(11100500001)(64706001)(82746002)(33656002)(102836002)(66066001)(106356001)(105586002)(104396002); DIR:OUT; SFP:1102; SCL:1; SRVR:SIXPR0301MB1259; H:SIXPR0301MB1258.apcprd03.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:0; MX:3; LANG:en; received-spf: None (protection.outlook.com: korins.ky does not designate permitted sender hosts) spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-ID: <1C7C4A97C311DD478CC6287DE803C9ED@apcprd03.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: korins.ky X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Sep 2015 11:33:23.0854 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 18cd0c33-4026-4f0a-b6e1-dedb5b60d7e6 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SIXPR0301MB1259 Cc: "dev@dpdk.org" Subject: Re: [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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Sep 2015 11:33:29 -0000 > On 28 Sep 2015, at 01:41, Stephen Hemminger = wrote: >=20 > On Sun, 27 Sep 2015 12:51:06 +0400 > "Kirill A. Korinsky" wrote: >=20 >> When you try to run any DPDK-app in VMWare with e1000/82545EM NIC >> you have a lot of lines like: >>=20 >> EAL: Error reading from file descriptor 9: Input/output error >>=20 >> 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(-) >>=20 >> 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 >> #endif >> +#include >> #include >>=20 >> #include "compat.h" >> @@ -508,7 +509,8 @@ igbuio_pci_probe(struct pci_dev *dev, const struct p= ci_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 =3D=3D &x86_hyper_vmwar= e) { >> dev_dbg(&dev->dev, "using INTX"); >> udev->info.irq_flags =3D IRQF_SHARED; >> udev->info.irq =3D dev->irq; >=20 > I don't think driver should be expecting INTx to work on VMware. > If kernel test fails, it means masking is broken (in VMware). >=20 >=20 > It is better for driver (E1000 PMD) to report that Link state interrupt d= oes > 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].virtu= alDev =3D "e1000" to "e1000e" in vmx configuration file this virtual machin= e.