]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
RDMA/hns: Assign dest_qp when deregistering mr
authoroulijun <oulijun@huawei.com>
Wed, 3 Jan 2018 02:44:08 +0000 (10:44 +0800)
committerSeth Forshee <seth.forshee@canonical.com>
Fri, 16 Mar 2018 15:46:46 +0000 (10:46 -0500)
BugLink: http://bugs.launchpad.net/bugs/1756097
It needs to create eight reserve QPs for resolving
a bug of hip06. When deregistering mr, it will issue
a rdma write for every reserve QPs.

When modify qp from init to rtr, it needs to set
the value of dest_qp_num. Otherwise, it will lead
an error of freeing mr.

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
(cherry picked from commit 107013ce7b28c3d7395bc0299c0fe3ce12f15b6f)
Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/infiniband/hw/hns/hns_roce_hw_v1.c

index 73f187e784c7d536d93fa4a1a06ea390eac9cd2b..939355ede14ab732b0b1bdd3d3476525daa128f0 100644 (file)
@@ -775,7 +775,7 @@ static int hns_roce_v1_rsv_lp_qp(struct hns_roce_dev *hr_dev)
                        goto create_lp_qp_failed;
                }
 
-               ret = hr_dev->hw->modify_qp(&hr_qp->ibqp, &attr, attr_mask,
+               ret = hr_dev->hw->modify_qp(&hr_qp->ibqp, &attr, IB_QP_DEST_QPN,
                                            IB_QPS_INIT, IB_QPS_RTR);
                if (ret) {
                        dev_err(dev, "modify qp failed(%d)!\n", ret);