90 Commits

Author SHA1 Message Date
openeuler-ci-bot
fb8d4c9fe7
!211 libxscale: Match dev by vid and did
From: @OGman 
Reviewed-by: @hginjgerx 
Signed-off-by: @hginjgerx
2025-03-21 02:41:00 +00:00
Xin Tian
1a03dbb669 libxscale: Match dev by vid and did
Match dev by vid and did.

Signed-off-by: Xin Tian <tianx@yunsilicon.com>
2025-03-20 17:18:47 +08:00
openeuler-ci-bot
5ded062e68
!209 libhns: Fixes some bugs for libhns
From: @cxh269 
Reviewed-by: @hginjgerx 
Signed-off-by: @hginjgerx
2025-03-12 04:03:02 +00:00
Xinghai Cen
7e0373e600 libhns: Fixes some bugs for libhns
Changes to be committed:
	new file:   0094-libhns-Fix-the-max_inline_data-value.patch
	new file:   0095-libhns-Adapt-UD-inline-data-size-for-UCX.patch
	new file:   0096-libhns-Fix-wrong-order-of-spin_unlock-in-modify_qp.patch
	modified:   rdma-core.spec

Signed-off-by: Xinghai Cen <cenxinghai@h-partners.com>
2025-03-12 11:33:50 +08:00
openeuler-ci-bot
aff214cd0e
!207 libxscale: Add Yunsilicon User Space RDMA Driver
From: @OGman 
Reviewed-by: @hellotcc 
Signed-off-by: @hellotcc
2025-03-05 02:50:12 +00:00
Xin Tian
9d52c25dc9 libxscale: Add Yunsilicon User Space RDMA Driver
Introduce xscale provider for Yunsilicon devices.

Signed-off-by: Xin Tian <tianx@yunsilicon.com>
2025-03-04 16:04:35 +08:00
openeuler-ci-bot
4819566bd8
!202 libhns: Fix missing fields for SRQ WC
From: @cxh269 
Reviewed-by: @hellotcc 
Signed-off-by: @hellotcc
2025-03-03 01:09:23 +00:00
Xinghai Cen
e75b91c451 libhns: Fix missing fields for SRQ WC
The sl and src_qpn fields in recv-WC are not filled when the QP is UD
and has an SRQ. Here fix it.

In addition, UD QP does not support RQ INLINE and CQE INLINE features.
Reorder the related if-else statements to reduce the number of
conditional checks in IO path.

Signed-off-by: Xinghai Cen <cenxinghai@h-partners.com>
2025-02-27 17:16:43 +08:00
openeuler-ci-bot
d7061a0eb4
!200 libhns:Fix the identification mark of RDMA UD packet
From: @laodazhao 
Reviewed-by: @hellotcc, @chenke1978 
Signed-off-by: @hellotcc
2025-02-26 01:39:55 +00:00
Dazhao Lao
17d41b3385 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>
2025-02-25 17:29:32 +08:00
openeuler-ci-bot
43cb954f0a
!186 libhns: Fixed two bugs in libhns
From: @cxh269 
Reviewed-by: @hellotcc 
Signed-off-by: @hellotcc
2025-01-06 02:00:44 +00:00
Xinghai Cen
8bb91c0b8c libhns: Fixed two bugs in libhns
Fixed two bugs in libhns:
libhns: Fix bypassed vendor check in hnsdv_query_device()
libhns: Fix coredump during QP destruction when send_cq: == recv_cq

Signed-off-by: Xinghai Cen <cenxinghai@h-partners.com>
2025-01-03 16:28:34 +08:00
openeuler-ci-bot
fe082215d4
!178 Two bugfixes in post_send flow
Merge pull request !178 from huwentao/openEuler-22.03-LTS-SP4
2024-11-21 12:13:46 +00:00
huwentao
af4ae71121 libhns: Two bugfixes in post_send flow
Two bugfixes in post_send flow:
libhns: Fix out-of-order issue of requester when setting FENCE
libhns: Fix reference to uninitialized cq pointer

Signed-off-by: huwentao <huwentao19@h-partners.com>
2024-11-21 11:22:13 +08:00
openeuler-ci-bot
f457b08db2
!163 Fixes several bugs for hns:
From: @cxh269 
Reviewed-by: @hellotcc 
Signed-off-by: @hellotcc
2024-08-22 13:19:01 +00:00
Xinghai Cen
f7e92a7c61 libhns:Fixes several bugs for hns
driver inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IALOAP

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

