Accepting request 616703 from home:NMoreyChaisemartin:branches:science:HPC

- Update to rdma-core v18.1
  * Fix compilation issue with recent glibc
- Drop Remove-the-obsolete-libibcm-library.patch and
  umad-Do-not-check-for-umad-sysfs-files-in-umad_init.patch as they were
  fixed upstream.

OBS-URL: https://build.opensuse.org/request/show/616703
OBS-URL: https://build.opensuse.org/package/show/science:HPC/rdma-core?expand=0&rev=90
This commit is contained in:
Nicolas Morey-Chaisemartin 2018-06-14 06:35:06 +00:00 committed by Git OBS Bridge
parent 53c8fb405b
commit 1834a056c9
7 changed files with 20 additions and 3055 deletions

File diff suppressed because it is too large Load Diff

View File

@ -8,7 +8,7 @@
<param name="versionformat">@PARENT_TAG@.@TAG_OFFSET@.%h</param>
<param name="versionrewrite-pattern">v(.*)</param>
<param name="versionrewrite-replacement">\1</param>
<param name="revision">8745c05f4fca7fe33c96c9a18964bdd88a907c94</param>
<param name="revision">1f4780139d626c9d5cdd8386edf76a1c0043741e</param>
<param name="extract">suse/rdma-core.spec</param>
</service>
<service name="recompress" mode="disabled">

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:927991025f160d74d35025e3d3218bfe52be3e5e276c2507ac429da3f2a6de6a
size 1062702

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:28e196e8ef6675e0533b7e6be8bf8c5e2b558894f59d9cca4f3d2755cc415fb4
size 1107295

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Tue Jun 12 10:40:32 UTC 2018 - nmoreychaisemartin@suse.com
- Update to rdma-core v18.1
* Fix compilation issue with recent glibc
- Drop Remove-the-obsolete-libibcm-library.patch and
umad-Do-not-check-for-umad-sysfs-files-in-umad_init.patch as they were
fixed upstream.
-------------------------------------------------------------------
Tue Jun 12 05:47:18 UTC 2018 - nmoreychaisemartin@suse.com

View File

@ -17,9 +17,9 @@
%bcond_without systemd
%define git_ver .0.8745c05f4fca
%define git_ver .0.1f4780139d62
Name: rdma-core
Version: 16.5
Version: 18.1
Release: 0
Summary: RDMA core userspace libraries and daemons
License: GPL-2.0-only OR BSD-2-Clause
@ -48,11 +48,10 @@ Group: Productivity/Networking/Other
Url: https://github.com/linux-rdma/rdma-core
Source: rdma-core-%{version}%{git_ver}.tar.gz
Source1: baselibs.conf
Patch0: Remove-the-obsolete-libibcm-library.patch
Patch1: umad-Do-not-check-for-umad-sysfs-files-in-umad_init.patch
BuildRequires: binutils
BuildRequires: cmake >= 2.8.11
BuildRequires: gcc
BuildRequires: pandoc
BuildRequires: pkgconfig
BuildRequires: python3-base
BuildRequires: pkgconfig(libsystemd)
@ -315,8 +314,6 @@ on those changes.
%prep
%setup -q -n %{name}-%{version}%{git_ver}
%patch0
%patch1
%build
@ -326,6 +323,8 @@ on those changes.
%define _rundir /var/run
%endif
%{!?EXTRA_CMAKE_FLAGS: %define EXTRA_CMAKE_FLAGS %{nil}}
# Pass all of the rpm paths directly to GNUInstallDirs and our other defines.
%cmake %{CMAKE_FLAGS} \
-DCMAKE_MODULE_LINKER_FLAGS="-Wl,--as-needed -Wl,-z,now" \
@ -345,7 +344,8 @@ on those changes.
-DCMAKE_INSTALL_INITDDIR:PATH=%{_initddir} \
-DCMAKE_INSTALL_RUNDIR:PATH=%{_rundir} \
-DCMAKE_INSTALL_DOCDIR:PATH=%{_docdir}/%{name}-%{version} \
-DCMAKE_INSTALL_UDEV_RULESDIR:PATH=%{_udevrulesdir}
-DCMAKE_INSTALL_UDEV_RULESDIR:PATH=%{_udevrulesdir} \
%{EXTRA_CMAKE_FLAGS}
%make_jobs
%install

View File

