Build fix for ipoib when CONFIG_INFINIBAND_IPOIB_CM is defined.
Sponsored by: Mellanox Technologies
This commit is contained in:
parent
95ef56abc2
commit
68732efcd9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/projects/bsd_rdma_4_9/; revision=326148
@ -287,7 +287,7 @@ static void ipoib_cm_init_rx_wr(struct ipoib_dev_priv *priv,
|
||||
int i;
|
||||
|
||||
for (i = 0; i < IPOIB_CM_RX_SG; i++)
|
||||
sge[i].lkey = priv->mr->lkey;
|
||||
sge[i].lkey = priv->pd->local_dma_lkey;
|
||||
|
||||
wr->next = NULL;
|
||||
wr->sg_list = sge;
|
||||
@ -601,11 +601,11 @@ static inline int post_send(struct ipoib_dev_priv *priv,
|
||||
priv->tx_sge[i].addr = mapping[i];
|
||||
priv->tx_sge[i].length = m->m_len;
|
||||
}
|
||||
priv->tx_wr.num_sge = i;
|
||||
priv->tx_wr.wr_id = wr_id | IPOIB_OP_CM;
|
||||
priv->tx_wr.opcode = IB_WR_SEND;
|
||||
priv->tx_wr.wr.num_sge = i;
|
||||
priv->tx_wr.wr.wr_id = wr_id | IPOIB_OP_CM;
|
||||
priv->tx_wr.wr.opcode = IB_WR_SEND;
|
||||
|
||||
return ib_post_send(tx->qp, &priv->tx_wr, &bad_wr);
|
||||
return ib_post_send(tx->qp, &priv->tx_wr.wr, &bad_wr);
|
||||
}
|
||||
|
||||
void ipoib_cm_send(struct ipoib_dev_priv *priv, struct mbuf *mb, struct ipoib_cm_tx *tx)
|
||||
@ -736,8 +736,7 @@ int ipoib_cm_dev_open(struct ipoib_dev_priv *priv)
|
||||
goto err_cm;
|
||||
}
|
||||
|
||||
ret = ib_cm_listen(priv->cm.id, cpu_to_be64(IPOIB_CM_IETF_ID | priv->qp->qp_num),
|
||||
0, NULL);
|
||||
ret = ib_cm_listen(priv->cm.id, cpu_to_be64(IPOIB_CM_IETF_ID | priv->qp->qp_num), 0);
|
||||
if (ret) {
|
||||
printk(KERN_WARNING "%s: failed to listen on ID 0x%llx\n", priv->ca->name,
|
||||
IPOIB_CM_IETF_ID | priv->qp->qp_num);
|
||||
@ -1367,8 +1366,8 @@ static void ipoib_cm_create_srq(struct ipoib_dev_priv *priv, int max_sge)
|
||||
int ipoib_cm_dev_init(struct ipoib_dev_priv *priv)
|
||||
{
|
||||
struct ifnet *dev = priv->dev;
|
||||
int i, ret;
|
||||
struct ib_device_attr attr;
|
||||
int i;
|
||||
int max_srq_sge;
|
||||
|
||||
INIT_LIST_HEAD(&priv->cm.passive_ids);
|
||||
INIT_LIST_HEAD(&priv->cm.reap_list);
|
||||
@ -1387,19 +1386,15 @@ int ipoib_cm_dev_init(struct ipoib_dev_priv *priv)
|
||||
mtx_init(&priv->cm.mb_queue.ifq_mtx,
|
||||
dev->if_xname, "if send queue", MTX_DEF);
|
||||
|
||||
ret = ib_query_device(priv->ca, &attr);
|
||||
if (ret) {
|
||||
printk(KERN_WARNING "ib_query_device() failed with %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
max_srq_sge = priv->ca->attrs.max_srq_sge;
|
||||
|
||||
ipoib_dbg(priv, "max_srq_sge=%d\n", attr.max_srq_sge);
|
||||
ipoib_dbg(priv, "max_srq_sge=%d\n", max_srq_sge);
|
||||
|
||||
attr.max_srq_sge = min_t(int, IPOIB_CM_RX_SG, attr.max_srq_sge);
|
||||
ipoib_cm_create_srq(priv, attr.max_srq_sge);
|
||||
max_srq_sge = min_t(int, IPOIB_CM_RX_SG, max_srq_sge);
|
||||
ipoib_cm_create_srq(priv, max_srq_sge);
|
||||
if (ipoib_cm_has_srq(priv)) {
|
||||
priv->cm.max_cm_mtu = attr.max_srq_sge * MJUMPAGESIZE;
|
||||
priv->cm.num_frags = attr.max_srq_sge;
|
||||
priv->cm.max_cm_mtu = max_srq_sge * MJUMPAGESIZE;
|
||||
priv->cm.num_frags = max_srq_sge;
|
||||
ipoib_dbg(priv, "max_cm_mtu = 0x%x, num_frags=%d\n",
|
||||
priv->cm.max_cm_mtu, priv->cm.num_frags);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user