Skip to content

Commit 349e859

Browse files
Chengchang Tangrleon
authored andcommitted
RDMA/hns: Modify the print level of CQE error
Too much print may lead to a panic in kernel. Change ibdev_err() to ibdev_err_ratelimited(), and change the printing level of cqe dump to debug level. Fixes: 7c044ad ("RDMA/hns: Simplify the cqe code of poll cq") Signed-off-by: Chengchang Tang <tangchengchang@huawei.com> Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com> Link: https://lore.kernel.org/r/20240412091616.370789-11-huangjunxian6@hisilicon.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
1 parent 4125269 commit 349e859

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

drivers/infiniband/hw/hns/hns_roce_hw_v2.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3713,8 +3713,9 @@ static void get_cqe_status(struct hns_roce_dev *hr_dev, struct hns_roce_qp *qp,
37133713
wc->status == IB_WC_WR_FLUSH_ERR))
37143714
return;
37153715

3716-
ibdev_err(&hr_dev->ib_dev, "error cqe status 0x%x:\n", cqe_status);
3717-
print_hex_dump(KERN_ERR, "", DUMP_PREFIX_NONE, 16, 4, cqe,
3716+
ibdev_err_ratelimited(&hr_dev->ib_dev, "error cqe status 0x%x:\n",
3717+
cqe_status);
3718+
print_hex_dump(KERN_DEBUG, "", DUMP_PREFIX_NONE, 16, 4, cqe,
37183719
cq->cqe_size, false);
37193720
wc->vendor_err = hr_reg_read(cqe, CQE_SUB_STATUS);
37203721

0 commit comments

Comments
 (0)