1 Star 0 Fork 52

peter863/rdma-core

forked from src-openEuler/rdma-core 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0037-libhns-Fix-out-of-order-issue-of-requester-when-sett.patch 2.00 KB
一键复制 编辑 原始数据 按行查看 历史
Xinghai Cen 提交于 2024-11-15 14:56 +08:00 . libhns: Two bugfixes in post_send flow
From f13f4391bb2c0b5a1c876f36b99242615bdae88b Mon Sep 17 00:00:00 2001
From: Junxian Huang <huangjunxian6@hisilicon.com>
Date: Fri, 8 Nov 2024 17:04:09 +0800
Subject: [PATCH] libhns: Fix out-of-order issue of requester when setting
FENCE
mainline inclusion
from mainline-master
commit c4119911c212aaa552c9cb928fba0a696640c9b5
category: bugfix
bugzilla: https://gitee.com/src-openeuler/rdma-core/issues/IB3ZHQ
CVE: NA
Reference: https://github.com/linux-rdma/rdma-core/pull/1513/commits/c4119911c212aaa552c9cb928fba0a696640c9b5
----------------------------------------------------------------------
The FENCE indicator in hns WQE doesn't ensure that response data from
a previous Read/Atomic operation has been written to the requester's
memory before the subsequent Send/Write operation is processed. This
may result in the subsequent Send/Write operation accessing the original
data in memory instead of the expected response data.
Unlike FENCE, the SO (Strong Order) indicator blocks the subsequent
operation until the previous response data is written to memory and a
bresp is returned. Set the SO indicator instead of FENCE to maintain
strict order.
Fixes: cbdf5e32a855 ("libhns: Reimplement verbs of post_send and post_recv for hip08 RoCE")
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
Signed-off-by: Xinghai Cen <cenxinghai@h-partners.com>
---
providers/hns/hns_roce_u_hw_v2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/providers/hns/hns_roce_u_hw_v2.c b/providers/hns/hns_roce_u_hw_v2.c
index 9371150..2debcb3 100644
--- a/providers/hns/hns_roce_u_hw_v2.c
+++ b/providers/hns/hns_roce_u_hw_v2.c
@@ -1527,7 +1527,7 @@ static int set_rc_wqe(void *wqe, struct hns_roce_qp *qp, struct ibv_send_wr *wr,
hr_reg_write_bool(wqe, RCWQE_CQE,
!!(wr->send_flags & IBV_SEND_SIGNALED));
- hr_reg_write_bool(wqe, RCWQE_FENCE,
+ hr_reg_write_bool(wqe, RCWQE_SO,
!!(wr->send_flags & IBV_SEND_FENCE));
hr_reg_write_bool(wqe, RCWQE_SE,
!!(wr->send_flags & IBV_SEND_SOLICITED));
--
2.25.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/peter863/rdma-core.git
git@gitee.com:peter863/rdma-core.git
peter863
rdma-core
rdma-core
master

搜索帮助