[openfabrics-ewg] [openib-general] librdmacm ABI issues with OFED 1.1

Ira Weiny weiny2 at llnl.gov
Thu Aug 24 09:57:54 PDT 2006


On Thu, 24 Aug 2006 09:18:50 -0700
"Sean Hefty" <mshefty at ichips.intel.com> 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





More information about the ewg mailing list