From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f53.google.com (mail-pa0-f53.google.com [209.85.220.53]) by dpdk.org (Postfix) with ESMTP id 7E974B36A for ; Thu, 24 Jul 2014 17:09:36 +0200 (CEST) Received: by mail-pa0-f53.google.com with SMTP id kq14so4028864pab.26 for ; Thu, 24 Jul 2014 08:11:04 -0700 (PDT) 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-type:content-transfer-encoding; bh=Rm1yGu8zg8cuQdu9whtdC3T8sX4JYdKGaMLxLQPLk5g=; b=hTHNizPvetTwatxJrtyChkItWxUqIsZpz6O05a+lzPWBbg9+a+acOov2jPOMxkls+n u+EsydjVH1FCeWoVJLmicVqtgywNhaRuod7pVTp4cMiTCBVUW7oHPOB01XoXglPtMCRl 6g9O4fMAjeVa+8rjO27SpftDxoKtP2iLEztbaG8ev5NnuP9sk7tprMmCj3z1TXzuHjiY iBiajZgomg6eN+rwp7zyyrfOaBMpYFSN/hl66WG52Nj8esThCmCHBb8L8Ph5WF8RrVaf OqCZJfSG53PQsucwA2PMmzl3D8Lb1XYIpP+UjpspGq2fFmwoYkTrGCek09PB8di7Um9J a5+w== X-Gm-Message-State: ALoCoQloTFtjY39uIkAQ3fNYiVeW47XAowfsplCmsuIURoSZ1Pxq4jQbwndOO/gP8uJ35y/bXdVx X-Received: by 10.70.45.46 with SMTP id j14mr11180336pdm.29.1406214664288; Thu, 24 Jul 2014 08:11:04 -0700 (PDT) Received: from haswell.linuxnetplumber.net (static-50-53-72-226.bvtn.or.frontiernet.net. [50.53.72.226]) by mx.google.com with ESMTPSA id gd2sm5876565pbb.95.2014.07.24.08.11.03 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Jul 2014 08:11:04 -0700 (PDT) Date: Thu, 24 Jul 2014 08:11:06 -0700 From: Stephen Hemminger To: Yerden Zhumabekov Message-ID: <20140724081106.1c2bae0c@haswell.linuxnetplumber.net> In-Reply-To: <53D07968.8030105@sts.kz> References: <1406086726-54032-1-git-send-email-e_zhumabekov@sts.kz> <1406086726-54032-2-git-send-email-e_zhumabekov@sts.kz> <20140723110914.6b6902e8@haswell> <53D07968.8030105@sts.kz> X-Mailer: Claws Mail 3.10.1 (GTK+ 2.24.24; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH] igb_uio: fall back to enable/disable irq mode 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: Thu, 24 Jul 2014 15:09:36 -0000 On Thu, 24 Jul 2014 09:11:36 +0600 Yerden Zhumabekov wrote: > 24.07.2014 0:09, Stephen Hemminger =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > >> Rewritten IRQ mode handling code introduced in commit 399a3f0d > >> (igb_uio: fix IRQ mode handling) renders some faulty NICs (VMware > >> e1000, for example) unusable if INTX mode is not supported. > >> > >> This patch gets these NICs up and running, but throwing a kernel > >> warning. > >> > >> Signed-off-by: Yerden Zhumabekov > > That is because the VMWare PCI INTX is broken. > > The masking logic doesn't work. > > > > Rather than applying this patch a deeper fix in E1000 and DPDK handling > > of link state is needed. Better to just make the E1000 able > > to function without IRQ for Link state than just pretend masking works >=20 > I'll dig deeper then, maybe I'll figure out something. > If IRQ doesn't hook anything then, I guess, NIC should be continuously > checked for link state. If so, where should I put my efforts? PMD? >=20 I think what would be the best fix is: 1. In igb_uio, if INTX test fails then setup with interrupts. This can be d= one by setting the irq # to 0. UIO in kernel will then setup device without any= IRQ support 2. In DPDK, change PCI code to handle case of UIO without interrupts, and s= et flag in the device structure. 3. In an accessor function in rte_ethdev layer add new function rte_eth_dev_has_link_intr() which checks for RTE_PCI_DRV_INTR_LSC flag and that interrupt setup was successful. 4. Application only configures dev_conf->intr_conf.lsc iff device supports it (see check #3)