Whamcloud - gitweb
LU-5710 all: second batch of corrected typos and grammar errors
[fs/lustre-release.git] / lnet / autoconf / ofed.m4
1 dnl Checks for OFED
2 AC_DEFUN([LN_CONFIG_OFED_SPEC], [
3         AC_MSG_NOTICE([OFED checks
4 ==============================================================================])
5
6         LB_CHECK_COMPILE([if OFED has 'ib_dma_map_single'],
7         ib_dma_map_single, [
8                 #include <linux/version.h>
9                 #include <linux/pci.h>
10                 #include <linux/gfp.h>
11                 #include <rdma/ib_verbs.h>
12         ],[
13                 ib_dma_map_single(NULL, NULL, 0, 0);
14                 return 0;
15         ],[
16                 AC_DEFINE(HAVE_OFED_IB_DMA_MAP, 1,
17                         [ib_dma_map_single defined])
18         ])
19
20         LB_CHECK_COMPILE([if OFED 'ib_create_cq' wants 'comp_vector'],
21         ib_create_cq_comp_vector, [
22                 #include <linux/version.h>
23                 #include <linux/pci.h>
24                 #include <linux/gfp.h>
25                 #include <rdma/ib_verbs.h>
26         ],[
27                 ib_create_cq(NULL, NULL, NULL, NULL, 0, 0);
28                 return 0;
29         ],[
30                 AC_DEFINE(HAVE_OFED_IB_COMP_VECTOR, 1,
31                         [has completion vector])
32         ])
33
34         LB_CHECK_COMPILE([if OFED has 'RDMA_CM_EVENT_ADDR_CHANGE'],
35         RDMA_CM_EVENT_ADDR_CHANGE, [
36                 #include <linux/version.h>
37                 #include <linux/pci.h>
38                 #include <linux/gfp.h>
39                 #ifdef HAVE_COMPAT_RDMA
40                 #include <linux/compat-2.6.h>
41                 #endif
42                 #include <rdma/rdma_cm.h>
43         ],[
44                 return (RDMA_CM_EVENT_ADDR_CHANGE == 0);
45         ],[
46                 AC_DEFINE(HAVE_OFED_RDMA_CMEV_ADDRCHANGE, 1,
47                         [has completion vector])
48         ])
49
50         LB_CHECK_COMPILE([if OFED has 'RDMA_CM_EVENT_TIMEWAIT_EXIT'],
51         RDMA_CM_EVENT_TIMEWAIT_EXIT, [
52                 #include <linux/version.h>
53                 #include <linux/pci.h>
54                 #include <linux/gfp.h>
55                 #ifdef HAVE_COMPAT_RDMA
56                 #include <linux/compat-2.6.h>
57                 #endif
58                 #include <rdma/rdma_cm.h>
59         ],[
60                 return (RDMA_CM_EVENT_TIMEWAIT_EXIT == 0);
61         ],[
62                 AC_DEFINE(HAVE_OFED_RDMA_CMEV_TIMEWAIT_EXIT, 1,
63                         [has completion vector])
64         ])
65
66         LB_CHECK_COMPILE([if OFED has 'rdma_set_reuseaddr'],
67         rdma_set_reuseaddr, [
68                 #include <linux/version.h>
69                 #include <linux/pci.h>
70                 #include <linux/gfp.h>
71                 #ifdef HAVE_COMPAT_RDMA
72                 #include <linux/compat-2.6.h>
73                 #endif
74                 #include <rdma/rdma_cm.h>
75         ],[
76                 rdma_set_reuseaddr(NULL, 1);
77                 return 0;
78         ],[
79                 AC_DEFINE(HAVE_OFED_RDMA_SET_REUSEADDR, 1,
80                         [rdma_set_reuse defined])
81         ])
82 ])