Whamcloud - gitweb
LU-1187 tests: add create remote directory to racer
[fs/lustre-release.git] / lnet / autoconf / ofed.m4
1 dnl Checks for OFED
2 AC_DEFUN([LN_CONFIG_OFED_SPEC],
3 [
4         AC_MSG_CHECKING([if OFED has ib_dma_map_single])
5         LB_LINUX_TRY_COMPILE([
6                 #include <linux/version.h>
7                 #include <linux/pci.h>
8                 #include <linux/gfp.h>
9                 #include <rdma/ib_verbs.h>
10         ],[
11                 ib_dma_map_single(NULL, NULL, 0, 0);
12                 return 0;
13         ],[
14                 AC_MSG_RESULT(yes)
15                 AC_DEFINE(HAVE_OFED_IB_DMA_MAP, 1,
16                           [ib_dma_map_single defined])
17         ],[
18                 AC_MSG_RESULT(no)
19         ])
20
21         AC_MSG_CHECKING([if ib_create_cq wants comp_vector])
22         LB_LINUX_TRY_COMPILE([
23                 #include <linux/version.h>
24                 #include <linux/pci.h>
25                 #include <linux/gfp.h>
26                 #include <rdma/ib_verbs.h>
27         ],[
28                 ib_create_cq(NULL, NULL, NULL, NULL, 0, 0);
29                 return 0;
30         ],[
31                 AC_MSG_RESULT(yes)
32                 AC_DEFINE(HAVE_OFED_IB_COMP_VECTOR, 1,
33                           [has completion vector])
34         ],[
35                 AC_MSG_RESULT(no)
36         ])
37
38         AC_MSG_CHECKING([if OFED has RDMA_CM_EVENT_ADDR_CHANGE])
39         LB_LINUX_TRY_COMPILE([
40                 #include <linux/version.h>
41                 #include <linux/pci.h>
42                 #include <linux/gfp.h>
43                 #include <rdma/rdma_cm.h>
44         ],[
45                 return (RDMA_CM_EVENT_ADDR_CHANGE == 0);
46         ],[
47                 AC_MSG_RESULT(yes)
48                 AC_DEFINE(HAVE_OFED_RDMA_CMEV_ADDRCHANGE, 1,
49                           [has completion vector])
50         ],[
51                 AC_MSG_RESULT(no)
52         ])
53
54         AC_MSG_CHECKING([if OFED has RDMA_CM_EVENT_TIMEWAIT_EXIT])
55         LB_LINUX_TRY_COMPILE([
56                 #include <linux/version.h>
57                 #include <linux/pci.h>
58                 #include <linux/gfp.h>
59                 #include <rdma/rdma_cm.h>
60         ],[
61                 return (RDMA_CM_EVENT_TIMEWAIT_EXIT == 0);
62         ],[
63                 AC_MSG_RESULT(yes)
64                 AC_DEFINE(HAVE_OFED_RDMA_CMEV_TIMEWAIT_EXIT, 1,
65                           [has completion vector])
66         ],[
67                 AC_MSG_RESULT(no)
68         ])
69
70         AC_MSG_CHECKING([if OFED has rdma_set_reuseaddr])
71         LB_LINUX_TRY_COMPILE([
72                 #include <linux/version.h>
73                 #include <linux/pci.h>
74                 #include <linux/gfp.h>
75                 #include <rdma/rdma_cm.h>
76         ],[
77                 rdma_set_reuseaddr(NULL, 1);
78                 return 0;
79         ],[
80                 AC_MSG_RESULT(yes)
81                 AC_DEFINE(HAVE_OFED_RDMA_SET_REUSEADDR, 1,
82                           [rdma_set_reuse defined])
83         ],[
84                 AC_MSG_RESULT(no)
85         ])
86 ])