From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f174.google.com (mail-pf0-f174.google.com [209.85.192.174]) by dpdk.org (Postfix) with ESMTP id 291192BB8 for ; Wed, 23 Mar 2016 03:05:39 +0100 (CET) Received: by mail-pf0-f174.google.com with SMTP id x3so3523371pfb.1 for ; Tue, 22 Mar 2016 19:05:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Zm93F61aKibZ0e0KBr4p8GGSAnePJcjypHbxvBD1ecs=; b=cFMulIgeQlq3jki7HVUk6JLk8a7TJDH+W3o0JZkm7kBppS8lT6IhWN/SIuqx2rIVII 4gUdZVisKXYiOHk9ZzF9eAnIKThT07u0Ymt9FuCU4OrmlAxa2M+DpptcvgSRtMEDDjP1 FGLFSvC5WCWKUB5Y6qq4GqE/CZjosQaERV2932tUOfWcaXhMJSbkHtrGD/Apunjd1tE5 wL+7K5Fo32RXBzl36xJJBad3UaT3G5VzA7Dij4/7ozBrqjTcLLoHORu7cIXpr37lQXrh 9WfTcFdUI1x4Gq+diqEmC7REoZasSTJgaur61gfJGDT+RKR//oPuXzFk0HHZCs7cF9I4 vVGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Zm93F61aKibZ0e0KBr4p8GGSAnePJcjypHbxvBD1ecs=; b=gJN6Jr6qc7a/NIwp3i+ljdAeleEk5VjPXTyxWo3YUHVtU4GEiF3jdXDtzlDeQKtjGC 75eGK5XD85K+I21GjcyBVo6/7XTD/7P8BxkHXu109K/1+gPxIfj/C9LnFBuG+go4FQrd hxT3rEbNTnOGJ/GT7qlUcA6OpIoDRA2i0VuM/EEGEVnjaYFj3bjWhKlNOA6LcX/bRHwd pkW6XTiUgpAOuCw9YKZ7XtwMV057C4EP63GcD9jzl6mSJQpfrzCV12ajBVj7/58SZLyz SokS4l+IEMxF7TxGB1veQvVGDsVC80+AFIJHh/pJLqZVKHMx0H7twcxknJZNiHZc2Akp qBDQ== X-Gm-Message-State: AD7BkJL9YvBeJA66Xd31Wfw1dA9Wf6LQB0Gsv7CE37NAnPhOaa9sc1yJlYmy4wsRlDxleQ== X-Received: by 10.98.17.151 with SMTP id 23mr453271pfr.37.1458698738476; Tue, 22 Mar 2016 19:05:38 -0700 (PDT) Received: from xeon-e3 (static-50-53-65-230.bvtn.or.frontiernet.net. [50.53.65.230]) by smtp.gmail.com with ESMTPSA id fk9sm199736pad.9.2016.03.22.19.05.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Mar 2016 19:05:38 -0700 (PDT) Date: Tue, 22 Mar 2016 19:05:54 -0700 From: Stephen Hemminger To: Thomas Monjalon Cc: Qian Xu , Masaru OKI , dev@dpdk.org Message-ID: <20160322190554.4aca11d2@xeon-e3> In-Reply-To: <2437286.FLD0q4sve1@xps13> References: <1458550874-15709-1-git-send-email-qian.q.xu@intel.com> <2437286.FLD0q4sve1@xps13> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] igb_uio: fix vmware e1000 input/output error 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: Wed, 23 Mar 2016 02:05:39 -0000 On Mon, 21 Mar 2016 11:07:56 +0100 Thomas Monjalon 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.