]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
RDMA/hns: Add the workqueue framework for flush cqe handler
authorYixian Liu <liuyixian@huawei.com>
Thu, 6 Feb 2020 09:56:44 +0000 (17:56 +0800)
committerSeth Forshee <seth.forshee@canonical.com>
Tue, 7 Apr 2020 20:11:38 +0000 (15:11 -0500)
commit8365f30e7202d85322211ce3f7acaca5a14fd230
tree35a8c516988fb885d58ee6626f9aad2cbde57aa1
parent1d1ded806497be4f26e0582bc7a33b4b1d6dfa70
RDMA/hns: Add the workqueue framework for flush cqe handler

BugLink: https://launchpad.net/bugs/1864950
HiP08 RoCE hardware lacks ability(a known hardware problem) to flush
outstanding WQEs if QP state gets into errored mode for some reason.  To
overcome this hardware problem and as a workaround, when QP is detected to
be in errored state during various legs like post send, post receive etc
[1], flush needs to be performed from the driver.

The earlier patch[1] sent to solve the hardware limitation explained in
the cover-letter had a bug in the software flushing leg. It acquired mutex
while modifying QP state to errored state and while conveying it to the
hardware using the mailbox. This caused leg to sleep while holding
spin-lock and caused crash.

Suggested Solution:
we have proposed to defer the flushing of the QP in the Errored state
using the workqueue to get around with the limitation of our hardware.

This patch adds the framework of the workqueue and the flush handler
function.

[1] https://patchwork.kernel.org/patch/10534271/

Link: https://lore.kernel.org/r/1580983005-13899-2-git-send-email-liuyixian@huawei.com
Signed-off-by: Yixian Liu <liuyixian@huawei.com>
Reviewed-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
(cherry picked from commit ffd541d45726341c1830ff595fd7352b6d1cfbcd)
Signed-off-by: Ike Panhc <ike.pan@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/infiniband/hw/hns/hns_roce_device.h
drivers/infiniband/hw/hns/hns_roce_hw_v2.c
drivers/infiniband/hw/hns/hns_roce_qp.c