Re: [PATCH] IB/core: export struct ib_port

Roland Dreier
2009-11-12T00:04:10Z

> Maybe give some thought to using a syscall interface through uverbs
> for some of this?

Actually I think for exposing SL-to-VL and other things like that, sysfs
is pretty good. Having something usable from both scripts and programs
seems pretty useful, and having an opaque uverbs interface isn't really
an improvement (especially when we have to design something extensible
that device-specific stuff can be put into).

> IMHO, sysfs is getting out of hand for rdma:

I'm not sure how much of a problem this really is...

> $ find /sys/class/infiniband/mlx4_0 -type f | wc -l
> 660

and presumably 512 of those are gid and pkey table entries?

> $ strace -o /tmp/t /opt/ofa-1.5/sbin/perfquery ; grep sys/ /tmp/t | wc -l
> 289

That seems a little crazy, but maybe it's an app that's doing silly
stuff? If I do ibv_rc_pingpong, the only /sys related things I see are:

open("/sys/class/infiniband_verbs/abi_version", O_RDONLY) = 3
open("/sys/class/infiniband_verbs", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
stat("/sys/class/infiniband_verbs/abi_version", {st_mode=S_IFREG|0444, st_size=4096, ...}) = 0
stat("/sys/class/infiniband_verbs/uverbs0", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
open("/sys/class/infiniband_verbs/uverbs0/ibdev", O_RDONLY) = 4
open("/sys/class/infiniband_verbs/uverbs0/abi_version", O_RDONLY) = 4
open("/sys/class/infiniband_verbs/uverbs0/device/vendor", O_RDONLY) = 3
open("/sys/class/infiniband_verbs/uverbs0/device/device", O_RDONLY) = 3
open("/sys/class/infiniband/mlx4_0/node_type", O_RDONLY) = 3

which is reasonable I think.

- R.