From 0898b4550501846d683b0352bb7811df36ddc8b4 Mon Sep 17 00:00:00 2001 From: DistroBaker Date: Wed, 16 Dec 2020 14:11:10 +0000 Subject: [PATCH] Merged update from upstream sources This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/libvma.git#43c65e5da22e750f8713bbf90327d3ce15179e29 --- .gitignore | 1 + 0005-Fix-issues-for-gcc-11.patch | 94 ++++++++++++++++++++++++++++++++ libvma.spec | 10 +++- sources | 2 +- 4 files changed, 105 insertions(+), 2 deletions(-) create mode 100644 0005-Fix-issues-for-gcc-11.patch diff --git a/.gitignore b/.gitignore index 17551a8..fe70608 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /libvma-8.0.1.tar.gz /libvma-9.0.2.tar.gz /libvma-9.1.1.tar.gz +/libvma-9.2.2.tar.gz diff --git a/0005-Fix-issues-for-gcc-11.patch b/0005-Fix-issues-for-gcc-11.patch new file mode 100644 index 0000000..7c25a6d --- /dev/null +++ b/0005-Fix-issues-for-gcc-11.patch @@ -0,0 +1,94 @@ +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/libvma.spec b/libvma.spec index 30e6282..90a7415 100644 --- a/libvma.spec +++ b/libvma.spec @@ -1,7 +1,7 @@ %{!?configure_options: %global configure_options %{nil}} Name: libvma -Version: 9.1.1 +Version: 9.2.2 Release: 1%{?dist} Summary: A library for boosting TCP and UDP traffic (over RDMA hardware) @@ -11,6 +11,7 @@ Source0: https://github.com/Mellanox/libvma/archive/%{version}/%{name}-%{version 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 # libvma currently supports only the following architectures ExclusiveArch: x86_64 ppc64le ppc64 aarch64 @@ -101,6 +102,13 @@ install -D -m 644 contrib/scripts/vma.service $RPM_BUILD_ROOT/%{_prefix}/lib/sys %{_mandir}/man8/vma_stats.* %changelog +* 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 diff --git a/sources b/sources index e832c31..87995f1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libvma-9.1.1.tar.gz) = 164d42de6c5d9c23cce8e75d8f9703f817ea69ba5a62f6ddc4ca760a5cb8ce4652409eeba814994e98268569b4ec2fe121f7c37763602dbd098191d2b5558554 +SHA512 (libvma-9.2.2.tar.gz) = 5a8a41442479107c8242938dad69ba86517823753ad6f0ed874b13e6c628f1536dc7e3de40d1244c0c06e3dbd025e619557488957681093b291de9c6fabb4a91