created by the RDMA CM. This lets a UD QP be used for datagram communication,
as well as multicast group communication over any number of groups.
Signed-off-by: Steve Wise <swise@opengridcomputer.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
node->ah = ibv_create_ah_from_wc(node->pd, wc, node->mem,
node->cma_id->port_num);
node->remote_qpn = ntohl(wc->imm_data);
- node->remote_qkey = ntohs(rdma_get_dst_port(node->cma_id));
+ node->remote_qkey = RDMA_UD_QKEY;
}
static int poll_cqs(void)
struct ibv_ah_attr *ah_attr, uint32_t *remote_qpn,
uint32_t *remote_qkey);
+/*
+ * Global qkey value for all UD QPs and multicast groups created via the
+ * RDMA CM.
+ */
+#define RDMA_UD_QKEY 0x01234567
+
#endif /* RDMA_CMA_IB_H */
qp_attr.port_num = id_priv->id.port_num;
qp_attr.qp_state = IBV_QPS_INIT;
- qp_attr.qkey = ntohs(rdma_get_src_port(&id_priv->id));
+ qp_attr.qkey = RDMA_UD_QKEY;
ret = ibv_modify_qp(qp, &qp_attr, IBV_QP_STATE | IBV_QP_PKEY_INDEX |
IBV_QP_PORT | IBV_QP_QKEY);
if (ret)