import libvma-9.2.2-2.el8

This commit is contained in:
CentOS Sources 2021-03-30 11:38:18 -04:00 committed by Stepan Oksanichenko
parent ded9a8e76e
commit 980b823bbe
8 changed files with 374 additions and 47 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/libvma-9.0.2.tar.gz
SOURCES/libvma-9.2.2.tar.gz

View File

@ -1 +1 @@
3e2a9f616a3c672582d1addd2d060f370b94016e SOURCES/libvma-9.0.2.tar.gz
090de6309a005b42eede8fb69b895fcc1e5fa30d SOURCES/libvma-9.2.2.tar.gz

View File

@ -0,0 +1,42 @@
From 460c87546e31511b098a2af3392c67ba7d33c675 Mon Sep 17 00:00:00 2001
From: Honggang Li <honli@redhat.com>
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 <honli@redhat.com>
---
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

View File

@ -0,0 +1,34 @@
From 96a275dbffcc967cdbd4c29c9a3196a9518bae00 Mon Sep 17 00:00:00 2001
From: Igor Ivanov <igor.ivanov.va@gmail.com>
Date: Fri, 19 Jun 2020 16:29:25 +0300
Subject: [PATCH] Update systemctl files
Signed-off-by: Igor Ivanov <igor.ivanov.va@gmail.com>
---
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

View File

@ -0,0 +1,54 @@
From 402a7f565d6171d195a5b65b9d54f42d802211c1 Mon Sep 17 00:00:00 2001
From: Igor Ivanov <igor.ivanov.va@gmail.com>
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 <igor.ivanov.va@gmail.com>
---
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

View File

@ -0,0 +1,73 @@
From dd5cfb9017c0c6ac233faf4fb17ebfa8a2101cf8 Mon Sep 17 00:00:00 2001
From: Igor Ivanov <igor.ivanov.va@gmail.com>
Date: Tue, 14 Jul 2020 21:33:31 +0300
Subject: [PATCH] Use vmad for systemd
Signed-off-by: Igor Ivanov <igor.ivanov.va@gmail.com>
---
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

View File

@ -0,0 +1,94 @@
From 3178430b32c71c0348eb33521d8323122714a58b Mon Sep 17 00:00:00 2001
From: Igor Ivanov <igor.ivanov.va@gmail.com>
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 <igor.ivanov.va@gmail.com>
---
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

View File

@ -1,86 +1,116 @@
%{!?configure_options: %global configure_options %{nil}}
Name: libvma
Version: 9.0.2
Release: 1%{?dist}
Version: 9.2.2
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
# Source: http://github.com/Mellanox/%{name}/archive/%{version}.tar.gz
# Upstream tarballs have no package name in them, locally renaming
Source: %{name}-%{version}.tar.gz
#arm is excluded since libvma fails to compile on arm.
# utils are only built for x86_64, ppc64/ppc64le, & arm64/aarch64
#Reason: libvma uses assembly commands that are not supported by arm.
ExcludeArch: %{arm} s390 s390x i686 ppc
Requires: pam
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
Requires: libmlx5 >= 1.2.1
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
BuildRequires: librdmacm-devel libibverbs-devel libnl3-devel
BuildRequires: automake autoconf libtool
BuildRequires: libibverbs-devel >= 1.2.1
# 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)
%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,
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.
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
Summary: Header files required to develop with libvma
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
Headers files required to develop with the libvma library.
This package includes headers for building programs with libvma's
interfaces.
%package utils
Summary: Libvma utilities
Summary: Utilities used with libvma
Requires: %{name}%{?_isa} = %{version}-%{release}
%description utils
Tools for collecting and analyzing libvma statistic.
This package contains the tool for collecting and analyzing libvma statistic.
%prep
%setup -q
%autosetup -p1
%build
./autogen.sh
%configure
make %{?_smp_mflags} V=1
export revision=1
if [ ! -e configure ] && [ -e autogen.sh ]; then
VMA_RELEASE=1 ./autogen.sh
fi
%configure %{?configure_options}
%{make_build}
%install
%make_install mydoc_DATA=
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
%{make_install}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
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.*
#libvma.so in needed in the main package so that
#'LD_PRELOAD=libvma.so <command>' works.
%{_libdir}/%{name}.so
%{_sbindir}/vma
%{_sbindir}/vmad
%{_unitdir}/vma.service
%license COPYING LICENSE
%doc README.txt journal.txt VMA_VERSION
%{_libdir}/%{name}.so*
%dir %{_pkgdocdir}
%doc %{_pkgdocdir}/README.txt
%doc %{_pkgdocdir}/journal.txt
%doc %{_pkgdocdir}/VMA_VERSION
%config(noreplace) %{_sysconfdir}/libvma.conf
%config(noreplace) %{_sysconfdir}/security/limits.d/30-libvma-limits.conf
%{_sbindir}/vmad
%{_prefix}/lib/systemd/system/vma.service
%license COPYING LICENSE
%{_mandir}/man7/vma.*
%{_mandir}/man8/vmad.*
%files devel
%{_includedir}/*
%dir %{_includedir}/mellanox
%{_includedir}/mellanox/vma_extra.h
%files utils
%{_bindir}/vma_stats
%{_mandir}/man8/vma_stats.*
%changelog
* Thu Feb 04 2021 Honggang Li <honli@redhat.com> - 9.2.2-2
- Skip team interface when check bonding
- Resolves: rhbz#1916670
* Wed Dec 16 2020 Honggang Li <honli@redhat.com> - 9.2.2-1
- Update to upstream v9.2.2 release
- Resolves: rhbz#1851727
* Wed Apr 15 2020 Honggang Li <honli@redhat.com> - 9.0.2-1
- Update to upstream v9.0.2 release
- Resolves: rhbz#1789385