diff mbox series

[rdma-core,7/7] libhns: Return correct value of cqe num when flushing cqe failed

Message ID 1574299169-31457-8-git-send-email-liweihang@hisilicon.com (mailing list archive)
State Not Applicable
Headers show
Series libhns: Bugfix for hip08 | expand

Commit Message

Weihang Li Nov. 21, 2019, 1:19 a.m. UTC
From: Yangyang Li <liyangyang20@huawei.com>

When flushing cqe failed, it will return a error code to
hns_roce_v2_poll_one() and no longer update cqe number which is necessary
for ULPs, that will lead to a process suspension.
Because error code of flush cqe is meaningless for ULPs, so we delete it.

Fixes: 321ec6d04c0b ("libhns: Package for polling cqe function")
Signed-off-by: Yangyang Li <liyangyang20@huawei.com>
Signed-off-by: Weihang Li <liweihang@hisilicon.com>
---
 providers/hns/hns_roce_u_hw_v2.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/providers/hns/hns_roce_u_hw_v2.c b/providers/hns/hns_roce_u_hw_v2.c
index 64dea8e..a8d3d11 100644
--- a/providers/hns/hns_roce_u_hw_v2.c
+++ b/providers/hns/hns_roce_u_hw_v2.c
@@ -287,10 +287,9 @@  static int hns_roce_flush_cqe(struct hns_roce_qp **cur_qp, struct ibv_wc *wc)
 		attr.qp_state = IBV_QPS_ERR;
 		ret = hns_roce_u_v2_modify_qp(&(*cur_qp)->ibv_qp,
 						      &attr, attr_mask);
-		if (ret) {
+		if (ret)
 			fprintf(stderr, PFX "failed to modify qp!\n");
-			return ret;
-		}
+
 		(*cur_qp)->ibv_qp.state = IBV_QPS_ERR;
 	}