]> git.openfabrics.org - ~shefty/libibcm.git/commitdiff
r4466: Change libibverbs API for listing all known devices from
authorRoland Dreier <rolandd@cisco.com>
Wed, 14 Dec 2005 20:44:36 +0000 (20:44 +0000)
committerRoland Dreier <roland@topspin.com>
Wed, 14 Dec 2005 20:44:36 +0000 (20:44 +0000)
ibv_get_devices() to ibv_get_device_list(), and update all
in-tree uses of this API.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
configure.in
examples/cmpost.c

index aa80946b06a3fa6bf1a7ea141913f9e1761298dc..0dff705187c88da63c9e87c44090e2e13dc982a0 100644 (file)
@@ -25,8 +25,8 @@ AC_CHECK_SIZEOF(long)
 dnl Checks for libraries
 if test "$disable_libcheck" != "yes"
 then
-AC_CHECK_LIB(ibverbs, ibv_get_devices, [],
-    AC_MSG_ERROR([ibv_get_devices() not found.  libibcm requires libibverbs.]))
+AC_CHECK_LIB(ibverbs, ibv_get_device_list, [],
+    AC_MSG_ERROR([ibv_get_device_list() not found.  libibcm requires libibverbs.]))
 #AC_CHECK_LIB(rdmacm, rdma_create_id, [],
 #    AC_MSG_ERROR([rdma_create_id() not found.  ucmpost requires librdmacm.]))
 fi
index ce3a7baa55120b2011c8e1ad8fed7a21f2da03e7..5fa3f894544b1112e23ee8e0afc84a3ed9a527d9 100644 (file)
@@ -423,15 +423,14 @@ static void destroy_messages(void)
 
 static int init(void)
 {
-       struct dlist *dev_list;
+       struct ibv_device **dev_list;
        int ret;
 
        test.connects_left = connections;
        test.disconnects_left = connections;
 
-       dev_list = ibv_get_devices();
-       dlist_start(dev_list);
-       test.device = dlist_next(dev_list);
+       dev_list = ibv_get_device_list(NULL);
+       test.device = dev_list[0];
        if (!test.device)
                return -1;