2 AC_DEFUN([LN_CONFIG_OFED_SPEC],
4 AC_MSG_CHECKING([if OFED has ib_dma_map_single])
6 #include <linux/version.h>
9 #include <rdma/ib_verbs.h>
11 ib_dma_map_single(NULL, NULL, 0, 0);
15 AC_DEFINE(HAVE_OFED_IB_DMA_MAP, 1,
16 [ib_dma_map_single defined])
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>
28 ib_create_cq(NULL, NULL, NULL, NULL, 0, 0);
32 AC_DEFINE(HAVE_OFED_IB_COMP_VECTOR, 1,
33 [has completion vector])
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 #ifdef HAVE_COMPAT_RDMA
44 #include <linux/compat-2.6.h>
46 #include <rdma/rdma_cm.h>
48 return (RDMA_CM_EVENT_ADDR_CHANGE == 0);
51 AC_DEFINE(HAVE_OFED_RDMA_CMEV_ADDRCHANGE, 1,
52 [has completion vector])
57 AC_MSG_CHECKING([if OFED has RDMA_CM_EVENT_TIMEWAIT_EXIT])
58 LB_LINUX_TRY_COMPILE([
59 #include <linux/version.h>
60 #include <linux/pci.h>
61 #include <linux/gfp.h>
62 #ifdef HAVE_COMPAT_RDMA
63 #include <linux/compat-2.6.h>
65 #include <rdma/rdma_cm.h>
67 return (RDMA_CM_EVENT_TIMEWAIT_EXIT == 0);
70 AC_DEFINE(HAVE_OFED_RDMA_CMEV_TIMEWAIT_EXIT, 1,
71 [has completion vector])
76 AC_MSG_CHECKING([if OFED has rdma_set_reuseaddr])
77 LB_LINUX_TRY_COMPILE([
78 #include <linux/version.h>
79 #include <linux/pci.h>
80 #include <linux/gfp.h>
81 #ifdef HAVE_COMPAT_RDMA
82 #include <linux/compat-2.6.h>
84 #include <rdma/rdma_cm.h>
86 rdma_set_reuseaddr(NULL, 1);
90 AC_DEFINE(HAVE_OFED_RDMA_SET_REUSEADDR, 1,
91 [rdma_set_reuse defined])