代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/rdma-core 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 14e8bd8f4e30abdaabbe7ffc3a19e4381b4130fe Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Wed, 24 May 2023 10:34:07 +0800
Subject: [PATCH 1/2] libhns: Remove unnecessary QP checks
mainline inclusion
from mainline-v47.0
commit 4ea9a4f77ac8c174d1ae4cf551a2e5abea13516f
category: cleanup
bugzilla: https://gitee.com/src-openeuler/rdma-core/issues/I7NT3M
CVE: NA
Reference: https://github.com/linux-rdma/rdma-core/commit/4ea9a4f77ac8c174d1ae4cf551a2e5abea13516f
----------------------------------------------------------------------
It is not necessary to check the type of the queue on post_send and
post_recv since the QP type that cannot be supported will be rejected
when it is created.
Check for srq in post_recv has also been removed, because the RQ of
QP bound to srq is empty and will return immediate error in post_recv.
Besides, remove the unused parameter ctx.
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
Signed-off-by: Juan Zhou <zhoujuan51@h-partners.com>
---
providers/hns/hns_roce_u_hw_v2.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/providers/hns/hns_roce_u_hw_v2.c b/providers/hns/hns_roce_u_hw_v2.c
index ee2fffe..688eff8 100644
--- a/providers/hns/hns_roce_u_hw_v2.c
+++ b/providers/hns/hns_roce_u_hw_v2.c
@@ -908,11 +908,6 @@ static int check_qp_send(struct hns_roce_qp *qp, struct hns_roce_context *ctx)
struct ibv_qp *ibvqp = &qp->verbs_qp.qp;
int ret = 0;
- if (unlikely(ibvqp->qp_type != IBV_QPT_RC &&
- ibvqp->qp_type != IBV_QPT_UD) &&
- ibvqp->qp_type != IBV_QPT_XRC_SEND)
- return -EINVAL;
-
if (unlikely(ibvqp->state == IBV_QPS_RESET ||
ibvqp->state == IBV_QPS_INIT ||
ibvqp->state == IBV_QPS_RTR))
@@ -1516,11 +1511,7 @@ static int check_qp_recv(struct hns_roce_qp *qp, struct hns_roce_context *ctx)
struct ibv_qp *ibvqp = &qp->verbs_qp.qp;
int ret = 0;
- if (unlikely(ibvqp->qp_type != IBV_QPT_RC &&
- ibvqp->qp_type != IBV_QPT_UD))
- return -EINVAL;
-
- if (ibvqp->state == IBV_QPS_RESET || ibvqp->srq)
+ if (ibvqp->state == IBV_QPS_RESET)
return -EINVAL;
if (check_dca_attach_enable(qp)) {
--
2.25.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。