70 Commits

Author SHA1 Message Date
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
openeuler-ci-bot
aafe827d27
!64 Support congestion control algorithm configuration
From: @stinft 
Reviewed-by: @hellotcc 
Signed-off-by: @hellotcc
2023-04-17 02:04:07 +00:00
Zhou Juan
48ccef6ba0 Support congestion control algorithm configuration
Added the use of direct verbs to implement QP-level
user-configurable congestion control algorithms. Among them,
the user mode driver mainly provides interfaces for users to
choose, and the kernel mode driver is responsible for filling
the resources of different algorithms and providing the
supported algorithm types for user mode.

At the same time, provide a direct verbs interface for users to
query the type of congestion control algorithm.

Signed-off-by: Juan Zhou <zhoujuan51@h-partners.com>
2023-04-13 15:22:58 +08:00
openeuler-ci-bot
61432d3a10
!61 [sync] PR-59: Support reset for hns roce
From: @openeuler-sync-bot 
Reviewed-by: @li-yangyang20 
Signed-off-by: @li-yangyang20
2022-12-16 02:55:15 +00:00
Yixing Liu
62cc5a52dc Support libhns stop sending db mechanism after reset
Add an interface to the user space, which is used to receive
the kernel reset state. After receiving the reset flag, the
user space stops sending db.

Signed-off-by: Yixing Liu <liuyixing1@huawei.com>
(cherry picked from commit 8b56ab8b70262183cac5995dcb395ec099cc89a4)
2022-12-16 10:01:48 +08:00
openeuler-ci-bot
579ff1d0b2
!58 [sync] PR-56: 支持hns roce DCA模式
From: @openeuler-sync-bot 
Reviewed-by: @li-yangyang20 
Signed-off-by: @li-yangyang20
2022-12-01 01:23:43 +00:00
Chengchang Tang
b731de85ba Support hns roce DCA
DCA(Dynamic context attachment) support many RC QPs to share the WQE
buffer in a memory pool, this help reducing the memory consumption
when there are many QPs are inactive.

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
(cherry picked from commit b88a370b79cd9b93f9a587c1e4e0d9c89d0b1d1e)
2022-12-01 09:04:57 +08:00
openeuler-ci-bot
3593a3f998
!55 [sync] PR-53: [sync] PR-52: hns roce 支持TD无锁
From: @openeuler-sync-bot 
Reviewed-by: @li-yangyang20 
Signed-off-by: @li-yangyang20
2022-11-29 08:50:06 +00:00
Yixing Liu
3a7b51373c Add supoort libhns td unlock
This patch add libhns td unlock function.

Signed-off-by: Yixing Liu <liuyixing1@huawei.com>
(cherry picked from commit 1c38175fa12c69b790201fae078017a74fdb0a41)
(cherry picked from commit 72a6679aea8e4e5c8d1864bb0caa5edafb6ad1ea)
2022-11-29 16:03:31 +08:00
openeuler-ci-bot
708a2aea05
!54 [sync] PR-51: [sync] PR-50: hns roce支持ROH
From: @openeuler-sync-bot 
Reviewed-by: @li-yangyang20 
Signed-off-by: @li-yangyang20
2022-11-29 08:01:12 +00:00
Guofeng Yue
2fd3eea19c Support hns RoH mode
These patches support running the roce function in hns roh mode

Signed-off-by: Guofeng Yue <yueguofeng@hisilicon.com>
(cherry picked from commit 648d17f1efa1ca1c458618421ab01a0c4b8872af)
(cherry picked from commit 08d265affcb38d014d69436b5200692612baa394)
2022-11-29 15:44:50 +08:00
openeuler-ci-bot
8b8ad56bcc
!49 [sync] PR-48: 回合issue #I5Q3S5中提到的bugfix以及rdma-core 41.1中的patch
From: @openeuler-sync-bot 
Reviewed-by: @li-yangyang20 
Signed-off-by: @li-yangyang20
2022-11-07 06:49:34 +00:00
Chengchang Tang
0f64d55dba Backport patches from 41.1
Backport patches from rdma-core 41.1.

And bugfix patches reported by #I5Q3S5 has also been included.

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
(cherry picked from commit 6f27f67e51b251ea5185fa61a635ab9fdb64d467)
2022-11-07 14:32:09 +08:00
openeuler-ci-bot
d44fe8f0eb
!47 【22.03-next】Support hns roce DSCP and CQE inline
From: @hellotcc 
Reviewed-by: @li-yangyang20 
Signed-off-by: @li-yangyang20
2022-11-02 02:22:05 +00:00
Chengchang Tang
0025a5cf22 Add support for hns DSCP
Support DSCP for hns RoCE.

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
2022-11-01 21:03:57 +08:00
Luoyouming
9f33bcde0c Bugfix for sge num and support inline feature
Fix sge num bug, add compatibility for rq inline, support cqe inline

Signed-off-by: Luoyouming <luoyouming@huawei.com>
2022-10-31 17:10:02 +08:00
openeuler-ci-bot
5e0943666e
!43 Update to 41.0
From: @hellotcc 
Reviewed-by: @li-yangyang20 
Signed-off-by: @li-yangyang20
2022-09-27 09:04:23 +00:00
Chengchang Tang
3cf87668d0 Update to 41.0
Update rdma-core version from 35.1 to 41.0.

Version 41.0 is the latest version in community until
2022/7/27. It includes some new bugfixes and new features,
we choose this version to facilitate future development.

The patches added to this repo has already included in the
new version, so remove them.

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
2022-09-27 11:42:43 +08:00
openeuler-ci-bot
ea0b8c61a8
!42 libhns: Remove support for HIP06
From: @hellotcc 
Reviewed-by: @li-yangyang20 
Signed-off-by: @li-yangyang20
2022-09-09 09:31:58 +00:00
zhengfeng luo
425b445513 libhns: Remove support for HIP06
HIP06 is no longer supported. So, backport these patches from
rdma-core v41 to remove support for HIP06.

Signed-off-by: zhengfeng luo <luozhengfeng@h-partners.com>
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
2022-09-09 17:05:34 +08:00
openeuler-ci-bot
3b28e632a2
!41 Backport batch of patches for hns
From: @hellotcc 
Reviewed-by: @li-yangyang20 
Signed-off-by: @li-yangyang20
2022-08-30 01:56:15 +00:00