[ofa-general] RE: [PATCH] core/mthca: Distinguish multiple IB cards in /proc/interrupts

Arputham Benjamin abenjamin at sgi.com
Wed May 27 18:41:28 PDT 2009


Roland Dreier wrote:
>  > Don't we need both /sys/devices/... and /proc/interrupts?
>
> Not sure what you mean.  If we put msi-x info under /sys, then you can
> figure out which interrupts belong to a given HCA by following the
> device link from /sys/class/infiniband.  Similarly if /proc/interrupts
> gives the PCI device, then you have the same ability.  So either way
> works as far as I can tell.
Linux is supposed to move away from procfs to sysfs for this type of device
related info. However, /proc/interrupts is still present in the latest
distro
releases (for example, SLES11) and OFED needs to provide support
for this in procfs until the /proc/interrupts support is removed from
kernel.

Also, OFED implementation needs to be consistent with other Ethernet
device drivers present in a system as OFED includes both Infiniband
and Ethernet functions( for example, ConnectX)

I wanted to summarize what we had discussed so far.

1) Enhance sysfs to include info. found in /proc/interrupts:

I have not seen full sysfs support for Ethernet devices .
I have seen IRQ number info but no interrupt counters on a per CPU basis.
Do we know when the full support for ethernet devices will be available
in sysfs? We can enhance OFED at the same time ethernet support is made
available in the kernel.

2) Use PCI ID in /proc/interrupts:
I have not seen Ethernet devices follow this convention.
Also, OFED tools currently use the device name convention mthcaX, mlx4_X
etc.
Therefore, this approach is not preferable for consistency reason.

As an alternative to #2,

3) We can add dev_alloc_name() functionality to mlx4_core similar to
alloc_name()
present in ib_core. This is consistent with other ethernet device driver
implementations
using the function dev_alloc_name() present in the kernel. (Please see
.../net/core/dev.c)

Any objection for going with #3?

Regards,
Benjamin




More information about the general mailing list