Skip to contentSkip to conversation

igb_uio patches

PATCH Carew, Alan 4 participants 6 messages Jun 10, 2014 – Jun 11, 2014 7 messages not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

-----Original Message-----
From: Stephen Hemminger [mailto:[email protected]]
Sent: Friday, June 06, 2014 10:27 PM
To: Carew, Alan
Cc: [email protected]
Subject: [PATCH 00/10] igb_uio patches

These apply to the current DPDK tree, and are an alternative to the patches from Alan. It provides indication of IRQ mode via sysfs attribute. They include cleanups and fixes to allow use of MSI and do proper fallback for the case where MSI-X vectors are exhausted.

Hi Stephen,

Good catches and fixes in this set, would it be possible to refactor the "enum igbuio_intr_mode" to a common header files as with http://dpdk.org/ml/archives/dev/2014-June/003127.html
With that infrastructure in place, I could resubmit my set {2,3,4} to work cleanly with yours, maintaining the same interface across user/kernel, FreeBSD and fixing Virtio also.

Regards,
Alan

#3 lore raw
In reply to a message not in the archive
Quoted 5 lines

These apply to the current DPDK tree, and are an alternative to the patches from Alan. It provides indication of IRQ mode via sysfs attribute. They include cleanups and fixes to allow use of MSI and do proper fallback for the case where MSI-X vectors are exhausted.

Quoted 8 lines

Hi Stephen,

Good catches and fixes in this set, would it be possible to refactor the "enum igbuio_intr_mode" to a common header files as with
http://dpdk.org/ml/archives/dev/2014-June/003127.html
With that infrastructure in place, I could resubmit my set {2,3,4} to work cleanly with yours, maintaining the same interface across user/kernel, FreeBSD and fixing Virtio also.

...or better yet, with

http://dpdk.org/ml/archives/dev/2014-June/003221.html

:-)

Best regards,
Anatoly Burakov
DPDK SW Engineer

#7 lore raw
In reply to a message not in the archive

-----Original Message-----
From: Stephen Hemminger [mailto:[email protected]]
Sent: Tuesday, June 10, 2014 6:41 PM
To: Carew, Alan
Cc: [email protected]
Subject: Re: [PATCH 00/10] igb_uio patches

Quoted 1 line · Alan

Good catches and fixes in this set, would it be possible to refactor the "enum igbuio_intr_mode" to a common header files as with http://dpdk.org/ml/archives/dev/2014-June/003127.html

Actually, thought that was ugly. The userspace shouldn't have to see all these definitions.

Not a big fan of doing this and it would go against goal of making a version that could be merged upstream.

Stephen,

One alternative for us is then to take Neil Horman's idea of scanning /sys/bus/pci/devices/<D:B:D.F>/msi_irqs/
This gives us at least (MSI | MSI-X) | INT-X, however the Virtio specification mentions MSI-X explicitly for determining the correct offset and might not address the underlying problem my patch set was addressing, I have not tried Virtio with MSI.

A question then, how does uio_pci_generic handle interrupt modes in terms of userspace interface when determining the configured interrupt mode?

In the short term while we still work with igb_uio we may have to rely on SYSFS, but there is nothing stopping us from having device specific code paths that does not exclude us from ignoring igb_uio. The shared headers also gives us the benefit of having an internal interface(rte_pci_device: rte_intr_mode ) already in place when swapping out kernel drivers, Anatoly's VFIO implementation already uses such an interface.

Thanks,
Alan

#9 lore raw
In reply to a message not in the archive
Quoted 2 lines · Alan

One alternative for us is then to take Neil Horman's idea of scanning /sys/bus/pci/devices/<D:B:D.F>/msi_irqs/
This gives us at least (MSI | MSI-X) | INT-X, however the Virtio specification mentions MSI-X explicitly for determining the correct offset and might not address the underlying problem my patch set was addressing, I have not tried Virtio with MSI.

MSI doesn't work with virtio. pci_enable_msi() returns error. The device does not report MSI capability.

#12 lore raw
In reply to a message not in the archive
Quoted 1 line · Alan

A question then, how does uio_pci_generic handle interrupt modes in terms of userspace interface when determining the configured interrupt mode?

uio_pci_generic only handles INTX disable, and nothing else. It doesn't do MSI or allow IRQ control.

Also, it doesn't do iomap of resources, so theoretically if IOMMU is enabled userspace would still not be able to access the resources.

#11 lore raw
In reply to a message not in the archive
Quoted 9 lines · Stephen Hemminger
Quoted 2 lines · Alan

One alternative for us is then to take Neil Horman's idea of scanning /sys/bus/pci/devices/<D:B:D.F>/msi_irqs/
This gives us at least (MSI | MSI-X) | INT-X, however the Virtio specification mentions MSI-X explicitly for determining the correct offset and might not address the underlying problem my patch set was addressing, I have not tried Virtio with MSI.

MSI doesn't work with virtio. pci_enable_msi() returns error. The device does not report MSI capability.

/sys/bus/pci/devices/<device>/irq

also indicates which legacy irq is assigned to a given device

Neil