[rdma_create_id wants 4 args])
])
])
+#
+# 4.2 introduced struct ib_cq_init_attr
+#
+AS_IF([test $ENABLEO2IB != "no"], [
+ LB_CHECK_COMPILE([if 'struct ib_cq_init_attr' exist],
+ ib_cq_init_attr, [
+ #ifdef HAVE_COMPAT_RDMA
+ #include <linux/compat-2.6.h>
+ #endif
+ #include <rdma/ib_verbs.h>
+ ],[
+ struct ib_cq_init_attr cq_attr;
+
+ cq_attr.comp_vector = NULL;
+ ],[
+ AC_DEFINE(HAVE_IB_CQ_INIT_ATTR, 1,
+ [struct ib_cq_init_attr exist])
+ ])
+])
]) # LN_CONFIG_O2IB
#
kib_dev_t *dev;
struct ib_qp_init_attr *init_qp_attr;
struct kib_sched_info *sched;
+#ifdef HAVE_IB_CQ_INIT_ATTR
+ struct ib_cq_init_attr cq_attr = {};
+#endif
kib_conn_t *conn;
struct ib_cq *cq;
unsigned long flags;
kiblnd_map_rx_descs(conn);
+#ifdef HAVE_IB_CQ_INIT_ATTR
+ cq_attr.cqe = IBLND_CQ_ENTRIES(version);
+ cq_attr.comp_vector = kiblnd_get_completion_vector(conn, cpt);
+ cq = ib_create_cq(cmid->device,
+ kiblnd_cq_completion, kiblnd_cq_event, conn,
+ &cq_attr);
+#else
cq = ib_create_cq(cmid->device,
kiblnd_cq_completion, kiblnd_cq_event, conn,
IBLND_CQ_ENTRIES(version),
kiblnd_get_completion_vector(conn, cpt));
+#endif
if (IS_ERR(cq)) {
CERROR("Can't create CQ: %ld, cqe: %d\n",
PTR_ERR(cq), IBLND_CQ_ENTRIES(version));