]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
RDMA/hns: Submit bad wr when post send wr exception
authorLijun Ou <oulijun@huawei.com>
Sun, 30 Sep 2018 09:00:29 +0000 (17:00 +0800)
committerKhalid Elmously <khalid.elmously@canonical.com>
Thu, 28 Nov 2019 04:59:27 +0000 (23:59 -0500)
BugLink: https://bugs.launchpad.net/bugs/1854216
[ Upstream commit c80e066100b5fed722c8da67c1bd2312e7bcf129 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/infiniband/hw/hns/hns_roce_hw_v2.c

index 9266a8283342134e031a4540940bffe6da9a841b..4aedf347940a979ba883d8adf839d12b63519134 100644 (file)
@@ -120,6 +120,7 @@ static int set_rwqe_data_seg(struct ib_qp *ibqp, 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;
                }