libhns:Fix the identification mark of RDMA UD packet

driver inclusion
category: bugfix
bugzilla: https://gitee.com/src-openeuler/rdma-core/issues/IBOR88

----------------------------------------------------------------------

Fixes several bugs for hns:
libhns: Add the parsing of mac type in RoH mode

Signed-off-by: Dazhao Lao <laodazhao@huawei.com>
This commit is contained in:
Dazhao Lao 2025-02-25 15:28:50 +08:00
parent 43cb954f0a
commit 17d41b3385
2 changed files with 53 additions and 1 deletions

View File

@ -0,0 +1,45 @@
From 12c5c68053977fcd3ac872f080de6d5a2377f5e6 Mon Sep 17 00:00:00 2001
From: Dazhao Lao <laodazhao@huawei.com>
Date: Tue, 25 Feb 2025 14:51:07 +0800
Subject: [PATCH] libhns: Fix the identification mark of RDMA UD packets in ROH
mode.
Currently, DMAC[0]=0xFF is used as the special processing
identification mark of RDMA UD packets. After ROH_MAC
recognizes this mark, it goes to IP over HCCS and retains
the IP header information to meet the needs of MPI and RDMA
CM link establishment; but DMAC[0]=0xFF is a special
processing that will modify the DMAC to a multicast MAC
address. In MPI usage scenarios, there are a large number
of loopback messages, causing the multicast address to be
directly loopback processed by the SSU. The performance of
the SSU in processing multicast messages Lower than unicast
packets, there is a performance bottleneck.
The patch modifies the special identification mark of RMDA
UD messages in ROH mode, using DMAC[0]=0xF0 as the
identifier, so that DMAC is a unicast MAC address, thereby
avoiding the bottleneck of multicast message processing.
Fixes: 406d04f2ec27 ("libhns: Add the parsing of mac type in RoH mode")
Signed-off-by: Dazhao Lao <laodazhao@huawei.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 62bf478..1bbd788 100644
--- a/providers/hns/hns_roce_u_hw_v2.c
+++ b/providers/hns/hns_roce_u_hw_v2.c
@@ -1428,7 +1428,7 @@ static int set_ud_wqe(void *wqe, struct hns_roce_qp *qp, struct ibv_send_wr *wr,
return ret;
if (hr_dev->link_type == HNS_DEV_LINK_TYPE_HCCS)
- ud_sq_wqe->dmac[0] = 0xFF;
+ ud_sq_wqe->dmac[0] = 0xF0;
ret = fill_ud_data_seg(ud_sq_wqe, qp, wr, sge_info);
if (ret)
--
2.33.0

View File

@ -1,6 +1,6 @@
Name: rdma-core
Version: 41.0
Release: 29
Release: 30
Summary: RDMA core userspace libraries and daemons
License: GPLv2 or BSD
Url: https://github.com/linux-rdma/rdma-core
@ -96,6 +96,7 @@ patch87: 0087-libhns-Fix-out-of-order-issue-of-requester-when-sett.patch
patch88: 0088-libhns-Fix-reference-to-uninitialized-cq-pointer.patch
patch89: 0089-libhns-Fix-bypassed-vendor-check-in-hnsdv_query_devi.patch
patch90: 0090-libhns-Fix-coredump-during-QP-destruction-when-send_.patch
patch91: 0091-libhns-Fix-the-identification-mark-of-RDMA-UD-packet.patch
BuildRequires: binutils cmake >= 2.8.11 gcc libudev-devel pkgconfig pkgconfig(libnl-3.0)
BuildRequires: pkgconfig(libnl-route-3.0) valgrind-devel systemd systemd-devel
@ -343,6 +344,12 @@ fi
%{_mandir}/*
%changelog
* Thu Feb 25 2025 Dazhao Lao <laodazhao@huawei.com> - 41.0-30
- Type: bugfix
- ID: NA
- SUG: NA
- DESC: Fixed roh ud wqe dmac in libhns
* Thu Jan 2 2025 Xinghai Cen <cenxinghai@h-partners.com> - 41.0-29
- Type: bugfix
- ID: NA