Fixes several bugs for hns:
libhns: Fix overwritten SL in DSCP mode
libhns: Support returning the final value of SL configuration
libhns: Fix memory leakage when DCA is enabled
libhns: Fix the exception branch of wr_start() is not locked

Signed-off-by: Xinghai Cen <cenxinghai@h-partners.com>
2024-08-22 19:57:29 +08:00
openeuler-ci-bot
d0cc33a033
!162 [sync] PR-161: ibnetdisc: Fix leak in add_to_portlid_hash
From: @openeuler-sync-bot 
Reviewed-by: @hellotcc 
Signed-off-by: @hellotcc
2024-08-13 13:38:18 +00:00
yanshuai01
a59b4486c0 ibnetdisc: Fix leak in add_to_portlid_hash
(cherry picked from commit 25b9222c5b28fcdd2f8d46f32732ca4eab1f5c46)
2024-08-09 16:28:01 +08:00
openeuler-ci-bot
8dd8d01040
!116 [sync] PR-114: Fix congest type flags error and replace a corrupt patch
From: @openeuler-sync-bot 
Reviewed-by: @hellotcc 
Signed-off-by: @hellotcc
2023-12-13 01:32:09 +00:00
Ran Zhou
3d6c469d72 Fix congest type flags error and replace a corrupt patch
Currently, there is a repeated judgement in check_qp_congest_type
whenever enable LDCP or HC3, the congest type flags all will be set
on LDCP.

This patch fixes this bug and replace a corrupt patch--0077, which
has a change that directly acts on patch but not code. This act
will disrupt the patch format.

Signed-off-by: Ran Zhou <zhouran10@h-partners.com>
(cherry picked from commit 4a7be9bb67fa9e61cc21625e448369783982e2b7)
2023-12-12 21:07:05 +08:00
openeuler-ci-bot
da46b98cb5
!111 Fix missing DB when compiler does not support SVE
From: @zzry 
Reviewed-by: @li-yangyang20 
Signed-off-by: @li-yangyang20
2023-12-08 09:22:13 +00:00
Ran Zhou
e5fcbc2552 Fix missing DB when compiler does not support SVE
Currently, if compiler does not support SVE, hns_roce_sve_write512() will
be a empty function, which means that this doorbell will be missed when
HNS_ROCE_QP_CAP_SVE_DIRECT_WQE is set in qp flag.

This patch ensures that driver will at least generate the DB regardless
of whether SVE DWQE is supported or not.

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com
Signed-off-by: Ran Zhou <zhouran10@h-partners.com>
2023-12-08 10:00:51 +08:00
openeuler-ci-bot
a3fb4e5760
!108 Bugfix for lock and owner bit
From: @zzry 
Reviewed-by: @hellotcc 
Signed-off-by: @hellotcc
2023-12-07 07:35:25 +00:00
Ran Zhou
794f3792a7 Bugfix for lock and owner bit
Correct the return of error code, add init of pthread spinlock and mutex
judgement, remove a repeated init of pthread lock init, fix owner bit
when SQ wrqps.

Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com>
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com
Signed-off-by: Ran Zhou <zhouran10@h-partners.com>
2023-12-07 11:09:09 +08:00
openeuler-ci-bot
a31fe2cdc1
!105 Bugfix for wrong timing of modifying ibv_qp state to err
From: @zzry 
Reviewed-by: @hellotcc 
Signed-off-by: @hellotcc
2023-12-01 10:34:53 +00:00
Ran Zhou
e221c2d5c6 Bugfix for wrong timing of modifying ibv_qp state to err
Currently the QPC state in HW is modified inside the critical section of
spinlock but the ibv_qp state is modified outside. There will be a short
period when QPC state has been modified to err with ibv_qp state still
remaining RTS. WQEs during this period will still be post-send by RTS-state
ibv_qp but then dropped by err-state HW with no flush CQEs generated.

To fix this problem, the QPC state in HW and ibv_qp state should be both
modified to err inside the critical section of spinlock.

Signed-off-by: Ran Zhou <zhouran10@h-partners.com>
Signed-off-by: Yangyang Li <liyangyang20@huawei.com>
2023-12-01 17:55:35 +08:00
openeuler-ci-bot
1fc2c147f3
!102 Corrects several minor issues found in review
From: @zzry 
Reviewed-by: @hellotcc 
Signed-off-by: @hellotcc
2023-11-28 02:50:18 +00:00
Ran Zhou
9185253876 Corrects several minor issues found in review
The issues mainly lies in the memory empty check, variable range
inconsistency, parameter verification, and print format.

