On Thu, 24 Aug 2006 09:18:50 -0700
"Sean Hefty" <[EMAIL PROTECTED]> wrote:
> Michael S. Tsirkin wrote:
> > Maybe the librdmacm part should be merged to svn?
> > So librdmacm could try to read from misc, then from
> > /sys/class/infiniband/rdma_cm, and then assume latest.
> > It's good to have userspace code portable across distros ...
>
> I can go with that.
>
> - Sean
>
Something like this?
Ira
Index: openib/src/userspace/librdmacm/src/cma.c
===================================================================
--- openib/src/userspace/librdmacm/src/cma.c (revision 213)
+++ openib/src/userspace/librdmacm/src/cma.c (revision 220)
@@ -141,9 +141,13 @@
{
char value[8];
- if (ibv_read_sysfs_file(ibv_get_sysfs_path(),
+ if ((ibv_read_sysfs_file(ibv_get_sysfs_path(),
"class/misc/rdma_cm/abi_version",
- value, sizeof value) < 0) {
+ value, sizeof value) < 0)
+ &&
+ (ibv_read_sysfs_file(ibv_get_sysfs_path(),
+ "class/infiniband_ucma/abi_version",
+ value, sizeof value) < 0)) {
/*
* Older version of Linux do not have class/misc. To support
* backports, assume the most recent version of the ABI. If
_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general
To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general