[openib-general] Re: opensm failure

Michael S. Tsirkin mst at mellanox.co.il
Tue Dec 28 11:00:00 PST 2004


Hello!
Quoting r. shaharf (shaharf at voltaire.com) "RE: [openib-general] Re: opensm failure":
> > > > > Oh. Is that a udev problem then?
> > > >
> > > > Yes. I Forgot to modify umad.c for the new udev scheme. I will do
> it
> > > > soon.
> > > >
> > > > Shahar
> > >
> > > Why cant I give the udev device path on a command line to opensm?
> > > that would solve this once and for all, and let the user play with
> > > udev names all he wants.
> > 
> > What I had in mind was something like:
> > 
> > ./opensm --dev /devinfiniband/umad0
> > 
> > to work on port 1 only
> > 
> > and
> > 
> > ./opensm --dev /dev/infiniband/umad*
> > 
> > to work on all ports of all devices.
> > 
> > /dev/infiniband/umad* could be a default (maybe set at configure time
> > or by varibale in makefile), but otherwise I really think *forcing* a
> > specific
> > udev scheme is a problem, since this makes udev scheme part of abi,
> > but not checkable by abiversion.
> > 
> > mst
> 
> You are correct about the udev scheme. I suggest that the ABI version
> will change on any modification (Roland?)

Cant be done. And the freedon to set rules is the whole idea of
udev.

> Specifying dev seems like a bad idea. You will have to find what port is
> active, reverse map it by scanning
> /sys/class/infiniband_mad/*/{ibdev,port) and then find the correct umad
> dev file and path its path to the opensm.

Its not that hard :)
Since opensm now just needs all devices, its could be as simple as
giving /dev/infiniband/umad* to opensm.

And, if it becomes more relevant to have opensm on separate ports
only, user shall be free to change the udev scheme to make port/device mapping
more explicit.

> I prefer letting the library doing that. That what I have done and
> commited. Please check again.
> 
> Shahar
> 

Works with this rule in udev.rules

KERNEL="umad*", NAME="infiniband/%k"

mst



More information about the general mailing list