Signed-off-by: Luoyouming <luoyouming@huawei.com>
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com
Signed-off-by: Ran Zhou <zhouran10@h-partners.com>
2023-11-27 17:17:32 +08:00
openeuler-ci-bot
d662cb8742
!99 libhns: Get dmac from kernel driver
From: @stinft 
Reviewed-by: @hellotcc 
Signed-off-by: @hellotcc
2023-11-23 03:54:37 +00:00
Ran Zhou
e6ea204613 Get dmac from kernel driver
As dmac is already resolved in kernel while creating AH, there is no
need to repeat the resolving in userspace. Prioritizes getting dmac
from kernel driver, unless kernel driver didn't response one.

Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
Signed-off-by: Ran Zhou <zhouran10@h-partners.com>
2023-11-22 16:47:02 +08:00
openeuler-ci-bot
837bcb8807
!84 RDMA/hns: Support STARS over RDMA
From: @zzry 
Reviewed-by: @hellotcc 
Signed-off-by: @hellotcc
2023-10-31 06:08:56 +00:00
Ran Zhou
6407ae1c79 STARS is a HW scheduler. These patches support hns RoCE working in STARS mode which means RoCE will be scheduled by STARS.
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com
Signed-off-by: Ran Zhou <zhouran10@h-partners.com>
2023-10-31 11:29:03 +08:00
openeuler-ci-bot
b9904fe7a2
!82 Add support for RDMA VF over UBL
From: @stinft 
Reviewed-by: @hellotcc 
Signed-off-by: @hellotcc
2023-10-26 12:23:10 +00:00
Juan Zhou
333b7848bd Skip resolving MAC for RDMA over UBLink
For RDMA over UBLink, MAC Layer if replaced by UBLink, and thus the
MAC addr is not nedded. So skip the MAC addr resolving for this mode.

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Haoyue Xu <xuhaoyue1@hisilicon.com>
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
Signed-off-by: Juan Zhou <zhoujuan51@h-partners.com>
2023-10-26 15:02:44 +08:00
openeuler-ci-bot
d0f9fddfde
!80 Support SRQ record doorbell
From: @stinft 
Reviewed-by: @hellotcc 
Signed-off-by: @hellotcc
2023-10-26 03:24:06 +00:00
Ran Zhou
23f6e3ca5e Support SRQ record doorbell
driver inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I8A08Z

Compared with normal doorbell, using record doorbell can shorten the
process of ringing the doorbell and reduce the latency.

Signed-off-by: Yangyang Li <liyangyang20@huawei.com>
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
Signed-off-by: Ran Zhou <zhouran10@h-partners.com>
2023-10-26 09:48:35 +08:00
openeuler-ci-bot
6d19d207ea
!78 RDMA/hns: Support flexible wqe buffer page size
From: @zzry 
Reviewed-by: @hellotcc 
Signed-off-by: @hellotcc
2023-10-24 11:07:49 +00:00
Ran Zhou
1a21f45d97 Support flexible WQE buffer page size
In order to improve performance, we allow user-mode drivers to use a
larger page size to allocate WQE buffers, thereby reducing the latency
introduced by HW page switching. User-mode drivers will be allowed to
allocate WQE buffers between 4K to system page size. During
ibv_create_qp(), the driver will dynamically select the appropriate page
size based on ibv_qp_cap, thus reducing memory consumption while improving
performance.

Signed-off-by: Ran Zhou <zhouran10@h-partners.com>
2023-10-24 15:05:34 +08:00
openeuler-ci-bot
5fffeb8765
!76 libhns: Support reporting wc as software mode
From: @stinft 
Reviewed-by: @hellotcc 
Signed-off-by: @hellotcc
2023-09-28 06:05:07 +00:00
Juan Zhou
e1b4791844 Support reporting wc as software mode
1.libhns: Support reporting wc as software mode
2.libhns: return error when post send in reset state
3.libhns: separate the initialization steps of lock
4.libhns: assign doorbell to zero when allocate it
5.libhns: Fix missing reset notification

