提交 4293fdc1 编写于 作者: F Frank Zago 提交者: Roland Dreier

RDMA/nes: In nes_post_recv() always set bad_wr on error

On error, set bad_wr in nes_post_recv().  Stop processing ib_wr queue
when an error is detected.
Signed-off-by: NFrank Zago <fzago@systemfabricworks.com>
Signed-off-by: NChien Tung <chien.tin.tung@intel.com>
Signed-off-by: NRoland Dreier <rolandd@cisco.com>
上级 e5dec394
......@@ -3554,8 +3554,10 @@ static int nes_post_recv(struct ib_qp *ibqp, struct ib_recv_wr *ib_wr,
u32 counter;
u32 total_payload_length;
if (nesqp->ibqp_state > IB_QPS_RTS)
return -EINVAL;
if (nesqp->ibqp_state > IB_QPS_RTS) {
err = -EINVAL;
goto out;
}
spin_lock_irqsave(&nesqp->lock, flags);
......@@ -3618,6 +3620,7 @@ static int nes_post_recv(struct ib_qp *ibqp, struct ib_recv_wr *ib_wr,
spin_unlock_irqrestore(&nesqp->lock, flags);
out:
if (err)
*bad_wr = ib_wr;
return err;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册