]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
RDMA/hns: Fix an AEQE overflow error caused by untimely update of eq_db_ci
authorwenglianfa <wenglianfa@huawei.com>
Thu, 24 Oct 2024 12:39:56 +0000 (20:39 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Dec 2024 12:53:35 +0000 (13:53 +0100)
commit68278ab1279b4757919f02ca89da974b16cd5ed1
treec1734b8701fd44d4199c15682b7707532d20beca
parent96236b5a0913c4a41149c7734607da477e2d2030
RDMA/hns: Fix an AEQE overflow error caused by untimely update of eq_db_ci

[ Upstream commit 571e4ab8a45e530623ab129803f090a844dd3fe9 ]

eq_db_ci is updated only after all AEQEs are processed in the AEQ
interrupt handler, which is not timely enough and may result in
AEQ overflow. Two optimization methods are proposed:
1. Set an upper limit for AEQE processing.
2. Move time-consuming operations such as printings to the bottom
half of the interrupt.

cmd events and flush_cqe events are still fully processed in the top half
to ensure timely handling.

Fixes: a5073d6054f7 ("RDMA/hns: Add eq support of hip08")
Signed-off-by: wenglianfa <wenglianfa@huawei.com>
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
Link: https://patch.msgid.link/20241024124000.2931869-2-huangjunxian6@hisilicon.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
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_qp.c