struct kib_conn *conn = rx->rx_conn;
struct kib_net *net = conn->ibc_peer->ibp_ni->ni_data;
struct ib_recv_wr *bad_wrq = NULL;
-#ifdef HAVE_IB_GET_DMA_MR
+#ifdef HAVE_OFED_IB_GET_DMA_MR
struct ib_mr *mr = conn->ibc_hdev->ibh_mrs;
#endif
int rc;
LASSERT (credit == IBLND_POSTRX_NO_CREDIT ||
credit == IBLND_POSTRX_PEER_CREDIT ||
credit == IBLND_POSTRX_RSRVD_CREDIT);
-#ifdef HAVE_IB_GET_DMA_MR
+#ifdef HAVE_OFED_IB_GET_DMA_MR
LASSERT(mr != NULL);
rx->rx_sge.lkey = mr->lkey;
* own this rx (and rx::rx_conn) anymore, LU-5678.
*/
kiblnd_conn_addref(conn);
-#ifdef HAVE_IB_POST_SEND_RECV_CONST
+#ifdef HAVE_OFED_IB_POST_SEND_RECV_CONST
rc = ib_post_recv(conn->ibc_cmid->qp, &rx->rx_wrq,
(const struct ib_recv_wr **)&bad_wrq);
#else
return -EPROTONOSUPPORT;
}
-#ifdef HAVE_FMR_POOL_API
+#ifdef HAVE_OFED_FMR_POOL_API
/*
* FMR does not support gaps but the tx has gaps then
* we should make sure that the number of fragments we'll be sending
* the fragments in one FastReg or FMR fragment.
*/
if (
-#ifdef HAVE_FMR_POOL_API
+#ifdef HAVE_OFED_FMR_POOL_API
((dev->ibd_dev_caps & IBLND_DEV_CAPS_FMR_ENABLED)
&& !tx->tx_gaps) ||
#endif
IS_FAST_REG_DEV(dev)) {
/* FMR requires zero based address */
-#ifdef HAVE_FMR_POOL_API
+#ifdef HAVE_OFED_FMR_POOL_API
if (dev->ibd_dev_caps & IBLND_DEV_CAPS_FMR_ENABLED)
rd->rd_frags[0].rf_addr &= ~hdev->ibh_page_mask;
#endif
kiblnd_unmap_tx(struct kib_tx *tx)
{
if (
-#ifdef HAVE_FMR_POOL_API
+#ifdef HAVE_OFED_FMR_POOL_API
tx->tx_fmr.fmr_pfmr ||
#endif
tx->tx_fmr.fmr_frd)
}
}
-#ifdef HAVE_IB_GET_DMA_MR
+#ifdef HAVE_OFED_IB_GET_DMA_MR
static struct ib_mr *
kiblnd_find_rd_dma_mr(struct lnet_ni *ni, struct kib_rdma_desc *rd)
{
* dead in the water and fail the operation.
*/
if (tunables->lnd_map_on_demand && (IS_FAST_REG_DEV(net->ibn_dev)
-#ifdef HAVE_FMR_POOL_API
+#ifdef HAVE_OFED_FMR_POOL_API
|| net->ibn_dev->ibd_dev_caps & IBLND_DEV_CAPS_FMR_ENABLED
#endif
))
{
struct kib_net *net = ni->ni_data;
struct kib_hca_dev *hdev = net->ibn_dev->ibd_hdev;
-#ifdef HAVE_IB_GET_DMA_MR
+#ifdef HAVE_OFED_IB_GET_DMA_MR
struct ib_mr *mr = NULL;
#endif
__u32 nob;
nob += rd->rd_frags[i].rf_nob;
}
-#ifdef HAVE_IB_GET_DMA_MR
+#ifdef HAVE_OFED_IB_GET_DMA_MR
mr = kiblnd_find_rd_dma_mr(ni, rd);
if (mr != NULL) {
/* found pre-mapping MR */
if (lnet_send_error_simulation(tx->tx_lntmsg[0], &tx->tx_hstatus))
rc = -EINVAL;
else
-#ifdef HAVE_IB_POST_SEND_RECV_CONST
+#ifdef HAVE_OFED_IB_POST_SEND_RECV_CONST
rc = ib_post_send(conn->ibc_cmid->qp, wr,
(const struct ib_send_wr **)&bad);
#else
{
struct ib_sge *sge = &tx->tx_sge[tx->tx_nsge];
struct kib_hca_dev *hdev = tx->tx_pool->tpo_hdev;
-#ifdef HAVE_IB_GET_DMA_MR
+#ifdef HAVE_OFED_IB_GET_DMA_MR
struct ib_mr *mr = hdev->ibh_mrs;
#endif
*sge = (struct ib_sge) {
-#ifdef HAVE_IB_GET_DMA_MR
+#ifdef HAVE_OFED_IB_GET_DMA_MR
.lkey = mr->lkey,
#else
.lkey = hdev->ibh_pd->local_dma_lkey,
wrq->wr.opcode = IB_WR_RDMA_WRITE;
wrq->wr.send_flags = 0;
-#ifdef HAVE_IB_RDMA_WR
+#ifdef HAVE_OFED_IB_RDMA_WR
wrq->remote_addr = kiblnd_rd_frag_addr(dstrd,
dstidx);
wrq->rkey = kiblnd_rd_frag_key(dstrd,
{
int rc;
-#ifdef HAVE_RDMA_REJECT_4ARGS
+#ifdef HAVE_OFED_RDMA_REJECT_4ARGS
rc = rdma_reject(cmid, rej, sizeof(*rej), IB_CM_REJ_CONSUMER_DEFINED);
#else
rc = rdma_reject(cmid, rej, sizeof(*rej));