Whamcloud - gitweb
LU-165: Support privileged ports in the o2iblnd driver.
[fs/lustre-release.git] / lnet / autoconf / ofed.m4
index 7b1c413..826dcac 100644 (file)
@@ -1,7 +1,7 @@
 dnl Checks for OFED
 AC_DEFUN([LN_CONFIG_OFED_SPEC],
-[AC_MSG_CHECKING([check ofed specifics])
-
+[
+       AC_MSG_CHECKING([if OFED has ib_dma_map_single])
        LB_LINUX_TRY_COMPILE([
                #include <linux/version.h>
                #include <linux/pci.h>
@@ -20,6 +20,7 @@ AC_DEFUN([LN_CONFIG_OFED_SPEC],
                AC_MSG_RESULT(no)
        ])
 
+       AC_MSG_CHECKING([if ib_create_cq wants comp_vector])
        LB_LINUX_TRY_COMPILE([
                #include <linux/version.h>
                #include <linux/pci.h>
@@ -38,6 +39,7 @@ AC_DEFUN([LN_CONFIG_OFED_SPEC],
                AC_MSG_RESULT(no)
        ])
 
+       AC_MSG_CHECKING([if OFED supports iWarp transport])
        LB_LINUX_TRY_COMPILE([
                #include <linux/version.h>
                #include <linux/pci.h>
@@ -56,6 +58,7 @@ AC_DEFUN([LN_CONFIG_OFED_SPEC],
                AC_MSG_RESULT(no)
        ])
 
+       AC_MSG_CHECKING([if OFED has RDMA_CM_EVENT_ADDR_CHANGE])
        LB_LINUX_TRY_COMPILE([
                #include <linux/version.h>
                #include <linux/pci.h>
@@ -73,6 +76,7 @@ AC_DEFUN([LN_CONFIG_OFED_SPEC],
                AC_MSG_RESULT(no)
        ])
 
+       AC_MSG_CHECKING([if OFED has RDMA_CM_EVENT_TIMEWAIT_EXIT])
        LB_LINUX_TRY_COMPILE([
                #include <linux/version.h>
                #include <linux/pci.h>
@@ -89,4 +93,23 @@ AC_DEFUN([LN_CONFIG_OFED_SPEC],
        ],[
                AC_MSG_RESULT(no)
        ])
+
+       AC_MSG_CHECKING([if OFED has rdma_set_reuseaddr])
+       LB_LINUX_TRY_COMPILE([
+               #include <linux/version.h>
+               #include <linux/pci.h>
+               #if !HAVE_GFP_T
+               typedef int gfp_t;
+               #endif
+               #include <rdma/rdma_cm.h>
+       ],[
+               rdma_set_reuseaddr(NULL, 1);
+               return 0;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_OFED_RDMA_SET_REUSEADDR, 1,
+                         [rdma_set_reuse defined])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
 ])