[ofa-general] help on /sys/class structure and rdma
Roland Dreier
rdreier at cisco.com
Thu Jan 24 16:03:57 PST 2008
> I just found a bug in a drop I did for libcxgb3. I changed the code
> to read the adapter fw version sysfs file to attempt to check for
> incompatible fw/lib cases. I was reading this file in
> cxgb3_driver_init():
>
> /sys/class/infiniband_verbs/uverbs0/device/infiniband:cxgb3_0/fw_ver
I don't have any file like that in my system either. Not sure where
it might be coming from for you.
However, I do have /sys/class/infiniband_verbs/uverbs1/ibdev (which
should be present everywhere), and that has "cxgb3_0" in it, which you
could use to get to /sys/class/infiniband/cxgb3_0/<whatever>.
libibverbs does set up ibv_device.ibdev_path with that path, but it
happens too late for your library initialization function
unfortunately. So you can either wait until someone tries to create a
context and fail/warn then about firmware version, or you can
duplicate the libibverbs code to come up with that ibdev_path.
- R.
More information about the general
mailing list