From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH] igb_uio: fall back to enable/disable irq mode Date: Thu, 24 Jul 2014 08:11:06 -0700 Message-ID: <20140724081106.1c2bae0c@haswell.linuxnetplumber.net> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: "dev-VfR2kkLFssw@public.gmane.org" To: Yerden Zhumabekov Return-path: In-Reply-To: <53D07968.8030105-8EHiFRVJVgQ@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 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)