Browse Source

RDMA/hns: Submit bad wr when post send wr exception

When user issues a RDMA read and enables sq inline, it needs to report a
bad wr to user.

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Lijun Ou 7 years ago
parent
commit
c80e066100
1 changed files with 1 additions and 0 deletions
  1. 1 0
      drivers/infiniband/hw/hns/hns_roce_hw_v2.c

+ 1 - 0
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;
 		}