!32 [sync] PR-31: backport hns bugfix to openEuler/rdma-core 20.03
From: @openeuler-sync-bot Reviewed-by: @li-yangyang20 Signed-off-by: @li-yangyang20
This commit is contained in:
commit
d7e503ce1c
37
0001-libhns-Bugfix-for-calculation-of-extended-sge.patch
Normal file
37
0001-libhns-Bugfix-for-calculation-of-extended-sge.patch
Normal file
@ -0,0 +1,37 @@
|
||||
From d72ae701214aa8318604192ac48c31c920bba593 Mon Sep 17 00:00:00 2001
|
||||
From: Yangyang Li <liyangyang20@huawei.com>
|
||||
Date: Thu, 23 Dec 2021 14:52:13 +0800
|
||||
Subject: [PATCH] libhns: Bugfix for calculation of extended sge
|
||||
|
||||
Page alignment is required when setting the number of extended sge
|
||||
according to the hardware's achivement. If the space of needed extended sge
|
||||
is greater than one page, the roundup_pow_of_two() can ensure that. But if
|
||||
the needed extended sge isn't 0 and can not be filled in a whole page, the
|
||||
driver should align it specifically.
|
||||
|
||||
Signed-off-by: Guofeng Yue <yueguofeng@hisilicon.com>
|
||||
---
|
||||
providers/hns/hns_roce_u_verbs.c | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/providers/hns/hns_roce_u_verbs.c b/providers/hns/hns_roce_u_verbs.c
|
||||
index abff0921..30ab072a 100644
|
||||
--- a/providers/hns/hns_roce_u_verbs.c
|
||||
+++ b/providers/hns/hns_roce_u_verbs.c
|
||||
@@ -939,7 +939,12 @@ static void set_extend_sge_param(struct hns_roce_device *hr_dev,
|
||||
}
|
||||
|
||||
qp->ex_sge.sge_shift = HNS_ROCE_SGE_SHIFT;
|
||||
- qp->ex_sge.sge_cnt = cnt;
|
||||
+
|
||||
+ /* If the number of extended sge is not zero, they MUST use the
|
||||
+ * space of HNS_HW_PAGE_SIZE at least.
|
||||
+ */
|
||||
+ qp->ex_sge.sge_cnt = cnt ?
|
||||
+ max(cnt, HNS_HW_PAGE_SIZE / HNS_ROCE_SGE_SIZE) : 0;
|
||||
}
|
||||
|
||||
static void hns_roce_set_qp_params(struct ibv_qp_init_attr_ex *attr,
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
Name: rdma-core
|
||||
Version: 35.0
|
||||
Release: 3
|
||||
Release: 5
|
||||
Summary: RDMA core userspace libraries and daemons
|
||||
License: GPLv2 or BSD
|
||||
Url: https://github.com/linux-rdma/rdma-core
|
||||
@ -48,7 +48,8 @@ Obsoletes: openib-srptools <= 0.0.6
|
||||
|
||||
Conflicts: infiniband-diags <= 1.6.7
|
||||
|
||||
Patch001: use-e-para-to-make-transferred-meaning-take-effect.patch
|
||||
Patch0: 0000-use-e-para-to-make-transferred-meaning-take-effect.patch
|
||||
Patch1: 0001-libhns-Bugfix-for-calculation-of-extended-sge.patch
|
||||
|
||||
%{?systemd_requires}
|
||||
|
||||
@ -249,6 +250,18 @@ rm -f %{buildroot}/%{_sbindir}/srp_daemon.sh
|
||||
%{_mandir}/*
|
||||
|
||||
%changelog
|
||||
* Thu Feb 17 2022 tangchengchang <tangchengchang@huawei.com> - 35.0-5
|
||||
- Type: bugfix
|
||||
- ID: NA
|
||||
- SUG: NA
|
||||
- DESC: Fix calculation of extended sge in hns
|
||||
|
||||
* Thu Feb 17 2022 tangchengchang <tangchengchang@huawei.com> - 35.0-4
|
||||
- Type: bugfix
|
||||
- ID: NA
|
||||
- SUG: NA
|
||||
- DESC: Rename the previous patch to facilitate subsequent management
|
||||
|
||||
* Tue Dec 21 2021 pojunxing <chengyechun1@huawei.com> - 35.0-3
|
||||
- Type: bugfix
|
||||
- ID: NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user