Whamcloud - gitweb
LU-709 build: Remove last bit of HAVE_GFP_T
[fs/lustre-release.git] / lnet / autoconf / ofed.m4
index 7b1c413..ca31fec 100644 (file)
@@ -1,13 +1,11 @@
 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>
-               #if !HAVE_GFP_T
-               typedef int gfp_t;
-               #endif
+               #include <linux/gfp.h>
                #include <rdma/ib_verbs.h>
        ],[
                ib_dma_map_single(NULL, NULL, 0, 0);
@@ -20,12 +18,11 @@ 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>
-               #if !HAVE_GFP_T
-               typedef int gfp_t;
-               #endif
+               #include <linux/gfp.h>
                #include <rdma/ib_verbs.h>
        ],[
                ib_create_cq(NULL, NULL, NULL, NULL, 0, 0);
@@ -38,12 +35,11 @@ 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>
-               #if !HAVE_GFP_T
-               typedef int gfp_t;
-               #endif
+               #include <linux/gfp.h>
                #include <rdma/ib_verbs.h>
        ],[
                return RDMA_TRANSPORT_IWARP ==
@@ -56,12 +52,11 @@ 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>
-               #if !HAVE_GFP_T
-               typedef int gfp_t;
-               #endif
+               #include <linux/gfp.h>
                #include <rdma/rdma_cm.h>
        ],[
                return (RDMA_CM_EVENT_ADDR_CHANGE == 0);
@@ -73,12 +68,11 @@ 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>
-               #if !HAVE_GFP_T
-               typedef int gfp_t;
-               #endif
+               #include <linux/gfp.h>
                #include <rdma/rdma_cm.h>
        ],[
                return (RDMA_CM_EVENT_TIMEWAIT_EXIT == 0);
@@ -89,4 +83,21 @@ 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>
+               #include <linux/gfp.h>
+               #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)
+       ])
 ])