提交 40837273 编写于 作者: S Shiraz Saleem 提交者: Doug Ledford

i40iw: Do not allow posting WR after QP is flushed

A Work Request (WR) posted after QP is flushed will not
get a flush completion.

Correct this problem by not allowing posting of WRs
after a QP is flushed.

Fixes: d3749841 ("i40iw: add files for iwarp interface")
Signed-off-by: NShiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: NDoug Ledford <dledford@redhat.com>
上级 abae49e4
......@@ -2202,6 +2202,12 @@ static int i40iw_post_send(struct ib_qp *ibqp,
ukqp = &iwqp->sc_qp.qp_uk;
spin_lock_irqsave(&iwqp->lock, flags);
if (iwqp->flush_issued) {
err = -EINVAL;
goto out;
}
while (ib_wr) {
inv_stag = false;
memset(&info, 0, sizeof(info));
......@@ -2344,6 +2350,7 @@ static int i40iw_post_send(struct ib_qp *ibqp,
ib_wr = ib_wr->next;
}
out:
if (err)
*bad_wr = ib_wr;
else
......@@ -2376,6 +2383,12 @@ static int i40iw_post_recv(struct ib_qp *ibqp,
memset(&post_recv, 0, sizeof(post_recv));
spin_lock_irqsave(&iwqp->lock, flags);
if (iwqp->flush_issued) {
err = -EINVAL;
goto out;
}
while (ib_wr) {
post_recv.num_sges = ib_wr->num_sge;
post_recv.wr_id = ib_wr->wr_id;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册