Whamcloud - gitweb
Revert "b=20355 formalize support for pthreads"
[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                 #if !HAVE_GFP_T
9                 typedef int gfp_t;
10                 #endif
11                 #include <rdma/ib_verbs.h>
12         ],[
13                 ib_dma_map_single(NULL, NULL, 0, 0);
14                 return 0;
15         ],[
16                 AC_MSG_RESULT(yes)
17                 AC_DEFINE(HAVE_OFED_IB_DMA_MAP, 1,
18                           [ib_dma_map_single defined])
19         ],[
20                 AC_MSG_RESULT(no)
21         ])
22
23         AC_MSG_CHECKING([if ib_create_cq wants comp_vector])
24         LB_LINUX_TRY_COMPILE([
25                 #include <linux/version.h>
26                 #include <linux/pci.h>
27                 #if !HAVE_GFP_T
28                 typedef int gfp_t;
29                 #endif
30                 #include <rdma/ib_verbs.h>
31         ],[
32                 ib_create_cq(NULL, NULL, NULL, NULL, 0, 0);
33                 return 0;
34         ],[
35                 AC_MSG_RESULT(yes)
36                 AC_DEFINE(HAVE_OFED_IB_COMP_VECTOR, 1,
37                           [has completion vector])
38         ],[
39                 AC_MSG_RESULT(no)
40         ])
41
42         AC_MSG_CHECKING([if OFED supports iWarp transport])
43         LB_LINUX_TRY_COMPILE([
44                 #include <linux/version.h>
45                 #include <linux/pci.h>
46                 #if !HAVE_GFP_T
47                 typedef int gfp_t;
48                 #endif
49                 #include <rdma/ib_verbs.h>
50         ],[
51                 return RDMA_TRANSPORT_IWARP ==
52                        rdma_node_get_transport(RDMA_NODE_RNIC);
53         ],[
54                 AC_MSG_RESULT(yes)
55                 AC_DEFINE(HAVE_OFED_TRANSPORT_IWARP, 1,
56                           [has transport iWARP])
57         ],[
58                 AC_MSG_RESULT(no)
59         ])
60
61         AC_MSG_CHECKING([if OFED has RDMA_CM_EVENT_ADDR_CHANGE])
62         LB_LINUX_TRY_COMPILE([
63                 #include <linux/version.h>
64                 #include <linux/pci.h>
65                 #if !HAVE_GFP_T
66                 typedef int gfp_t;
67                 #endif
68                 #include <rdma/rdma_cm.h>
69         ],[
70                 return (RDMA_CM_EVENT_ADDR_CHANGE == 0);
71         ],[
72                 AC_MSG_RESULT(yes)
73                 AC_DEFINE(HAVE_OFED_RDMA_CMEV_ADDRCHANGE, 1,
74                           [has completion vector])
75         ],[
76                 AC_MSG_RESULT(no)
77         ])
78
79         AC_MSG_CHECKING([if OFED has RDMA_CM_EVENT_TIMEWAIT_EXIT])
80         LB_LINUX_TRY_COMPILE([
81                 #include <linux/version.h>
82                 #include <linux/pci.h>
83                 #if !HAVE_GFP_T
84                 typedef int gfp_t;
85                 #endif
86                 #include <rdma/rdma_cm.h>
87         ],[
88                 return (RDMA_CM_EVENT_TIMEWAIT_EXIT == 0);
89         ],[
90                 AC_MSG_RESULT(yes)
91                 AC_DEFINE(HAVE_OFED_RDMA_CMEV_TIMEWAIT_EXIT, 1,
92                           [has completion vector])
93         ],[
94                 AC_MSG_RESULT(no)
95         ])
96 ])