@ -1,158 +0,0 @@
commit e326c6065d8daa51189abc84a968e0da7b0c2394
Author: Jason Gunthorpe <jgg@mellanox.com>
Date: Thu Apr 5 11:04:14 2018 -0600
umad: Do not check for umad sysfs files in umad_init
Now that we don't load the umad module if the HW doesn't use it (eg
for roce only hardware) umad_init is failing to read the ABI version
from the kernel.
Applications still want to use some libibumad services that are not
related to the char device, so move the version check to umad_open_port
instead.
Backport from:
* abf72057c277 (umad: Do not check for umad sysfs files in umad_init)
* c4b883dd49ae (libibumad/man/umad_init.3.md: Trivial punctuation changes)
* b19fb6d4194e (libibumad/man/umad_open_port.3: Update return values)
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
diff --git libibumad/man/umad_init.3 libibumad/man/umad_init.3
index 64366b9de7e4..32c41a9e9878 100644
--- libibumad/man/umad_init.3
+++ libibumad/man/umad_init.3
@@ -13,26 +13,23 @@ umad_init, umad_done \- perform library initialization and finalization
.BI "int umad_done(void);
.fi
.SH "DESCRIPTION"
-.B umad_init()
-initializes the umad library for use. Must be called before any
-other call to this library.
-.PP
-.B umad_done()
-finalizes the use of the umad library.
+.B umad_init(), umad_done()
+do nothing.
.SH "RETURN VALUE"
+Always 0.
+.SH "COMPATIBILITY"
+For compatibility applications should continue to call
.B umad_init()
-and
-.B umad_done()
-return 0 on success, and \-1 on error.
-Error is returned from
+, and check the return code, prior to calling other
+.B umad_
+functions.
+.PP
+If
.B umad_init()
-if infiniband umad
-can\'t be opened, or the abi version doesn\'t match.
-There are no errors currently returned by
-.B umad_done().
-.SH "NOTES"
-If an error occurs during the library initialization, no further use of the
-umad library should be attempted.
+returns an error, then no further use of the umad library
+should be attempted.
+If an error occurs during the library initialization,
+no further use of the umad library should be attempted.
.SH "AUTHORS"
.TP
Hal Rosenstock <halr@voltaire.com>
diff --git libibumad/man/umad_open_port.3 libibumad/man/umad_open_port.3
index cac01a71026b..bd7026be39c0 100644
--- libibumad/man/umad_open_port.3
+++ libibumad/man/umad_open_port.3
@@ -24,11 +24,12 @@ for details).
.SH "RETURN VALUE"
.B umad_open_port()
returns 0 or an unique positive value of umad device descriptor on success, and a negative value on error as follows:
- -ENODEV IB device can\'t be resolved
- -EINVAL port is not valid (bad
+ -EOPNOTSUPP ABI version doesn\'t match
+ -ENODEV IB device can\'t be resolved
+ -EINVAL port is not valid (bad
.I portnum\fR
or no umad device)
- -EIO umad device for this port can\'t be opened
+ -EIO umad device for this port can\'t be opened
.SH "SEE ALSO"
.BR umad_close_port (3),
.BR umad_get_cas_names (3),
diff --git libibumad/umad.c libibumad/umad.c
index dcb2c6809eb1..08efb089d990 100644
--- libibumad/umad.c
+++ libibumad/umad.c
@@ -90,9 +90,31 @@ static int umaddebug = 0;
static const char *def_ca_name = "mthca0";
static int def_ca_port = 1;
-static unsigned abi_version;
static unsigned new_user_mad_api;
+static unsigned int get_abi_version(void)
+{
+ static unsigned int abi_version;
+
+ if (abi_version != 0)
+ return abi_version & 0x7FFFFFFF;
+
+ if (sys_read_uint(IB_UMAD_ABI_DIR, IB_UMAD_ABI_FILE, &abi_version) <
+ 0) {
+ IBWARN("can't read ABI version from %s/%s (%m): is ib_umad module loaded?",
+ IB_UMAD_ABI_DIR, IB_UMAD_ABI_FILE);
+ abi_version = 1 << 31;
+ return 0;
+ }
+
+ if (abi_version < IB_UMAD_ABI_VERSION) {
+ abi_version = 1 << 31;
+ return 0;
+ }
+
+ return abi_version;
+}
+
/*************************************
* Port
*/
@@ -502,19 +524,6 @@ static int dev_to_umad_id(const char *dev, unsigned port)
int umad_init(void)
{
TRACE("umad_init");
- if (sys_read_uint(IB_UMAD_ABI_DIR, IB_UMAD_ABI_FILE, &abi_version) < 0) {
- IBWARN
- ("can't read ABI version from %s/%s (%m): is ib_umad module loaded?",
- IB_UMAD_ABI_DIR, IB_UMAD_ABI_FILE);
- return -1;
- }
- if (abi_version < IB_UMAD_ABI_VERSION) {
- IBWARN
- ("wrong ABI version: %s/%s is %d but library minimal ABI is %d",
- IB_UMAD_ABI_DIR, IB_UMAD_ABI_FILE, abi_version,
- IB_UMAD_ABI_VERSION);
- return -1;
- }
return 0;
}
@@ -618,9 +627,13 @@ int umad_open_port(const char *ca_name, int portnum)
{
char dev_file[UMAD_DEV_FILE_SZ];
int umad_id, fd;
+ unsigned int abi_version = get_abi_version();
TRACE("ca %s port %d", ca_name, portnum);
+ if (!abi_version)
+ return -EOPNOTSUPP;
+
if (!(ca_name = resolve_ca_name(ca_name, &portnum)))
return -ENODEV;