All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] igb_uio dropped support for some faulty NICs
@ 2014-07-23  3:38 Yerden Zhumabekov
       [not found] ` <1406086726-54032-1-git-send-email-e_zhumabekov-8EHiFRVJVgQ@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Yerden Zhumabekov @ 2014-07-23  3:38 UTC (permalink / raw)
  To: dev-VfR2kkLFssw

Hi,

Recent patch 399a3f0d (igb_uio: fix IRQ mode handling) has introduces new IRQ mode handling code.

As Stephen reported earlier, VMware PCI emulation of interrupts is somehow broken, so INTX mode is not supported (see http://dpdk.org/ml/archives/dev/2014-May/002432.html). The current code makes VMware e1000 unbindable to igb_uio driver and throwing -EIO error.

What I suggest is to throw a kernel warning but make the work with this kind of NIC possible.

Yerden Zhumabekov (1):
  igb_uio: fall back to enable/disable irq mode

 lib/librte_eal/linuxapp/igb_uio/igb_uio.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

-- 
1.7.10.4

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] igb_uio: fall back to enable/disable irq mode
       [not found] ` <1406086726-54032-1-git-send-email-e_zhumabekov-8EHiFRVJVgQ@public.gmane.org>
@ 2014-07-23  3:38   ` Yerden Zhumabekov
       [not found]     ` <1406086726-54032-2-git-send-email-e_zhumabekov-8EHiFRVJVgQ@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Yerden Zhumabekov @ 2014-07-23  3:38 UTC (permalink / raw)
  To: dev-VfR2kkLFssw

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 <e_zhumabekov-8EHiFRVJVgQ@public.gmane.org>
---
 lib/librte_eal/linuxapp/igb_uio/igb_uio.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
index f220a12..c4ab01a 100644
--- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
+++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
@@ -620,9 +620,9 @@ igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
 			udev->info.irq_flags = IRQF_SHARED;
 			udev->mode = RTE_INTR_MODE_LEGACY;
 		} else {
-			dev_err(&dev->dev, "PCI INTX mask not supported\n");
-			err = -EIO;
-			goto fail_release_iomem;
+			dev_warn(&dev->dev, "PCI INTX mask not supported\n");
+			udev->info.irq_flags = IRQF_SHARED;
+			udev->mode = RTE_INTR_MODE_LEGACY;
 		}
 		break;
 	default:
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] igb_uio: fall back to enable/disable irq mode
       [not found]     ` <1406086726-54032-2-git-send-email-e_zhumabekov-8EHiFRVJVgQ@public.gmane.org>
@ 2014-07-23 18:07       ` Stephen Hemminger
  2014-07-23 18:09       ` Stephen Hemminger
  1 sibling, 0 replies; 6+ messages in thread
From: Stephen Hemminger @ 2014-07-23 18:07 UTC (permalink / raw)
  To: Yerden Zhumabekov; +Cc: dev-VfR2kkLFssw

On Wed, 23 Jul 2014 09:38:46 +0600
Yerden Zhumabekov <e_zhumabekov-8EHiFRVJVgQ@public.gmane.org> wrote:

> 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 <e_zhumabekov-8EHiFRVJVgQ@public.gmane.org>

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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] igb_uio: fall back to enable/disable irq mode
       [not found]     ` <1406086726-54032-2-git-send-email-e_zhumabekov-8EHiFRVJVgQ@public.gmane.org>
  2014-07-23 18:07       ` Stephen Hemminger
@ 2014-07-23 18:09       ` Stephen Hemminger
  2014-07-24  3:11         ` Yerden Zhumabekov
  1 sibling, 1 reply; 6+ messages in thread
From: Stephen Hemminger @ 2014-07-23 18:09 UTC (permalink / raw)
  To: Yerden Zhumabekov; +Cc: dev-VfR2kkLFssw

On Wed, 23 Jul 2014 09:38:46 +0600
Yerden Zhumabekov <e_zhumabekov-8EHiFRVJVgQ@public.gmane.org> wrote:

> 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 <e_zhumabekov-8EHiFRVJVgQ@public.gmane.org>

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] igb_uio: fall back to enable/disable irq mode
  2014-07-23 18:09       ` Stephen Hemminger
@ 2014-07-24  3:11         ` Yerden Zhumabekov
       [not found]           ` <53D07968.8030105-8EHiFRVJVgQ@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Yerden Zhumabekov @ 2014-07-24  3:11 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dev-VfR2kkLFssw

24.07.2014 0:09, Stephen Hemminger пишет:
>> 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 <e_zhumabekov-8EHiFRVJVgQ@public.gmane.org>
> 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

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?

-- 
Sincerely,

Yerden Zhumabekov
STS, ACI
Astana, KZ

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] igb_uio: fall back to enable/disable irq mode
       [not found]           ` <53D07968.8030105-8EHiFRVJVgQ@public.gmane.org>
@ 2014-07-24 15:11             ` Stephen Hemminger
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen Hemminger @ 2014-07-24 15:11 UTC (permalink / raw)
  To: Yerden Zhumabekov; +Cc: dev-VfR2kkLFssw

On Thu, 24 Jul 2014 09:11:36 +0600
Yerden Zhumabekov <e_zhumabekov-8EHiFRVJVgQ@public.gmane.org> wrote:

> 24.07.2014 0:09, Stephen Hemminger пишет:
> >> 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 <e_zhumabekov-8EHiFRVJVgQ@public.gmane.org>
> > 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
> 
> 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?
> 

I think what would be the best fix is:

1. In igb_uio, if INTX test fails then setup with interrupts. This can be done 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 set 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)

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-07-24 15:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-23  3:38 [PATCH] igb_uio dropped support for some faulty NICs Yerden Zhumabekov
     [not found] ` <1406086726-54032-1-git-send-email-e_zhumabekov-8EHiFRVJVgQ@public.gmane.org>
2014-07-23  3:38   ` [PATCH] igb_uio: fall back to enable/disable irq mode Yerden Zhumabekov
     [not found]     ` <1406086726-54032-2-git-send-email-e_zhumabekov-8EHiFRVJVgQ@public.gmane.org>
2014-07-23 18:07       ` Stephen Hemminger
2014-07-23 18:09       ` Stephen Hemminger
2014-07-24  3:11         ` Yerden Zhumabekov
     [not found]           ` <53D07968.8030105-8EHiFRVJVgQ@public.gmane.org>
2014-07-24 15:11             ` Stephen Hemminger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.