diff mbox series

[for-next,02/11] RDMA/hns: Submit bad wr when post send wr exception

Message ID 1538042511-43966-3-git-send-email-oulijun@huawei.com (mailing list archive)
State Superseded
Delegated to: Leon Romanovsky
Headers show
Series Some misc fixes for hns | expand

Commit Message

Lijun Ou Sept. 27, 2018, 10:01 a.m. UTC
When user issues a RDMA read and enables sq inline, it needs to
report a bad wr to user. This patch mainly fixes it.

Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
index 063e477..e18b8f2 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@ -133,6 +133,7 @@  static int set_rwqe_data_seg(struct ib_qp *ibqp, const struct ib_send_wr *wr,
 		}
 
 		if (wr->opcode == IB_WR_RDMA_READ) {
+			*bad_wr =  wr;
 			dev_err(hr_dev->dev, "Not support inline data!\n");
 			return -EINVAL;
 		}