diff --git a/use-e-para-to-make-transferred-meaning-take-effect.patch b/0000-use-e-para-to-make-transferred-meaning-take-effect.patch similarity index 100% rename from use-e-para-to-make-transferred-meaning-take-effect.patch rename to 0000-use-e-para-to-make-transferred-meaning-take-effect.patch diff --git a/0001-libhns-Bugfix-for-calculation-of-extended-sge.patch b/0001-libhns-Bugfix-for-calculation-of-extended-sge.patch new file mode 100644 index 0000000000000000000000000000000000000000..ae707dd7510039b3503412cb121097192587ea37 --- /dev/null +++ b/0001-libhns-Bugfix-for-calculation-of-extended-sge.patch @@ -0,0 +1,37 @@ +From d72ae701214aa8318604192ac48c31c920bba593 Mon Sep 17 00:00:00 2001 +From: Yangyang Li +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 +--- + 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 + diff --git a/rdma-core.spec b/rdma-core.spec index 3b79246084c1315772e5fec51af24c400e5aa493..89484aa3b852a22daebc07b2211f9a009aaedf3c 100644 --- a/rdma-core.spec +++ b/rdma-core.spec @@ -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 - 35.0-5 +- Type: bugfix +- ID: NA +- SUG: NA +- DESC: Fix calculation of extended sge in hns + +* Thu Feb 17 2022 tangchengchang - 35.0-4 +- Type: bugfix +- ID: NA +- SUG: NA +- DESC: Rename the previous patch to facilitate subsequent management + * Tue Dec 21 2021 pojunxing - 35.0-3 - Type: bugfix - ID: NA