Signed-off-by: Juan Zhou <zhoujuan51@h-partners.com>
2023-09-26 20:59:51 +08:00
openeuler-ci-bot
8ecd2efed9
!73 Two patchs are uploaded from rdma-core mainline
From: @stinft 
Reviewed-by: @hellotcc 
Signed-off-by: @hellotcc
2023-07-27 12:01:01 +00:00
Juan Zhou
3ab0271a03 Two patchs are uploaded from rdma-core mainline
1.Remove unnecessary QP checks
2.Fix reference to uninitialized cq pointer

Signed-off-by: Juan Zhou <zhoujuan51@h-partners.com>
2023-07-27 09:34:01 +08:00
openeuler-ci-bot
a782e69a16
!72 [sync] PR-71: Support user to choose using UD sl or pktype to adapt MPI APP
From: @openeuler-sync-bot 
Reviewed-by: @hellotcc 
Signed-off-by: @hellotcc
2023-06-09 09:53:46 +00:00
Zhou Juan
b9d5d250f3 Support user to choose using UD sl or pktype to adapt MPI APP
According to Annex17_RoCEv2 (A17.4.5.2), for RoCEv2 UD, a CQE should
carry a flag that indicates if the received frame is an IPv4, IPv6 or
RoCE packet. But currently, the values of the flag corresponding to
these packet types haven't been defined yet in WC.

In UCX, 'sl' in ibv_wc for UD is used as the packet type flag, and the
packet type values have already been defined in the UCX patch of
ed28845b88

Therefore, to adapt UCX, add a create flag to hnsdv_create_qp() to allow
users to choose whether they use 'sl' in ibv_wc as service level or
packet type for UD. For the latter, obtain and translate the packet type
from CQE and fill it to 'sl' in ibv_wc.

Singed-off-by: Juan Zhou <zhoujuan51@h-partners.com>
(cherry picked from commit e102d4c9aa2992c125b26ad5cc237ae002bc6541)
2023-06-09 13:53:56 +08:00
openeuler-ci-bot
e8d1a4d663
!70 [sync] PR-68: Backport bugfixes for hns
From: @openeuler-sync-bot 
Reviewed-by: @hellotcc 
Signed-off-by: @hellotcc
2023-06-02 10:38:23 +00:00
Zhou Juan
9004055930 Backport bugfix for hns
1.Fix the owner bit error of sq in new io
2.Fix incorrect post-send with direct wqe of
3.Add a judgment to the congestion control algorithm

Singed-off-by: Juan Zhou <zhoujuan51@h-partners.com>
(cherry picked from commit 092143ba858a7aba0630fadd416faa2a4e7eaf06)
2023-06-02 17:10:16 +08:00
openeuler-ci-bot
f79f381ab0
!66 1. Fix the sge num problem of atomic op; 2. Fix sge tail_len overflow; 3. Disable local invalidate operation
From: @stinft 
Reviewed-by: @hellotcc 
Signed-off-by: @hellotcc
2023-05-15 12:37:31 +00:00
Zhou Juan
43c14b7340 Fix the sge number related errors and remove local invalidate operation
1. The hns hardware logic requires wr->num_sge to be 1 when
performing atomic operations. The code does not judge this
condition, and the current patch adds this constraint.

2. In the sq inline scenario, when num_sge in post_send is not 1, sge
array appears in the for loop without rotation and directly copy
out of bounds.

3. Currently local invalidate operation don't work properly.
Disable it for the time being.
HIP08 and HIP09 hardware does not support this feature, so
delete the associated code.

Signed-off-by: Juan Zhou <zhoujuan51@h-partners.com>
2023-05-15 18:40:59 +08:00
openeuler-ci-bot
2e54531e06
!65 Add support for SVE Direct WQE for hns
From: @stinft 
Reviewed-by: @hellotcc 
Signed-off-by: @hellotcc
2023-04-19 11:24:36 +00:00
Zhou Juan
268e25f937 Add support for SVE Direct WQE
Some Kunpeng SoCs do not support the DWQE through NEON
instructions. In this case, the IO path works normally,
but the performance will deteriorate.

For these SoCs that do not support NEON DWQE, they support
DWQE through SVE instructions. This patch supports SVE DWQE
to guarantee the performance of these SoCs. In addition, in
this scenario, DWQE only supports acceleration through SVE's
ldr and str instructions. Other load and store instructions
also cause performance degradation.

Signed-off-by: Juan Zhou <zhoujuan51@h-partners.com>
2023-04-19 11:36:35 +08:00