Commit b4772b3a authored by Ursula Braun's avatar Ursula Braun Committed by David S. Miller

net/smc: terminate link group for ib_post_send problems

If ib_post_send() fails, terminate all connections of this
link group.
Signed-off-by: default avatarUrsula Braun <ubraun@linux.vnet.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5ac92a00
...@@ -248,8 +248,10 @@ static int smc_tx_rdma_write(struct smc_connection *conn, int peer_rmbe_offset, ...@@ -248,8 +248,10 @@ static int smc_tx_rdma_write(struct smc_connection *conn, int peer_rmbe_offset,
peer_rmbe_offset; peer_rmbe_offset;
rdma_wr.rkey = lgr->rtokens[conn->rtoken_idx][SMC_SINGLE_LINK].rkey; rdma_wr.rkey = lgr->rtokens[conn->rtoken_idx][SMC_SINGLE_LINK].rkey;
rc = ib_post_send(link->roce_qp, &rdma_wr.wr, &failed_wr); rc = ib_post_send(link->roce_qp, &rdma_wr.wr, &failed_wr);
if (rc) if (rc) {
conn->local_tx_ctrl.conn_state_flags.peer_conn_abort = 1; conn->local_tx_ctrl.conn_state_flags.peer_conn_abort = 1;
smc_lgr_terminate(lgr);
}
return rc; return rc;
} }
......
...@@ -248,8 +248,14 @@ int smc_wr_tx_send(struct smc_link *link, struct smc_wr_tx_pend_priv *priv) ...@@ -248,8 +248,14 @@ int smc_wr_tx_send(struct smc_link *link, struct smc_wr_tx_pend_priv *priv)
pend = container_of(priv, struct smc_wr_tx_pend, priv); pend = container_of(priv, struct smc_wr_tx_pend, priv);
rc = ib_post_send(link->roce_qp, &link->wr_tx_ibs[pend->idx], rc = ib_post_send(link->roce_qp, &link->wr_tx_ibs[pend->idx],
&failed_wr); &failed_wr);
if (rc) if (rc) {
struct smc_link_group *lgr =
container_of(link, struct smc_link_group,
lnk[SMC_SINGLE_LINK]);
smc_wr_tx_put_slot(link, priv); smc_wr_tx_put_slot(link, priv);
smc_lgr_terminate(lgr);
}
return rc; return rc;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment