diff --git a/0071-libhns-Fix-wrong-WQE-data-when-QP-wraps-around.patch b/0071-libhns-Fix-wrong-WQE-data-when-QP-wraps-around.patch new file mode 100644 index 0000000000000000000000000000000000000000..d53e119f62381ddc4199974639bae89938acec6e --- /dev/null +++ b/0071-libhns-Fix-wrong-WQE-data-when-QP-wraps-around.patch @@ -0,0 +1,42 @@ +From c8f337432180e66c23edee9e783c76497eddf014 Mon Sep 17 00:00:00 2001 +From: Junxian Huang +Date: Fri, 17 Oct 2025 15:23:57 +0800 +Subject: [openEuler-24.03-LTS-SP3] libhns: Fix wrong WQE data when QP wraps + around + +driver inclusion +category: bugfix +bugzilla: https://gitee.com/openeuler/kernel/issues/ID3NL0 + +---------------------------------------------------------------------- + +DirectWQE fields are not assigned or cleared explicitly when +DirectWQE not used. When QP wraps around, data in these fields +from the previous use at the same position still remains and +are issued to HW by mistake. Clear these fields before issuing +doorbell to HW. + +Fixes: 159933c37450 ("libhns: Add support for direct wqe") +Signed-off-by: Junxian Huang +Signed-off-by: Donghua Huang +--- + providers/hns/hns_roce_u_hw_v2.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/providers/hns/hns_roce_u_hw_v2.c b/providers/hns/hns_roce_u_hw_v2.c +index daef17a..9175693 100644 +--- a/providers/hns/hns_roce_u_hw_v2.c ++++ b/providers/hns/hns_roce_u_hw_v2.c +@@ -1292,6 +1292,9 @@ int hns_roce_u_v2_post_send(struct ibv_qp *ibvqp, struct ibv_send_wr *wr, + wqe = get_send_wqe(qp, wqe_idx); + qp->sq.wrid[wqe_idx] = wr->wr_id; + ++ /* RC and UD share the same DirectWQE field layout */ ++ ((struct hns_roce_rc_sq_wqe *)wqe)->byte_4 = 0; ++ + switch (ibvqp->qp_type) { + case IBV_QPT_XRC_SEND: + hr_reg_write(wqe, RCWQE_XRC_SRQN, +-- +2.33.0 + diff --git a/rdma-core.spec b/rdma-core.spec index 3ba47df2baa36b4773e05e2d4f727b63420906d7..f11d4ede9a4ea7acb6a1a5236e690b53f815fa87 100644 --- a/rdma-core.spec +++ b/rdma-core.spec @@ -1,6 +1,6 @@ Name: rdma-core Version: 50.0 -Release: 34 +Release: 35 Summary: RDMA core userspace libraries and daemons License: GPL-2.0-only OR BSD-2-Clause AND BSD-3-Clause Url: https://github.com/linux-rdma/rdma-core @@ -76,6 +76,7 @@ patch67: 0067-libhns-Adapt-UD-inline-data-size-for-UCX.patch patch68: 0068-libhns-Clean-up-DCA-magic-number-warnings.patch patch69: 0069-libhns-Clean-up-space-tab-blank-line-warnings.patch patch70: 0070-rdma-core-uos-support-sw.patch +patch71: 0071-libhns-Fix-wrong-WQE-data-when-QP-wraps-around.patch BuildRequires: binutils cmake >= 2.8.11 gcc libudev-devel pkgconfig pkgconfig(libnl-3.0) BuildRequires: pkgconfig(libnl-route-3.0) systemd systemd-devel @@ -657,6 +658,12 @@ fi %doc %{_docdir}/%{name}-%{version}/70-persistent-ipoib.rules %changelog +* Mon Oct 27 2025 Donghua Huang - 50.0-35 +- Type: bugfix +- ID: NA +- SUG: NA +- DESC: libhns: Fix wrong WQE data when QP wraps around + * Wed Oct 15 2025 zhangfeilong - 50.0-34 - Type: feature - ID: NA