From 052f7b2369837cf737e0d86645a23a45f78e6cb0 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 5 Oct 2021 13:14:55 -0400 Subject: [PATCH] import libvma-9.3.1-1.el8 --- .gitignore | 2 +- .libvma.metadata | 2 +- SOURCES/0001-Fix-fc35-issues.patch | 61 ++++++++++++ ...ip-team-interface-when-check-bonding.patch | 42 --------- SOURCES/0002-Update-systemctl-files.patch | 34 ------- SOURCES/0003-Remove-30-libvma-limits.patch | 54 ----------- SOURCES/0004-Use-vmad-for-systemd.patch | 73 -------------- SOURCES/0005-Fix-issues-for-gcc-11.patch | 94 ------------------- SPECS/libvma.spec | 20 ++-- 9 files changed, 73 insertions(+), 309 deletions(-) create mode 100644 SOURCES/0001-Fix-fc35-issues.patch delete mode 100644 SOURCES/0001-utils-skip-team-interface-when-check-bonding.patch delete mode 100644 SOURCES/0002-Update-systemctl-files.patch delete mode 100644 SOURCES/0003-Remove-30-libvma-limits.patch delete mode 100644 SOURCES/0004-Use-vmad-for-systemd.patch delete mode 100644 SOURCES/0005-Fix-issues-for-gcc-11.patch diff --git a/.gitignore b/.gitignore index c2a5c07..1981278 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/libvma-9.2.2.tar.gz +SOURCES/libvma-9.3.1.tar.gz diff --git a/.libvma.metadata b/.libvma.metadata index 1c746a9..f222d88 100644 --- a/.libvma.metadata +++ b/.libvma.metadata @@ -1 +1 @@ -090de6309a005b42eede8fb69b895fcc1e5fa30d SOURCES/libvma-9.2.2.tar.gz +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/SOURCES/0001-utils-skip-team-interface-when-check-bonding.patch b/SOURCES/0001-utils-skip-team-interface-when-check-bonding.patch deleted file mode 100644 index 1950388..0000000 --- a/SOURCES/0001-utils-skip-team-interface-when-check-bonding.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 460c87546e31511b098a2af3392c67ba7d33c675 Mon Sep 17 00:00:00 2001 -From: Honggang Li -Date: Tue, 19 Jan 2021 18:07:00 +0800 -Subject: [PATCH] utils: skip team interface when check bonding - -Both team and bonding Master interface has IFF_MASTER flag bit set. - -However, linux sys files, such as BONDING_MODE_PARAM_FILE, are used -to check bonding interface. The linux 'team' kernel module does not -create those files as 'bonding' module. - -In other words, 'bonding' interface verify does not work for 'team' -interface, so skip 'team' interface when check 'bonding'. - -Otherwise, we will have significant performance issues for UDP traffic -over 'team' interface. - -Fixes: ee0a1b983a6f ("issue: 2233904 Check bonding device using netlink") - -Signed-off-by: Honggang Li ---- - src/vma/util/utils.cpp | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -diff --git a/src/vma/util/utils.cpp b/src/vma/util/utils.cpp -index 5c0fe3e960a3..d795d259e370 100644 ---- a/src/vma/util/utils.cpp -+++ b/src/vma/util/utils.cpp -@@ -822,9 +822,7 @@ bool check_bond_device_exist(const char* ifname) - goto out; - } - link_type = rtnl_link_get_type(link); -- if (link_type && -- (strcmp(link_type, "bond") != 0) && -- (strcmp(link_type, "team") != 0)) { -+ if (link_type && (strcmp(link_type, "bond") != 0)) { - link_type = NULL; - } - out: --- -2.25.4 - diff --git a/SOURCES/0002-Update-systemctl-files.patch b/SOURCES/0002-Update-systemctl-files.patch deleted file mode 100644 index d0a86b9..0000000 --- a/SOURCES/0002-Update-systemctl-files.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 96a275dbffcc967cdbd4c29c9a3196a9518bae00 Mon Sep 17 00:00:00 2001 -From: Igor Ivanov -Date: Fri, 19 Jun 2020 16:29:25 +0300 -Subject: [PATCH] Update systemctl files - -Signed-off-by: Igor Ivanov ---- - contrib/scripts/vma.service.in | 6 ++---- - 1 file changed, 2 insertions(+), 4 deletions(-) - -diff --git a/contrib/scripts/vma.service.in b/contrib/scripts/vma.service.in -index e268173f..13457b2f 100644 ---- a/contrib/scripts/vma.service.in -+++ b/contrib/scripts/vma.service.in -@@ -1,14 +1,12 @@ - [Unit] --Description=VMA Daemon. Version: @VERSION@-@VMA_LIBRARY_RELEASE@ --After=network.target syslog.target --Requires=network.target -+Description=VMA Daemon -+After=network.target - - [Service] - Type=forking - Restart=on-failure - ExecStart=@prefix@/sbin/vma start - ExecStop=@prefix@/sbin/vma stop --ExecReload=@prefix@/sbin/vma restart - RestartForceExitStatus=1 SIGTERM - - [Install] --- -2.18.1 - diff --git a/SOURCES/0003-Remove-30-libvma-limits.patch b/SOURCES/0003-Remove-30-libvma-limits.patch deleted file mode 100644 index 1c16ff9..0000000 --- a/SOURCES/0003-Remove-30-libvma-limits.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 402a7f565d6171d195a5b65b9d54f42d802211c1 Mon Sep 17 00:00:00 2001 -From: Igor Ivanov -Date: Tue, 14 Jul 2020 19:34:02 +0300 -Subject: [PATCH] Remove 30-libvma-limits.conf - -RDMA communications require that physical memory in the computer -be pinned. Pinning memory is normally a very privileged operation. -In order to allow users other than root to run large RDMA applications, -it will likely be necessary to increase the amount of memory -that non-root users are allowed to pin in the system. -This is done by adding a file in the /etc/security/limits.d/ directory. -It can be done by an administrator of system for user/group that -use libvma. - -Signed-off-by: Igor Ivanov ---- - src/vma/Makefile.am | 5 +---- - src/vma/util/30-libvma-limits.conf | 6 ------ - 2 files changed, 1 insertion(+), 10 deletions(-) - delete mode 100644 src/vma/util/30-libvma-limits.conf - -diff --git a/src/vma/Makefile.am b/src/vma/Makefile.am -index 6a710a72..8f73fe93 100644 ---- a/src/vma/Makefile.am -+++ b/src/vma/Makefile.am -@@ -28,12 +28,9 @@ EXTRA_DIST = \ - util/hash_map.inl \ - dev/cq_mgr.inl \ - dev/cq_mgr_mlx5.inl \ -- util/libvma.conf \ -- util/30-libvma-limits.conf -+ util/libvma.conf - - sysconf_DATA = util/libvma.conf --othersysconfdir=$(sysconfdir)/security/limits.d --othersysconf_DATA=util/30-libvma-limits.conf - otherincludedir = $(includedir)/mellanox - otherinclude_HEADERS = vma_extra.h - -diff --git a/src/vma/util/30-libvma-limits.conf b/src/vma/util/30-libvma-limits.conf -deleted file mode 100644 -index 9c0d8bc0..00000000 ---- a/src/vma/util/30-libvma-limits.conf -+++ /dev/null -@@ -1,6 +0,0 @@ --# Default limits that are needed for proper work of libvma --# Read more about this topic in the VMA's User Manual -- --* - memlock unlimited --* soft memlock unlimited --* hard memlock unlimited --- -2.18.1 - diff --git a/SOURCES/0004-Use-vmad-for-systemd.patch b/SOURCES/0004-Use-vmad-for-systemd.patch deleted file mode 100644 index 8b73949..0000000 --- a/SOURCES/0004-Use-vmad-for-systemd.patch +++ /dev/null @@ -1,73 +0,0 @@ -From dd5cfb9017c0c6ac233faf4fb17ebfa8a2101cf8 Mon Sep 17 00:00:00 2001 -From: Igor Ivanov -Date: Tue, 14 Jul 2020 21:33:31 +0300 -Subject: [PATCH] Use vmad for systemd - -Signed-off-by: Igor Ivanov ---- - Makefile.am | 9 --------- - contrib/scripts/vma.service.in | 3 +-- - tools/daemon/daemon.c | 5 ----- - 3 files changed, 1 insertion(+), 16 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index 6eecd5af..dc01e13e 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -23,23 +23,14 @@ mydoc_DATA = README.txt journal.txt VMA_VERSION - - install-exec-hook: - if type systemctl >/dev/null 2>&1; then \ -- cp $(top_builddir)/contrib/scripts/vma.init $(DESTDIR)$(sbindir)/vma; \ -- chmod 755 $(DESTDIR)$(sbindir)/vma; \ - 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 \ -- rm -rf $(DESTDIR)$(sbindir)/vma; \ - rm -rf $(DESTDIR)$(prefix)/lib/systemd/system/vma.service; \ -- else \ -- rm -rf $(DESTDIR)$(sysconfdir)/init.d/vma; \ - fi - - install-all: install -diff --git a/contrib/scripts/vma.service.in b/contrib/scripts/vma.service.in -index 13457b2f..e6f5a25b 100644 ---- a/contrib/scripts/vma.service.in -+++ b/contrib/scripts/vma.service.in -@@ -5,8 +5,7 @@ After=network.target - [Service] - Type=forking - Restart=on-failure --ExecStart=@prefix@/sbin/vma start --ExecStop=@prefix@/sbin/vma stop -+ExecStart=@prefix@/sbin/vmad - RestartForceExitStatus=1 SIGTERM - - [Install] -diff --git a/tools/daemon/daemon.c b/tools/daemon/daemon.c -index 4444258d..9d23395a 100644 ---- a/tools/daemon/daemon.c -+++ b/tools/daemon/daemon.c -@@ -66,11 +66,6 @@ int main(int argc, char *argv[]) - /* Setup syslog logging */ - openlog(MODULE_NAME, LOG_PID, LOG_LOCAL5); - -- /* already a daemon */ -- if (getppid() == 1) { -- return 0; -- } -- - /* command line parsing... */ - config_def(); - log_info("Starting\n"); --- -2.18.1 - diff --git a/SOURCES/0005-Fix-issues-for-gcc-11.patch b/SOURCES/0005-Fix-issues-for-gcc-11.patch deleted file mode 100644 index 7c25a6d..0000000 --- a/SOURCES/0005-Fix-issues-for-gcc-11.patch +++ /dev/null @@ -1,94 +0,0 @@ -From 3178430b32c71c0348eb33521d8323122714a58b Mon Sep 17 00:00:00 2001 -From: Igor Ivanov -Date: Wed, 16 Dec 2020 13:46:17 +0200 -Subject: [PATCH] Fix issues for gcc-11 - -1. The register storage class specifier is deprecated in C++11 -2. Disable -Wno-free-nonheap-object diagnostic that looks as - incorrect for gcc-11 - -Signed-off-by: Igor Ivanov ---- - configure.ac | 8 ++++++-- - src/utils/asm-x86.h | 2 +- - src/vma/sock/cleanable_obj.h | 9 ++++++++- - src/vma/util/utils.cpp | 4 ++-- - 4 files changed, 17 insertions(+), 6 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 1540324a..811eb421 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -144,8 +144,12 @@ AC_MSG_CHECKING([for compiler]) - case $CC in - gcc*|g++*) - AC_MSG_RESULT([gcc]) -- CFLAGS="$CFLAGS -Wall -Wextra -Werror -Wundef -ffunction-sections -fdata-sections -Wsequence-point -pipe -Winit-self -Wmissing-include-dirs" -- CXXFLAGS="$CXXFLAGS -Wshadow -Wall -Wextra -Werror -Wundef -ffunction-sections -fdata-sections -Wsequence-point -pipe -Winit-self -Wmissing-include-dirs" -+ CFLAGS="$CFLAGS -Wall -Wextra -Werror -Wundef \ -+ -ffunction-sections -fdata-sections -Wsequence-point -pipe -Winit-self -Wmissing-include-dirs \ -+ -Wno-free-nonheap-object " -+ CXXFLAGS="$CXXFLAGS -Wshadow -Wall -Wextra -Werror -Wundef \ -+ -ffunction-sections -fdata-sections -Wsequence-point -pipe -Winit-self -Wmissing-include-dirs \ -+ -Wno-free-nonheap-object " - ;; - icc*|icpc*) - AC_MSG_RESULT([icc]) -diff --git a/src/utils/asm-x86.h b/src/utils/asm-x86.h -index 5dfb6f42..4e8f03ca 100644 ---- a/src/utils/asm-x86.h -+++ b/src/utils/asm-x86.h -@@ -110,7 +110,7 @@ static inline int atomic_fetch_and_add(int x, volatile int *ptr) - */ - static inline void gettimeoftsc(unsigned long long *p_tscval) - { -- register uint32_t upper_32, lower_32; -+ uint32_t upper_32, lower_32; - - // ReaD Time Stamp Counter (RDTCS) - __asm__ __volatile__("rdtsc" : "=a" (lower_32), "=d" (upper_32)); -diff --git a/src/vma/sock/cleanable_obj.h b/src/vma/sock/cleanable_obj.h -index 34801712..ea38f24b 100644 ---- a/src/vma/sock/cleanable_obj.h -+++ b/src/vma/sock/cleanable_obj.h -@@ -44,7 +44,14 @@ public: - - virtual ~cleanable_obj(){}; - -- virtual void clean_obj(){ set_cleaned(); delete this; }; -+ /* This function should be used just for objects that -+ * was allocated via new() (not by new[], nor by placement new, nor a local object on the stack, -+ * nor a namespace-scope / global, nor a member of another object; but by plain ordinary new) -+ */ -+ virtual void clean_obj(){ -+ set_cleaned(); -+ delete this; -+ }; - - bool is_cleaned(){ return m_b_cleaned; }; - -diff --git a/src/vma/util/utils.cpp b/src/vma/util/utils.cpp -index 5c0fe3e9..a4c3ce66 100644 ---- a/src/vma/util/utils.cpp -+++ b/src/vma/util/utils.cpp -@@ -235,7 +235,7 @@ unsigned short compute_ip_checksum(const unsigned short *buf, unsigned int nshor - * */ - unsigned short compute_tcp_checksum(const struct iphdr *p_iphdr, const uint16_t *p_ip_payload) - { -- register unsigned long sum = 0; -+ unsigned long sum = 0; - uint16_t tcpLen = ntohs(p_iphdr->tot_len) - (p_iphdr->ihl<<2); // shift left 2 will multiply by 4 for converting to octets - - //add the pseudo header -@@ -277,7 +277,7 @@ unsigned short compute_tcp_checksum(const struct iphdr *p_iphdr, const uint16_t - */ - unsigned short compute_udp_checksum_rx(const struct iphdr *p_iphdr, const struct udphdr *udphdrp, mem_buf_desc_t* p_rx_wc_buf_desc) - { -- register unsigned long sum = 0; -+ unsigned long sum = 0; - unsigned short udp_len = htons(udphdrp->len); - const uint16_t *p_ip_payload = (const uint16_t *) udphdrp; - mem_buf_desc_t *p_ip_frag = p_rx_wc_buf_desc; --- -2.18.1 - diff --git a/SPECS/libvma.spec b/SPECS/libvma.spec index 765d03f..16a4287 100644 --- a/SPECS/libvma.spec +++ b/SPECS/libvma.spec @@ -1,18 +1,14 @@ %{!?configure_options: %global configure_options %{nil}} Name: libvma -Version: 9.2.2 -Release: 2%{?dist} +Version: 9.3.1 +Release: 1%{?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: 0002-Update-systemctl-files.patch -Patch1: 0003-Remove-30-libvma-limits.patch -Patch2: 0004-Use-vmad-for-systemd.patch -Patch3: 0005-Fix-issues-for-gcc-11.patch -Patch4: 0001-utils-skip-team-interface-when-check-bonding.patch +Patch0: 0001-Fix-fc35-issues.patch # libvma currently supports only the following architectures ExclusiveArch: x86_64 ppc64le ppc64 aarch64 @@ -26,6 +22,7 @@ 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 @@ -84,9 +81,8 @@ install -D -m 644 contrib/scripts/vma.service $RPM_BUILD_ROOT/%{_prefix}/lib/sys %files %{_libdir}/%{name}.so* %dir %{_pkgdocdir} -%doc %{_pkgdocdir}/README.txt -%doc %{_pkgdocdir}/journal.txt -%doc %{_pkgdocdir}/VMA_VERSION +%doc %{_pkgdocdir}/README +%doc %{_pkgdocdir}/CHANGES %config(noreplace) %{_sysconfdir}/libvma.conf %{_sbindir}/vmad %{_prefix}/lib/systemd/system/vma.service @@ -103,6 +99,10 @@ install -D -m 644 contrib/scripts/vma.service $RPM_BUILD_ROOT/%{_prefix}/lib/sys %{_mandir}/man8/vma_stats.* %changelog +* Tue Jul 06 2021 Honggang Li - 9.3.1-1 +- Bump version to 9.3.1 +- Resolves: rhbz#1915316 + * Thu Feb 04 2021 Honggang Li - 9.2.2-2 - Skip team interface when check bonding - Resolves: rhbz#1916670