From b2aaae393730766f9e3426ca50d259aa059f6bdb Mon Sep 17 00:00:00 2001 From: Renbo Date: Tue, 16 Jul 2024 14:17:19 +0800 Subject: [PATCH 1/5] update to rdma-core-48.0-1.src.rpm Signed-off-by: Renbo --- 1000-CMakeLists-enable-erdma-provider.patch | 29 -------------------- download | 2 +- rdma-core-44.0-sw.patch | 30 --------------------- rdma-core.spec | 27 ++++--------------- 4 files changed, 6 insertions(+), 82 deletions(-) delete mode 100644 1000-CMakeLists-enable-erdma-provider.patch delete mode 100644 rdma-core-44.0-sw.patch diff --git a/1000-CMakeLists-enable-erdma-provider.patch b/1000-CMakeLists-enable-erdma-provider.patch deleted file mode 100644 index e4c9c50..0000000 --- a/1000-CMakeLists-enable-erdma-provider.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 6d10c60de8bc0b3a26c4f4a179d87be5cbae9a8b Mon Sep 17 00:00:00 2001 -From: Cheng Xu -Date: Fri, 19 Apr 2024 10:59:11 +0800 -Subject: [PATCH] CMakeLists: enable erdma provider - -RHEL upstream disables erdma provider, which is unexpected. Enable -it first, and then fix upstream in future. - -Signed-off-by: Cheng Xu ---- - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index cfe79bcfa..87c0d0886 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -711,7 +711,7 @@ add_subdirectory(providers/bnxt_re) - add_subdirectory(providers/cxgb4) # NO SPARSE - add_subdirectory(providers/efa) - add_subdirectory(providers/efa/man) --#add_subdirectory(providers/erdma) -+add_subdirectory(providers/erdma) - add_subdirectory(providers/hns) - add_subdirectory(providers/irdma) - add_subdirectory(providers/mana) --- -2.31.1 - diff --git a/download b/download index eed957a..a91cc3f 100644 --- a/download +++ b/download @@ -1 +1 @@ -02982b5855986d8bc981de3d5dbeb8de rdma-core-46.0.tar.gz +f8901665b2fbf03b4ffb6bf7f6207ac4 rdma-core-48.0.tar.gz diff --git a/rdma-core-44.0-sw.patch b/rdma-core-44.0-sw.patch deleted file mode 100644 index c3cb24e..0000000 --- a/rdma-core-44.0-sw.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff -Naur rdma-core-44.0.org/util/udma_barrier.h rdma-core-44.0.sw/util/udma_barrier.h ---- rdma-core-44.0.org/util/udma_barrier.h 2022-12-29 17:28:40.000000000 +0800 -+++ rdma-core-44.0.sw/util/udma_barrier.h 2023-06-20 16:24:36.590075662 +0800 -@@ -92,6 +92,8 @@ - #define udma_to_device_barrier() asm volatile("mf" ::: "memory") - #elif defined(__sparc_v9__) - #define udma_to_device_barrier() asm volatile("membar #StoreStore" ::: "memory") -+#elif defined(__sw_64__) -+#define udma_to_device_barrier() asm volatile("memb" ::: "memory"); - #elif defined(__aarch64__) - #define udma_to_device_barrier() asm volatile("dsb st" ::: "memory"); - #elif defined(__sparc__) || defined(__s390x__) -@@ -130,6 +132,8 @@ - #define udma_from_device_barrier() asm volatile("mf" ::: "memory") - #elif defined(__sparc_v9__) - #define udma_from_device_barrier() asm volatile("membar #LoadLoad" ::: "memory") -+#elif defined(__sw_64__) -+#define udma_from_device_barrier() asm volatile("memb" ::: "memory"); - #elif defined(__aarch64__) - #define udma_from_device_barrier() asm volatile("dsb ld" ::: "memory"); - #elif defined(__sparc__) || defined(__s390x__) -@@ -200,6 +204,8 @@ - #define mmio_flush_writes() asm volatile("fwb" ::: "memory") - #elif defined(__sparc_v9__) - #define mmio_flush_writes() asm volatile("membar #StoreStore" ::: "memory") -+#elif defined(__sw_64__) -+#define mmio_flush_writes() asm volatile("memb" ::: "memory"); - #elif defined(__aarch64__) - #define mmio_flush_writes() asm volatile("dsb st" ::: "memory"); - #elif defined(__sparc__) diff --git a/rdma-core.spec b/rdma-core.spec index b58c530..5fa1e49 100644 --- a/rdma-core.spec +++ b/rdma-core.spec @@ -1,7 +1,6 @@ -%define anolis_release .0.3 Name: rdma-core -Version: 46.0 -Release: 1%{anolis_release}%{?dist}.1 +Version: 48.0 +Release: 1%{?dist} Summary: RDMA core userspace libraries and daemons # Almost everything is licensed under the OFA dual GPLv2, 2 Clause BSD license @@ -26,9 +25,6 @@ Patch9999: 9999-udev-keep-NAME_KERNEL-as-default-interface-naming-co.patch # Do not build static libs by default. %define with_static %{?_with_static: 1} %{?!_with_static: 0} -Patch1000: 1000-CMakeLists-enable-erdma-provider.patch - -Patch100000: rdma-core-44.0-sw.patch # 32-bit arm is missing required arch-specific memory barriers, ExcludeArch: %{arm} @@ -89,9 +85,7 @@ BuildRequires: make %define cmake_install DESTDIR=%{buildroot} make install %endif -%ifnarch loongarch64 sw_64 BuildRequires: pandoc -%endif %description RDMA core userspace infrastructure and documentation, including initialization @@ -147,8 +141,6 @@ Provides: libcxgb4 = %{version}-%{release} Obsoletes: libcxgb4 < %{version}-%{release} Provides: libefa = %{version}-%{release} Obsoletes: libefa < %{version}-%{release} -Provides: liberdma = %{version}-%{release} -Obsoletes: liberdma < %{version}-%{release} Provides: libhfi1 = %{version}-%{release} Obsoletes: libhfi1 < %{version}-%{release} Provides: libirdma = %{version}-%{release} @@ -176,7 +168,6 @@ Device-specific plug-in ibverbs userspace drivers are included: - libbxnt_re: Broadcom NetXtreme-E RoCE HCA - libcxgb4: Chelsio T4 iWARP HCA - libefa: Amazon Elastic Fabric Adapter -- liberdma: Alibaba Elastic RDMA (iWarp) Adapter - libhfi1: Intel Omni-Path HFI - libhns: HiSilicon Hip06 SoC - libirdma: Intel Ethernet Connection RDMA @@ -281,9 +272,7 @@ easy, object-oriented access to IB verbs. %if 0%{?rhel} %patch9000 -p1 %patch9999 -p1 -%patch1000 -p1 %endif -%patch100000 -p1 %build @@ -642,15 +631,9 @@ fi %endif %changelog -* Wed Apr 17 2024 Cheng Xu - 46.0-1.0.3.1 -- Add erdma provider support - -* Wed Mar 20 2024 wuxiat - 46.0-1.0.2.1 -- cherry-pick `add sw Patch #9532175ecea28d05bb1173c2fb3e8ddf05b3e516`. - -* Mon Dec 11 2023 Jacob Wang - 46.0-1.0.1.1 -- Support loongarch64 (Hang Zhao) -- Fix build error (geliwei@openanolis.org) +* Thu Sep 21 2023 Kamal Heib - 48.0-1 +- Rebase to upstream release v48.0 +- Resolves: RHEL-930, RHEL-4240, RHEL-6281, RHEL-6078 * Tue May 30 2023 Kamal Heib - 46.0-1.1 - Add gating tests -- Gitee From 314bdb4918c0e76f20bd68a4266cd9a3a135d552 Mon Sep 17 00:00:00 2001 From: songmingliang Date: Fri, 22 Apr 2022 18:48:45 +0800 Subject: [PATCH 2/5] build: support loongarch64 --- rdma-core.spec | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/rdma-core.spec b/rdma-core.spec index 5fa1e49..1ebe97b 100644 --- a/rdma-core.spec +++ b/rdma-core.spec @@ -1,6 +1,7 @@ +%define anolis_release .0.1 Name: rdma-core Version: 48.0 -Release: 1%{?dist} +Release: 1%{anolis_release}%{?dist} Summary: RDMA core userspace libraries and daemons # Almost everything is licensed under the OFA dual GPLv2, 2 Clause BSD license @@ -85,7 +86,9 @@ BuildRequires: make %define cmake_install DESTDIR=%{buildroot} make install %endif +%ifnarch loongarch64 BuildRequires: pandoc +%endif %description RDMA core userspace infrastructure and documentation, including initialization @@ -403,7 +406,7 @@ fi %config(noreplace) %{_sysconfdir}/rdma/modules/rdma.conf %config(noreplace) %{_sysconfdir}/rdma/modules/roce.conf %dir %{_sysconfdir}/modprobe.d -%ifnarch s390 +%ifnarch s390 loongarch64 %config(noreplace) %{_sysconfdir}/modprobe.d/mlx4.conf %endif %{_unitdir}/rdma-hw.target @@ -441,13 +444,15 @@ fi %endif %{_libdir}/lib*.so %{_libdir}/pkgconfig/*.pc +%ifnarch loongarch64 %{_mandir}/man3/efadv* +%endif %{_mandir}/man3/ibv_* %{_mandir}/man3/rdma* %{_mandir}/man3/umad* %{_mandir}/man3/*_to_ibv_rate.* %{_mandir}/man7/rdma_cm.* -%ifnarch s390 +%ifnarch s390 loongarch64 %{_mandir}/man3/mlx5dv* %{_mandir}/man3/mlx4dv* %{_mandir}/man3/manadv* @@ -529,10 +534,12 @@ fi %files -n libibverbs %dir %{_sysconfdir}/libibverbs.d %dir %{_libdir}/libibverbs +%ifnarch loongarch64 %{_libdir}/libefa.so.* +%endif %{_libdir}/libibverbs*.so.* %{_libdir}/libibverbs/*.so -%ifnarch s390 +%ifnarch s390 loongarch64 %{_libdir}/libmlx5.so.* %{_libdir}/libmlx4.so.* %{_libdir}/libmana.so.* @@ -631,6 +638,9 @@ fi %endif %changelog +* Tue Jul 16 2024 Jacob Wang - 48.0-1.0.1 +- Support loongarch64 (Hang Zhao) + * Thu Sep 21 2023 Kamal Heib - 48.0-1 - Rebase to upstream release v48.0 - Resolves: RHEL-930, RHEL-4240, RHEL-6281, RHEL-6078 -- Gitee From 22206604956a1ae7ebdf34a1d108b4a99692435d Mon Sep 17 00:00:00 2001 From: Liwei Ge Date: Wed, 16 Nov 2022 18:27:26 +0800 Subject: [PATCH 3/5] spec: fix build error --- rdma-core.spec | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/rdma-core.spec b/rdma-core.spec index 1ebe97b..dcb6f4e 100644 --- a/rdma-core.spec +++ b/rdma-core.spec @@ -406,7 +406,7 @@ fi %config(noreplace) %{_sysconfdir}/rdma/modules/rdma.conf %config(noreplace) %{_sysconfdir}/rdma/modules/roce.conf %dir %{_sysconfdir}/modprobe.d -%ifnarch s390 loongarch64 +%ifnarch s390 %config(noreplace) %{_sysconfdir}/modprobe.d/mlx4.conf %endif %{_unitdir}/rdma-hw.target @@ -444,15 +444,13 @@ fi %endif %{_libdir}/lib*.so %{_libdir}/pkgconfig/*.pc -%ifnarch loongarch64 %{_mandir}/man3/efadv* -%endif %{_mandir}/man3/ibv_* %{_mandir}/man3/rdma* %{_mandir}/man3/umad* %{_mandir}/man3/*_to_ibv_rate.* %{_mandir}/man7/rdma_cm.* -%ifnarch s390 loongarch64 +%ifnarch s390 %{_mandir}/man3/mlx5dv* %{_mandir}/man3/mlx4dv* %{_mandir}/man3/manadv* @@ -534,12 +532,10 @@ fi %files -n libibverbs %dir %{_sysconfdir}/libibverbs.d %dir %{_libdir}/libibverbs -%ifnarch loongarch64 %{_libdir}/libefa.so.* -%endif %{_libdir}/libibverbs*.so.* %{_libdir}/libibverbs/*.so -%ifnarch s390 loongarch64 +%ifnarch s390 %{_libdir}/libmlx5.so.* %{_libdir}/libmlx4.so.* %{_libdir}/libmana.so.* @@ -640,6 +636,7 @@ fi %changelog * Tue Jul 16 2024 Jacob Wang - 48.0-1.0.1 - Support loongarch64 (Hang Zhao) +- Fix build error (geliwei@openanolis.org) * Thu Sep 21 2023 Kamal Heib - 48.0-1 - Rebase to upstream release v48.0 -- Gitee From c86f1050306383979f36d50539afeec0f0591ead Mon Sep 17 00:00:00 2001 From: wxiat Date: Tue, 20 Jun 2023 16:30:23 +0800 Subject: [PATCH 4/5] cherry-pick `add sw Patch #9532175ecea28d05bb1173c2fb3e8ddf05b3e516`. Signed-off-by: Weisson --- rdma-core-44.0-sw.patch | 30 ++++++++++++++++++++++++++++++ rdma-core.spec | 5 ++++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 rdma-core-44.0-sw.patch diff --git a/rdma-core-44.0-sw.patch b/rdma-core-44.0-sw.patch new file mode 100644 index 0000000..c3cb24e --- /dev/null +++ b/rdma-core-44.0-sw.patch @@ -0,0 +1,30 @@ +diff -Naur rdma-core-44.0.org/util/udma_barrier.h rdma-core-44.0.sw/util/udma_barrier.h +--- rdma-core-44.0.org/util/udma_barrier.h 2022-12-29 17:28:40.000000000 +0800 ++++ rdma-core-44.0.sw/util/udma_barrier.h 2023-06-20 16:24:36.590075662 +0800 +@@ -92,6 +92,8 @@ + #define udma_to_device_barrier() asm volatile("mf" ::: "memory") + #elif defined(__sparc_v9__) + #define udma_to_device_barrier() asm volatile("membar #StoreStore" ::: "memory") ++#elif defined(__sw_64__) ++#define udma_to_device_barrier() asm volatile("memb" ::: "memory"); + #elif defined(__aarch64__) + #define udma_to_device_barrier() asm volatile("dsb st" ::: "memory"); + #elif defined(__sparc__) || defined(__s390x__) +@@ -130,6 +132,8 @@ + #define udma_from_device_barrier() asm volatile("mf" ::: "memory") + #elif defined(__sparc_v9__) + #define udma_from_device_barrier() asm volatile("membar #LoadLoad" ::: "memory") ++#elif defined(__sw_64__) ++#define udma_from_device_barrier() asm volatile("memb" ::: "memory"); + #elif defined(__aarch64__) + #define udma_from_device_barrier() asm volatile("dsb ld" ::: "memory"); + #elif defined(__sparc__) || defined(__s390x__) +@@ -200,6 +204,8 @@ + #define mmio_flush_writes() asm volatile("fwb" ::: "memory") + #elif defined(__sparc_v9__) + #define mmio_flush_writes() asm volatile("membar #StoreStore" ::: "memory") ++#elif defined(__sw_64__) ++#define mmio_flush_writes() asm volatile("memb" ::: "memory"); + #elif defined(__aarch64__) + #define mmio_flush_writes() asm volatile("dsb st" ::: "memory"); + #elif defined(__sparc__) diff --git a/rdma-core.spec b/rdma-core.spec index dcb6f4e..3effce4 100644 --- a/rdma-core.spec +++ b/rdma-core.spec @@ -26,6 +26,7 @@ Patch9999: 9999-udev-keep-NAME_KERNEL-as-default-interface-naming-co.patch # Do not build static libs by default. %define with_static %{?_with_static: 1} %{?!_with_static: 0} +Patch100000: rdma-core-44.0-sw.patch # 32-bit arm is missing required arch-specific memory barriers, ExcludeArch: %{arm} @@ -86,7 +87,7 @@ BuildRequires: make %define cmake_install DESTDIR=%{buildroot} make install %endif -%ifnarch loongarch64 +%ifnarch loongarch64 sw_64 BuildRequires: pandoc %endif @@ -276,6 +277,7 @@ easy, object-oriented access to IB verbs. %patch9000 -p1 %patch9999 -p1 %endif +%patch100000 -p1 %build @@ -637,6 +639,7 @@ fi * Tue Jul 16 2024 Jacob Wang - 48.0-1.0.1 - Support loongarch64 (Hang Zhao) - Fix build error (geliwei@openanolis.org) +- cherry-pick `add sw Patch #9532175ecea28d05bb1173c2fb3e8ddf05b3e516`. (nijie@wuxiat.com) * Thu Sep 21 2023 Kamal Heib - 48.0-1 - Rebase to upstream release v48.0 -- Gitee From 3b848ffddb712833b321b991475fac9bd4aa3982 Mon Sep 17 00:00:00 2001 From: Cheng Xu Date: Fri, 19 Apr 2024 11:08:15 +0800 Subject: [PATCH 5/5] spec: enable erdma support RHEL upstream disabled erdma, so we enable it again. Signed-off-by: Cheng Xu --- 1000-CMakeLists-enable-erdma-provider.patch | 29 +++++++++++++++++++++ rdma-core.spec | 7 +++++ 2 files changed, 36 insertions(+) create mode 100644 1000-CMakeLists-enable-erdma-provider.patch diff --git a/1000-CMakeLists-enable-erdma-provider.patch b/1000-CMakeLists-enable-erdma-provider.patch new file mode 100644 index 0000000..e4c9c50 --- /dev/null +++ b/1000-CMakeLists-enable-erdma-provider.patch @@ -0,0 +1,29 @@ +From 6d10c60de8bc0b3a26c4f4a179d87be5cbae9a8b Mon Sep 17 00:00:00 2001 +From: Cheng Xu +Date: Fri, 19 Apr 2024 10:59:11 +0800 +Subject: [PATCH] CMakeLists: enable erdma provider + +RHEL upstream disables erdma provider, which is unexpected. Enable +it first, and then fix upstream in future. + +Signed-off-by: Cheng Xu +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index cfe79bcfa..87c0d0886 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -711,7 +711,7 @@ add_subdirectory(providers/bnxt_re) + add_subdirectory(providers/cxgb4) # NO SPARSE + add_subdirectory(providers/efa) + add_subdirectory(providers/efa/man) +-#add_subdirectory(providers/erdma) ++add_subdirectory(providers/erdma) + add_subdirectory(providers/hns) + add_subdirectory(providers/irdma) + add_subdirectory(providers/mana) +-- +2.31.1 + diff --git a/rdma-core.spec b/rdma-core.spec index 3effce4..3851e7e 100644 --- a/rdma-core.spec +++ b/rdma-core.spec @@ -26,6 +26,8 @@ Patch9999: 9999-udev-keep-NAME_KERNEL-as-default-interface-naming-co.patch # Do not build static libs by default. %define with_static %{?_with_static: 1} %{?!_with_static: 0} +Patch1000: 1000-CMakeLists-enable-erdma-provider.patch + Patch100000: rdma-core-44.0-sw.patch # 32-bit arm is missing required arch-specific memory barriers, ExcludeArch: %{arm} @@ -145,6 +147,8 @@ Provides: libcxgb4 = %{version}-%{release} Obsoletes: libcxgb4 < %{version}-%{release} Provides: libefa = %{version}-%{release} Obsoletes: libefa < %{version}-%{release} +Provides: liberdma = %{version}-%{release} +Obsoletes: liberdma < %{version}-%{release} Provides: libhfi1 = %{version}-%{release} Obsoletes: libhfi1 < %{version}-%{release} Provides: libirdma = %{version}-%{release} @@ -172,6 +176,7 @@ Device-specific plug-in ibverbs userspace drivers are included: - libbxnt_re: Broadcom NetXtreme-E RoCE HCA - libcxgb4: Chelsio T4 iWARP HCA - libefa: Amazon Elastic Fabric Adapter +- liberdma: Alibaba Elastic RDMA (iWarp) Adapter - libhfi1: Intel Omni-Path HFI - libhns: HiSilicon Hip06 SoC - libirdma: Intel Ethernet Connection RDMA @@ -276,6 +281,7 @@ easy, object-oriented access to IB verbs. %if 0%{?rhel} %patch9000 -p1 %patch9999 -p1 +%patch1000 -p1 %endif %patch100000 -p1 @@ -640,6 +646,7 @@ fi - Support loongarch64 (Hang Zhao) - Fix build error (geliwei@openanolis.org) - cherry-pick `add sw Patch #9532175ecea28d05bb1173c2fb3e8ddf05b3e516`. (nijie@wuxiat.com) +- Add erdma provider support (chengyou@linux.alibaba.com) * Thu Sep 21 2023 Kamal Heib - 48.0-1 - Rebase to upstream release v48.0 -- Gitee