RDMA/hns: Use the reserved loopback QPs to free MR before destroying MPT
authorYixing Liu <liuyixing1@huawei.com>
Thu, 10 Mar 2022 04:28:35 +0000 (12:28 +0800)
committerJason Gunthorpe <jgg@nvidia.com>
Tue, 15 Mar 2022 23:19:00 +0000 (20:19 -0300)
commit70f92521584f1d1e8268311ee84413307b0fdea8
treeef4a4f389071941724da40035decef3293fc0315
parent51cad2872435f79c63b81503d8d1c9f143172489
RDMA/hns: Use the reserved loopback QPs to free MR before destroying MPT

Before destroying MPT, the reserved loopback QPs send loopback IOs (one
write operation per SL). Completing these loopback IOs represents that
there isn't any outstanding request in MPT, then it's safe to destroy MPT.

Link: https://lore.kernel.org/r/20220310042835.38634-1-liangwenpeng@huawei.com
Signed-off-by: Yixing Liu <liuyixing1@huawei.com>
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/hns/hns_roce_device.h
drivers/infiniband/hw/hns/hns_roce_hw_v2.c
drivers/infiniband/hw/hns/hns_roce_hw_v2.h
drivers/infiniband/hw/hns/hns_roce_mr.c