diff --git a/0035-Fix-the-stride-calculation-for-MSN-PSN-area.patch b/0035-Fix-the-stride-calculation-for-MSN-PSN-area.patch new file mode 100644 index 0000000000000000000000000000000000000000..bf0ee9f1455a315b625d5c8d1a332cd40e82f990 --- /dev/null +++ b/0035-Fix-the-stride-calculation-for-MSN-PSN-area.patch @@ -0,0 +1,31 @@ +From 05b65d96296f07baca079acef1a5bbb3c71fffb6 Mon Sep 17 00:00:00 2001 +From: Selvin Xavier +Date: Wed, 17 Jul 2024 10:34:23 +0800 +Subject: [PATCH] Fix the stride calculation for MSN/PSN area [ Upstream commit + 65197a4 ] Library expects ilog2 of psn_size while calculating the stride. + ilog32 returns log2(v) + 1 and the calculation fails since the psn size is a + power of 2 value. Fix by passing psn_size - 1. + +Fixes: 0a0e0d0 ("bnxt_re/lib: Adds MSN table capability for Gen P7 adapters") +Signed-off-by: Selvin Xavier +Signed-off-by: Nicolas Morey +--- + providers/bnxt_re/verbs.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/providers/bnxt_re/verbs.c b/providers/bnxt_re/verbs.c +index 55d5284..a74d32c 100644 +--- a/providers/bnxt_re/verbs.c ++++ b/providers/bnxt_re/verbs.c +@@ -1233,7 +1233,7 @@ static int bnxt_re_alloc_queues(struct bnxt_re_context *cntx, + /* psn_depth extra entries of size que->stride */ + psn_size = bnxt_re_get_psne_size(qp->cntx); + psn_depth = (nswr * psn_size) / que->stride; +- que->pad_stride_log2 = (uint32_t)ilog32(psn_size); ++ que->pad_stride_log2 = ilog32(psn_size - 1); + if ((nswr * psn_size) % que->stride) + psn_depth++; + que->depth += psn_depth; +-- +2.27.0 + diff --git a/rdma-core.spec b/rdma-core.spec index e3a7021c70994ee0fe862ab04b8201653a953775..8ee3dba75f14441ed2affe7494c7449e25742068 100644 --- a/rdma-core.spec +++ b/rdma-core.spec @@ -1,6 +1,6 @@ Name: rdma-core Version: 50.0 -Release: 11 +Release: 12 Summary: RDMA core userspace libraries and daemons License: GPLv2 or BSD Url: https://github.com/linux-rdma/rdma-core @@ -40,6 +40,7 @@ patch31: 0031-libhns-Fix-several-context-locks-issue.patch patch32: 0032-libhns-Clean-up-signed-unsigned-mix-with-relational-.patch patch33: 0033-libhns-Fix-missing-flag-when-creating-qp-by-hnsdv_cr.patch patch34: 0034-librdmacm-Fix-an-overflow-bug-in-qsort-comparison-function.patch +patch35: 0035-Fix-the-stride-calculation-for-MSN-PSN-area.patch BuildRequires: binutils cmake >= 2.8.11 gcc libudev-devel pkgconfig pkgconfig(libnl-3.0) BuildRequires: pkgconfig(libnl-route-3.0) systemd systemd-devel @@ -622,6 +623,12 @@ fi %doc %{_docdir}/%{name}-%{version}/70-persistent-ipoib.rules %changelog +* Wed Jul 17 2024 dfh - 50.0-12 +- Type: bugfix +- ID: NA +- SUG: NA +- DESC: Fix the stride calculation for MSN/PSN area + * Wed May 29 zhangyaqi - 50.0-11 - Type: bugfix - ID: NA