Whamcloud - gitweb
LU-6215 o2iblnd: rdma_create_id() takes extra parameter
[fs/lustre-release.git] / lnet / autoconf / lustre-lnet.m4
index 0e86a56..253d590 100644 (file)
@@ -401,6 +401,28 @@ AS_IF([test $ENABLEO2IB != "no"], [
                        [ib_alloc_fast_reg_mr is defined])
        ])
 ])
                        [ib_alloc_fast_reg_mr is defined])
        ])
 ])
+
+# 4.4 added network namespace parameter for rdma_create_id()
+AS_IF([test $ENABLEO2IB != "no"], [
+       LB_CHECK_COMPILE([if 'rdma_create_id' wants five args],
+       rdma_create_id_5args, [
+               #ifdef HAVE_COMPAT_RDMA
+               #undef PACKAGE_NAME
+               #undef PACKAGE_TARNAME
+               #undef PACKAGE_VERSION
+               #undef PACKAGE_STRING
+               #undef PACKAGE_BUGREPORT
+               #undef PACKAGE_URL
+               #include <linux/compat-2.6.h>
+               #endif
+               #include <rdma/rdma_cm.h>
+       ],[
+               rdma_create_id(NULL, NULL, NULL, 0, 0);
+       ],[
+               AC_DEFINE(HAVE_RDMA_CREATE_ID_5ARG, 1,
+                       [rdma_create_id wants 5 args])
+       ])
+])
 ]) # LN_CONFIG_O2IB
 
 #
 ]) # LN_CONFIG_O2IB
 
 #