[ofa-general] RE: new API for the rdma-cma

Jason Gunthorpe jgunthorpe at obsidianresearch.com
Wed Jan 16 09:56:03 PST 2008


On Wed, Jan 16, 2008 at 09:33:22AM -0600, Steve Wise wrote:

> Regardless, I don't see any way to know which if_index (or even if_name) 
> maps to which port on a multi-port rdma device.  The /sys/class/.../net:*
> entries show both port device if_names, but there is really no way
> to know

Well, I suppose no matter what you do, you have to start there :)
Isn't this information available through sysfs?

It looks pretty easy to find out which ipoib devices are on the same
PCI device through sysfs, but I don't immediately see a way to get the
port number it is bound too (this should probably be added..)

> which one is port 1 and which one is port 2. With interface renaming, it is 
> not necessarily true, for example, given an rnic with 2 ports setup as eth1 
> and eth2, that eth1 maps to port 1 of a device and eth2 maps to port 2.
> They could be renamed to anything. Does if_index remain constant?
> IE maybe

if_index is constant once the device is created until it is
destroyed. Renames do not affect if_index. I suppose it is possible
that with enough device creation/destruction if_index will wrap, and
then it won't have port1 < port2 anymore..

Jason



More information about the general mailing list