From 139226680a19c53a05e3bb5dee4f27bcaa40035e Mon Sep 17 00:00:00 2001 From: Igor Ivanov Date: Thu, 17 Jun 2021 12:10:15 +0000 Subject: [PATCH] Update to 9.3.1 Signed-off-by: Igor Ivanov --- .gitignore | 1 + 0001-Fix-fc35-issues.patch | 61 ++++++++++++++ 0002-Update-systemctl-files.patch | 34 -------- 0003-Remove-30-libvma-limits.patch | 54 ------------ 0004-Use-vmad-for-systemd.patch | 73 ----------------- 0005-Fix-issues-for-gcc-11.patch | 127 ----------------------------- libvma.spec | 17 ++-- sources | 2 +- 8 files changed, 71 insertions(+), 298 deletions(-) create mode 100644 0001-Fix-fc35-issues.patch delete mode 100644 0002-Update-systemctl-files.patch delete mode 100644 0003-Remove-30-libvma-limits.patch delete mode 100644 0004-Use-vmad-for-systemd.patch delete mode 100644 0005-Fix-issues-for-gcc-11.patch diff --git a/.gitignore b/.gitignore index fe70608..1d31bb7 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /libvma-9.0.2.tar.gz /libvma-9.1.1.tar.gz /libvma-9.2.2.tar.gz +/libvma-9.3.1.tar.gz diff --git a/0001-Fix-fc35-issues.patch b/0001-Fix-fc35-issues.patch new file mode 100644 index 0000000..debd46f --- /dev/null +++ b/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/0002-Update-systemctl-files.patch b/0002-Update-systemctl-files.patch deleted file mode 100644 index d0a86b9..0000000 --- a/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/0003-Remove-30-libvma-limits.patch b/0003-Remove-30-libvma-limits.patch deleted file mode 100644 index 1c16ff9..0000000 --- a/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/0004-Use-vmad-for-systemd.patch b/0004-Use-vmad-for-systemd.patch deleted file mode 100644 index 8b73949..0000000 --- a/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/0005-Fix-issues-for-gcc-11.patch b/0005-Fix-issues-for-gcc-11.patch deleted file mode 100644 index 7eb2453..0000000 --- a/0005-Fix-issues-for-gcc-11.patch +++ /dev/null @@ -1,127 +0,0 @@ -From d64a8e295ad39032790501955e3bdb7d86e8b05f 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 -3. [-Werror=stringop-overread] in std::string() - -Signed-off-by: Igor Ivanov ---- - configure.ac | 8 ++++++-- - src/utils/asm-x86.h | 2 +- - src/vma/dev/net_device_val.cpp | 6 +++--- - src/vma/sock/cleanable_obj.h | 9 ++++++++- - src/vma/util/utils.cpp | 4 ++-- - 5 files changed, 20 insertions(+), 9 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/dev/net_device_val.cpp b/src/vma/dev/net_device_val.cpp -index 0e48a9e4..989e4539 100644 ---- a/src/vma/dev/net_device_val.cpp -+++ b/src/vma/dev/net_device_val.cpp -@@ -962,7 +962,7 @@ void net_device_val::update_netvsc_slaves(int if_index, int if_flags) - - std::string net_device_val::to_str() - { -- return std::string("Net Device: " + m_name); -+ return std::string("Net Device: ") + m_name; - } - - ring* net_device_val::reserve_ring(resource_allocation_key *key) -@@ -1414,7 +1414,7 @@ void net_device_val_eth::create_br_address(const char* ifname) - } - std::string net_device_val_eth::to_str() - { -- return std::string("ETH: " + net_device_val::to_str()); -+ return std::string("ETH: ") + net_device_val::to_str(); - } - - net_device_val_ib::~net_device_val_ib() -@@ -1512,7 +1512,7 @@ void net_device_val_ib::create_br_address(const char* ifname) - - std::string net_device_val_ib::to_str() - { -- return std::string("IB: " + net_device_val::to_str()); -+ return std::string("IB: ") + net_device_val::to_str(); - } - - -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/libvma.spec b/libvma.spec index a717a92..69dbfe0 100644 --- a/libvma.spec +++ b/libvma.spec @@ -1,17 +1,14 @@ %{!?configure_options: %global configure_options %{nil}} Name: libvma -Version: 9.2.2 -Release: 3%{?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 +Patch0: 0001-Fix-fc35-issues.patch # libvma currently supports only the following architectures ExclusiveArch: x86_64 ppc64le ppc64 aarch64 @@ -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,9 @@ install -D -m 644 contrib/scripts/vma.service $RPM_BUILD_ROOT/%{_prefix}/lib/sys %{_mandir}/man8/vma_stats.* %changelog +* Thu Jun 17 2021 Igor Ivanov 9.3.1-1 +- Bump version to 9.3.1 + * Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek - 9.2.2-3 - Rebuilt for updated systemd-rpm-macros See https://pagure.io/fesco/issue/2583. diff --git a/sources b/sources index 87995f1..fd1bbe8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libvma-9.2.2.tar.gz) = 5a8a41442479107c8242938dad69ba86517823753ad6f0ed874b13e6c628f1536dc7e3de40d1244c0c06e3dbd025e619557488957681093b291de9c6fabb4a91 +SHA512 (libvma-9.3.1.tar.gz) = 6829acf9759ebdfbe2bfe0607761c1817abcab9e36e942709f532b6769d24c94e8c16cba2b9ccf200eef613b6d20dce2fcd914c509f1cc7662283118ceb5d0ec