From 9f15d44e5fea91eea2ec6a51ab780aab1f206c21 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Wed, 3 Nov 2021 12:34:10 -0400 Subject: [PATCH] import libvma-9.3.1-2.el9 --- .gitignore | 1 + .libvma.metadata | 1 + SOURCES/0001-Fix-fc35-issues.patch | 61 ++++++++++++ SPECS/libvma.spec | 143 +++++++++++++++++++++++++++++ 4 files changed, 206 insertions(+) create mode 100644 .gitignore create mode 100644 .libvma.metadata create mode 100644 SOURCES/0001-Fix-fc35-issues.patch create mode 100644 SPECS/libvma.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1981278 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/libvma-9.3.1.tar.gz diff --git a/.libvma.metadata b/.libvma.metadata new file mode 100644 index 0000000..f222d88 --- /dev/null +++ b/.libvma.metadata @@ -0,0 +1 @@ +0c43ee34e73cf00ff0f2776974542c830228a9ef SOURCES/libvma-9.3.1.tar.gz diff --git a/SOURCES/0001-Fix-fc35-issues.patch b/SOURCES/0001-Fix-fc35-issues.patch new file mode 100644 index 0000000..debd46f --- /dev/null +++ b/SOURCES/0001-Fix-fc35-issues.patch @@ -0,0 +1,61 @@ +From 061e5640686f670398856b8640161762ce56d5e5 Mon Sep 17 00:00:00 2001 +From: Igor Ivanov +Date: Thu, 17 Jun 2021 16:07:31 +0300 +Subject: [PATCH] Fix fc35 issues + +- glibc: + The function pthread_yield has been deprecated; programs should use + the equivalent standard function sched_yield instead. +- systemd: + Fix systemd detection + +Signed-off-by: Igor Ivanov +--- + Makefile.am | 10 ++-------- + src/vma/iomux/epfd_info.cpp | 2 +- + 2 files changed, 3 insertions(+), 9 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index ee543c8f..c8dea6ee 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -19,21 +19,15 @@ mydocdir = $(if $(docdir),$(docdir),${datadir}/doc/$(distdir)) + mydoc_DATA = README CHANGES + + install-exec-hook: +- if type systemctl >/dev/null 2>&1; then \ ++ if systemctl >/dev/null 2>&1; then \ + mkdir -p $(DESTDIR)$(prefix)/lib/systemd/system/; \ + cp $(top_builddir)/contrib/scripts/vma.service $(DESTDIR)$(prefix)/lib/systemd/system/vma.service; \ + chmod 644 $(DESTDIR)$(prefix)/lib/systemd/system/vma.service; \ +- else \ +- mkdir -p $(DESTDIR)/$(sysconfdir)/init.d; \ +- cp $(top_builddir)/contrib/scripts/vma.init $(DESTDIR)$(sysconfdir)/init.d/vma; \ +- chmod 755 $(DESTDIR)$(sysconfdir)/init.d/vma; \ + fi + + uninstall-hook: +- if type systemctl >/dev/null 2>&1; then \ ++ if systemctl >/dev/null 2>&1; then \ + rm -rf $(DESTDIR)$(prefix)/lib/systemd/system/vma.service; \ +- else \ +- rm -rf $(DESTDIR)$(sysconfdir)/init.d/vma; \ + fi + + install-all: install +diff --git a/src/vma/iomux/epfd_info.cpp b/src/vma/iomux/epfd_info.cpp +index c7670c7b..d7c6c4fc 100644 +--- a/src/vma/iomux/epfd_info.cpp ++++ b/src/vma/iomux/epfd_info.cpp +@@ -624,7 +624,7 @@ int epfd_info::ring_poll_and_process_element(uint64_t *p_poll_sn, void* pv_fd_re + + m_ring_map_lock.unlock(); + +- if (m_sysvar_thread_mode == THREAD_MODE_PLENTY && ret_total == 0 && errno == EAGAIN) pthread_yield(); ++ if (m_sysvar_thread_mode == THREAD_MODE_PLENTY && ret_total == 0 && errno == EAGAIN) sched_yield(); + + if (ret_total) { + __log_func("ret_total=%d", ret_total); +-- +2.18.1 + diff --git a/SPECS/libvma.spec b/SPECS/libvma.spec new file mode 100644 index 0000000..29ac2e6 --- /dev/null +++ b/SPECS/libvma.spec @@ -0,0 +1,143 @@ +%{!?configure_options: %global configure_options %{nil}} + +Name: libvma +Version: 9.3.1 +Release: 2%{?dist} +Summary: A library for boosting TCP and UDP traffic (over RDMA hardware) + +License: GPLv2 or BSD +Url: https://github.com/Mellanox/libvma +Source0: https://github.com/Mellanox/libvma/archive/%{version}/%{name}-%{version}.tar.gz +Patch0: 0001-Fix-fc35-issues.patch + +# libvma currently supports only the following architectures +ExclusiveArch: x86_64 ppc64le ppc64 aarch64 + +BuildRequires: pkgconfig +BuildRequires: automake +BuildRequires: autoconf +BuildRequires: libtool +BuildRequires: gcc-c++ +BuildRequires: rdma-core-devel +BuildRequires: systemd-rpm-macros +BuildRequires: pkgconfig(libnl-3.0) +BuildRequires: pkgconfig(libnl-route-3.0) +BuildRequires: make + +%description +libvma is a LD_PRELOAD-able library that boosts performance of TCP and +UDP traffic. It allows application written over standard socket API to +handle fast path data traffic from user space over Ethernet and/or +Infiniband with full network stack bypass and get better throughput, +latency and packets/sec rate. + +No application binary change is required for that. +libvma is supported by RDMA capable devices that support "verbs" +IBV_QPT_RAW_PACKET QP for Ethernet and/or IBV_QPT_UD QP for IPoIB. + +%package devel +Summary: Header files required to develop with libvma +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +This package includes headers for building programs with libvma's +interfaces. + +%package utils +Summary: Utilities used with libvma +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description utils +This package contains the tool for collecting and analyzing libvma statistic. + +%prep +%setup -q +%autosetup -p1 + +%build +export revision=1 +if [ ! -e configure ] && [ -e autogen.sh ]; then + VMA_RELEASE=1 ./autogen.sh +fi + +%configure %{?configure_options} +%{make_build} + +%install +%{make_install} + +find $RPM_BUILD_ROOT%{_libdir} -name '*.la' -delete +install -D -m 644 contrib/scripts/vma.service $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/vma.service + +%post +%systemd_post vma.service + +%preun +%systemd_preun vma.service + +%postun +%systemd_postun_with_restart vma.service + +%files +%{_libdir}/%{name}.so* +%dir %{_pkgdocdir} +%doc %{_pkgdocdir}/README +%doc %{_pkgdocdir}/CHANGES +%config(noreplace) %{_sysconfdir}/libvma.conf +%{_sbindir}/vmad +%{_prefix}/lib/systemd/system/vma.service +%license COPYING LICENSE +%{_mandir}/man7/vma.* +%{_mandir}/man8/vmad.* + +%files devel +%dir %{_includedir}/mellanox +%{_includedir}/mellanox/vma_extra.h + +%files utils +%{_bindir}/vma_stats +%{_mandir}/man8/vma_stats.* + +%changelog +* Mon Aug 09 2021 Mohan Boddu - 9.3.1-2 +- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags + Related: rhbz#1991688 + +* Tue Jul 06 2021 Honggang Li - 9.3.1-1 +- Bump version to 9.3.1 +- Resolves: rhbz#1858572 + +* Fri Apr 16 2021 Mohan Boddu - 9.2.2-3 +- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 + +* Tue Jan 26 2021 Fedora Release Engineering - 9.2.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Dec 16 2020 Igor Ivanov 9.2.2-1 +- Bump version to 9.2.2 +- Fix issues for gcc-11 + +* Thu Dec 10 2020 Jeff Law 9.1.1-2 +- Don't use "register" in C++17. Still FTBFS though. + +* Sun Nov 15 2020 Igor Ivanov 9.1.1-1 +- Bump version to 9.1.1 + +* Fri Apr 17 2020 Igor Ivanov 9.0.2-1 +- Align with Fedora guidelines +- Bump version to 9.0.2 + +* Thu Feb 7 2019 Igor Ivanov 8.8.2-1 +- Improve package update processing + +* Tue Dec 19 2017 Igor Ivanov 8.5.1-1 +- Add systemd support + +* Tue May 9 2017 Ophir Munk 8.3.4-1 +- Add libvma-debug.so installation + +* Mon Nov 28 2016 Igor Ivanov 8.2.2-1 +- Add daemon + +* Mon Jan 4 2016 Avner BenHanoch 7.0.12-1 +- Initial Packaging