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

- Update to rdma-core v15.1
 * Backport CI checks on centos/SUSE from master
 * Stable ABI auto checks
 * Backport fixes:
   * verbs: Do not block QP attr_masks used by older kernels
   * libibumad/umad.c: In get_port, ignore sysfs rate file errors
   * bnxt_re/lib: fix the memory barrier call during poll-cq
   * bnxt_re/lib: increment psn in case of 0 length packets
   * libqedr: fix inline data copy
   * verbs: Fix declaration of C++ include file in C-block
   * verbs: Fix C++ compilation break
   * verbs: fix compilation error with ICC
   * hns: Fix create QP structure layout
   * ibacm: Incorrect list used for subnet list causes a segfault
   * ibacm: Incorrect usage of BE byte order of MLID attach/detach_mcast()
- Remove patches that were merged to v15.1:
 * bnxt_re-lib-fix-the-memory-barrier-call-during-poll-cq.patch
 * bnxt_re-lib-increment-psn-in-case-of-0-length-packets.patch
 * ibacm-Incorrect-list-used-for-subnet-list-causes-a-segfault.patch
 * ibacm-Incorrect-usage-of-BE-byte-order-of-MLID-attach-detach_mcast.patch
 * libibumad-umad.c-In-get_port-ignore-sysfs-rate-file-errors.patch
 * libqedr-fix-inline-data-copy.patch

OBS-URL: https://build.opensuse.org/request/show/546262
OBS-URL: https://build.opensuse.org/package/show/science:HPC/rdma-core?expand=0&rev=61
This commit is contained in:
Nicolas Morey-Chaisemartin 2017-11-28 16:39:19 +00:00 committed by Git OBS Bridge
parent 6c79bc4c77
commit da8fb38d97
12 changed files with 46 additions and 301 deletions

View File

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

View File

@ -1,33 +0,0 @@
commit e3609c2c453fc3198a759db17d660f04781f8583
Author: Devesh Sharma <devesh.sharma@broadcom.com>
Date: Thu Nov 9 02:31:58 2017 -0500
bnxt_re/lib: fix the memory barrier call during poll-cq
Putting a read barrier before issuing a read on valid bit
is incorrect. When checking for the validity of CQE in the
CQ buffer the code must wait for the read-barrier to finish
after issuing a read operation on CQE valid bit.
Signed-off-by: Devesh Sharma <devesh.sharma@broadcom.com>
diff --git providers/bnxt_re/main.h providers/bnxt_re/main.h
index 9688fec6..82c89484 100644
--- providers/bnxt_re/main.h
+++ providers/bnxt_re/main.h
@@ -366,9 +366,13 @@ static inline uint8_t bnxt_re_to_ibv_wc_status(uint8_t bnxt_wcst,
static inline uint8_t bnxt_re_is_cqe_valid(struct bnxt_re_cq *cq,
struct bnxt_re_bcqe *hdr)
{
+ uint8_t valid = 0;
+
+ valid = ((le32toh(hdr->flg_st_typ_ph) &
+ BNXT_RE_BCQE_PH_MASK) == cq->phase);
udma_from_device_barrier();
- return ((le32toh(hdr->flg_st_typ_ph) &
- BNXT_RE_BCQE_PH_MASK) == cq->phase);
+
+ return valid;
}
static inline void bnxt_re_change_cq_phase(struct bnxt_re_cq *cq)

View File

@ -1,29 +0,0 @@
commit 093dadc78984c9e44ea1c86ca4527a592a42417e
Author: Devesh Sharma <devesh.sharma@broadcom.com>
Date: Thu Nov 9 02:42:29 2017 -0500
bnxt_re/lib: increment psn in case of 0 length packets
If application posts a 0 length packet, post send routine
is skipping to increment the psn number. This will cause
PSN number to go out of sync and eventually connection would
terminate due to sequence error.
post_send routine must increment the psn number by 1 even
for zero length packets.
Signed-off-by: Devesh Sharma <devesh.sharma@broadcom.com>
diff --git providers/bnxt_re/verbs.c providers/bnxt_re/verbs.c
index 4d9b044a..9d4e02bb 100644
--- providers/bnxt_re/verbs.c
+++ providers/bnxt_re/verbs.c
@@ -1048,6 +1048,8 @@ static void bnxt_re_fill_psns(struct bnxt_re_qp *qp, struct bnxt_re_psns *psns,
pkt_cnt = (len / qp->mtu);
if (len % qp->mtu)
pkt_cnt++;
+ if (len == 0)
+ pkt_cnt = 1;
nxt_psn = ((qp->sq_psn + pkt_cnt) & BNXT_RE_PSNS_NPSN_MASK);
psns->flg_npsn = htole32(nxt_psn);
qp->sq_psn = nxt_psn;

View File

@ -1,49 +0,0 @@
commit e733db47760bcdb59d8296fecc4e06c7d451712b
Author: Michael J. Ruhl <michael.j.ruhl@intel.com>
Date: Mon Oct 16 10:24:40 2017 -0400
ibacm: Incorrect list used for subnet list causes a segfault
Setting the provider keyword in the ibacm_opts.cfg file to something
other than 'default' will cause ibacm to segfault on startup:
ibacm[32739]: segfault at 302e40 ip 000000000040432d
sp 00007ffe4039e1c0 error 4 in ibacm[400000+c000]
To re-produce the segfault, change the provider keyword in
ibacm_opts.cfg from:
provider ibacmp default
to:
provider ibacmp 0xFE80000000000000
When adding subnets to a provider subnet list, the incorrect list is
used. The list used is the provider_list (list of all providers)
rather than the (specific) provider subnet list.
This corrupts the provider_list, and causes ibacm to crash with the
above segfault.
Use the correct list when adding subnet information to a provider.
Fixes: 26e05f8304a506 ("ibacm: use ccan/list.h")
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
diff --git ibacm/src/acm.c ibacm/src/acm.c
index 367a43fe..9367fe89 100644
--- ibacm/src/acm.c
+++ ibacm/src/acm.c
@@ -2585,8 +2585,8 @@ static void acm_load_prov_config(void)
return;
}
subnet->subnet_prefix = htobe64(prefix);
- list_add_after(&provider_list, &prov->entry,
- &subnet->entry);
+ list_add_tail(&prov->subnet_list,
+ &subnet->entry);
}
}
}

View File

@ -1,50 +0,0 @@
commit ed6a98208e04be9401eb727b57e78a29eecbe660
Author: Michael J. Ruhl <michael.j.ruhl@intel.com>
Date: Mon Oct 16 10:24:21 2017 -0400
ibacm: Incorrect usage of BE byte order of MLID attach/detach_mcast()
The MLID value passed to ibv_attach/detach_mcast() must be in host
byte order.
acmp.c incorrectly uses the big endian format when doing a multicast
attach/detach (join). Multicast packets are used to do name resolution
by the libibacmp library.
There are two possible results because of this issue.
If a kernel has commit 8561eae60ff9, the attach will fail with an
EINVAL. ibacm will log this as a failure during the multicast join.
If a kernel does not have commit 8561eae60ff9, the attach will
complete successfully. Packets sent to this address will be dropped
because the packet dlid value and the multicast address information
given by the attach will not match.
Update MLID usage to use the correct byte order.
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
diff --git ibacm/prov/acmp/src/acmp.c ibacm/prov/acmp/src/acmp.c
index aa784166..78d9a295 100644
--- ibacm/prov/acmp/src/acmp.c
+++ ibacm/prov/acmp/src/acmp.c
@@ -732,7 +732,7 @@ static void acmp_process_join_resp(struct acm_sa_mad *sa_mad)
acm_log(0, "ERROR - unable to create ah\n");
goto out;
}
- ret = ibv_attach_mcast(ep->qp, &mc_rec->mgid, mc_rec->mlid);
+ ret = ibv_attach_mcast(ep->qp, &dest->mgid, dest->av.dlid);
if (ret) {
acm_log(0, "ERROR - unable to attach QP to multicast group\n");
ibv_destroy_ah(dest->ah);
@@ -1429,7 +1429,7 @@ static void acmp_ep_join(struct acmp_ep *ep)
if (ep->mc_dest[0].state == ACMP_READY && ep->mc_dest[0].ah) {
ibv_detach_mcast(ep->qp, &ep->mc_dest[0].mgid,
- be16toh(ep->mc_dest[0].av.dlid));
+ ep->mc_dest[0].av.dlid);
ibv_destroy_ah(ep->mc_dest[0].ah);
ep->mc_dest[0].ah = NULL;
}

View File

@ -1,33 +0,0 @@
commit 1da6cfac736285ac822b1f48aec327ce42822356
Author: Hal Rosenstock <hal@mellanox.com>
Date: Tue Oct 31 14:05:42 2017 +0200
libibumad/umad.c: In get_port, ignore sysfs rate file errors
This can cause ibpanic in ibstat when width is not set properly
as can occur when QSPF is not plugged into port.
ibpanic: [7851] main: stat of IB device 'mlx5_1' failed: Invalid argument
It's caused by kernel sysfs.c:show_rate returning -EINVAL
and that error being treated as failure in umad.c:get_port.
With this change, Rate is displayed as 0 with ibstat for this scenario.
Tested by: Ghazale Hosseinabadi <ghazale.hosseinabadi@oracle.com>
Signed-off-by: Hal Rosenstock <hal@mellanox.com>
diff --git libibumad/umad.c libibumad/umad.c
index 535256e2..dcb2c680 100644
--- libibumad/umad.c
+++ libibumad/umad.c
@@ -150,8 +150,7 @@ static int get_port(const char *ca_name, const char *dir, int portnum, umad_port
goto clean;
if (sys_read_uint(port_dir, SYS_PORT_PHY_STATE, &port->phys_state) < 0)
goto clean;
- if (sys_read_uint(port_dir, SYS_PORT_RATE, &port->rate) < 0)
- goto clean;
+ sys_read_uint(port_dir, SYS_PORT_RATE, &port->rate);
if (sys_read_uint(port_dir, SYS_PORT_CAPMASK, &capmask) < 0)
goto clean;

View File

@ -1,23 +0,0 @@
commit 774d9d7a17606ffc37bb43b87130c4f177de8e25
Author: Ram Amrani <Ram.Amrani@cavium.com>
Date: Mon Oct 30 12:32:35 2017 +0200
libqedr: fix inline data copy
Advance target pointer during data copy.
Signed-off-by: Ram Amrani <Ram.Amrani@cavium.com>
diff --git providers/qedr/qelr_verbs.c providers/qedr/qelr_verbs.c
index 4a74c50e..7db0fb32 100644
--- providers/qedr/qelr_verbs.c
+++ providers/qedr/qelr_verbs.c
@@ -874,7 +874,7 @@ static void swap_wqe_data64(uint64_t *p)
__be64 *bep=(__be64 *)p;
int i;
- for (i = 0; i < ROCE_WQE_ELEM_SIZE / sizeof(uint64_t); i++, p++)
+ for (i = 0; i < ROCE_WQE_ELEM_SIZE / sizeof(uint64_t); i++, p++, bep++)
*bep = htobe64(*p);
}

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:810fa06bea669828c87e3041cf395d7ea1333ae963cfaead7c66dcf91362db3e
size 908793

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5dd3c9fa87193176014e2c7ef1b0a13069fe46e31d0834c0e3e631a9ea24bf85
size 1027245

View File

@ -1,3 +1,30 @@
-------------------------------------------------------------------
Tue Nov 28 15:56:40 UTC 2017 - nmoreychaisemartin@suse.com
- Update to rdma-core v15.1
* Backport CI checks on centos/SUSE from master
* Stable ABI auto checks
* Backport fixes:
* verbs: Do not block QP attr_masks used by older kernels
* libibumad/umad.c: In get_port, ignore sysfs rate file errors
* bnxt_re/lib: fix the memory barrier call during poll-cq
* bnxt_re/lib: increment psn in case of 0 length packets
* libqedr: fix inline data copy
* verbs: Fix declaration of C++ include file in C-block
* verbs: Fix C++ compilation break
* verbs: fix compilation error with ICC
* hns: Fix create QP structure layout
* ibacm: Incorrect list used for subnet list causes a segfault
* ibacm: Incorrect usage of BE byte order of MLID attach/detach_mcast()
- Remove patches that were merged to v15.1:
* bnxt_re-lib-fix-the-memory-barrier-call-during-poll-cq.patch
* bnxt_re-lib-increment-psn-in-case-of-0-length-packets.patch
* ibacm-Incorrect-list-used-for-subnet-list-causes-a-segfault.patch
* ibacm-Incorrect-usage-of-BE-byte-order-of-MLID-attach-detach_mcast.patch
* libibumad-umad.c-In-get_port-ignore-sysfs-rate-file-errors.patch
* libqedr-fix-inline-data-copy.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Nov 9 13:34:40 UTC 2017 - nmoreychaisemartin@suse.com Thu Nov 9 13:34:40 UTC 2017 - nmoreychaisemartin@suse.com

View File

@ -17,9 +17,9 @@
%bcond_without systemd %bcond_without systemd
%define git_ver .0.dc927a03 %define git_ver .0.6ade95ef
Name: rdma-core Name: rdma-core
Version: 15 Version: 15.1
Release: 0 Release: 0
Summary: RDMA core userspace libraries and daemons Summary: RDMA core userspace libraries and daemons
License: GPL-2.0 or BSD-2-Clause License: GPL-2.0 or BSD-2-Clause
@ -50,17 +50,11 @@ Group: Productivity/Networking/Other
Url: https://github.com/linux-rdma/rdma-core Url: https://github.com/linux-rdma/rdma-core
Source: rdma-core-%{version}%{git_ver}.tar.gz Source: rdma-core-%{version}%{git_ver}.tar.gz
Source1: baselibs.conf Source1: baselibs.conf
Patch0: ibacm-Incorrect-usage-of-BE-byte-order-of-MLID-attach-detach_mcast.patch
Patch1: ibacm-Incorrect-list-used-for-subnet-list-causes-a-segfault.patch
Patch2: libqedr-fix-inline-data-copy.patch
Patch3: libibumad-umad.c-In-get_port-ignore-sysfs-rate-file-errors.patch
Patch4: bnxt_re-lib-fix-the-memory-barrier-call-during-poll-cq.patch
Patch5: bnxt_re-lib-increment-psn-in-case-of-0-length-packets.patch
Patch6: verbs-Do-not-block-QP-attr_masks-used-by-older-kernels.patch
BuildRequires: binutils BuildRequires: binutils
BuildRequires: cmake >= 2.8.11 BuildRequires: cmake >= 2.8.11
BuildRequires: gcc BuildRequires: gcc
BuildRequires: pkgconfig BuildRequires: pkgconfig
BuildRequires: python3-base
BuildRequires: pkgconfig(libsystemd) BuildRequires: pkgconfig(libsystemd)
BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(systemd) BuildRequires: pkgconfig(systemd)
@ -84,9 +78,21 @@ Obsoletes: rdma < %{version}
Provides: ofed = %{version} Provides: ofed = %{version}
Obsoletes: ofed < %{version} Obsoletes: ofed < %{version}
# Trickery to handle both SUSE OpenBuild System and Manual build
# In OBS, rdma-core must use curl-mini instead of curl to avoid
# a build dependency loop:
# rdma-core -> cmake -> curl -> ... -> boost -> rdma-core
# Thus we force a BuildRequires to curl-mini which as no impact
# as it is not used during the build.
# However curl-mini is not a published RPM. This would prevent any build
# outside of OBS. Thus we add a bcond to allow manual build.
# To force build without the use of curl-mini, --without=curlmini
# should be passed to rpmbuild
%if 0%{?suse_version} >= 1330 %if 0%{?suse_version} >= 1330
%if %{with curlmini}
BuildRequires: curl-mini BuildRequires: curl-mini
%endif %endif
%endif
# Tumbleweed's cmake RPM macro adds -Wl,--no-undefined to the module flags # Tumbleweed's cmake RPM macro adds -Wl,--no-undefined to the module flags
# which is totally inappropriate and breaks building 'ENABLE_EXPORTS' style # which is totally inappropriate and breaks building 'ENABLE_EXPORTS' style
@ -318,13 +324,6 @@ on those changes.
%prep %prep
%setup -q -n %{name}-%{version}%{git_ver} %setup -q -n %{name}-%{version}%{git_ver}
%patch0
%patch1
%patch2
%patch3
%patch4
%patch5
%patch6
%build %build

View File

@ -1,64 +0,0 @@
commit a5d774e8d247ebcdabe3e450abadfb659d2ae47a
Author: Jason Gunthorpe <jgunthorpe@ziepe.ca>
Date: Tue Nov 7 10:30:08 2017 -0700
verbs: Do not block QP attr_masks used by older kernels
At least the RDMA CM in 4.3 will give user space structs with these bits
set. Those kernels require user space to pass those set bits back to the
kernel. Blocking them causes RDMA CM to be unusable on older kernels.
Fixes: 3ca7a1031486 ("ibverbs: Add support for packet pacing")
Reported-by: Ram Amrani <Ram.Amrani@cavium.com>
Signed-off-by: Jason Gunthorpe <jgunthorpe@ziepe.ca>
diff --git libibverbs/cmd.c libibverbs/cmd.c
index 9d2140fb..77aba334 100644
--- libibverbs/cmd.c
+++ libibverbs/cmd.c
@@ -1154,10 +1154,10 @@ int ibv_cmd_query_qp(struct ibv_qp *qp, struct ibv_qp_attr *attr,
struct ibv_query_qp_resp resp;
/*
- * Masks over IBV_QP_DEST_QPN are not supported by
- * that not extended command.
+ * Starting with IBV_QP_RATE_LIMIT the attribute must go through the
+ * _ex path.
*/
- if (attr_mask & ~((IBV_QP_DEST_QPN << 1) - 1))
+ if (attr_mask & ~(IBV_QP_RATE_LIMIT - 1))
return EOPNOTSUPP;
IBV_INIT_CMD_RESP(cmd, cmd_size, QUERY_QP, &resp, sizeof resp);
@@ -1324,10 +1324,10 @@ int ibv_cmd_modify_qp(struct ibv_qp *qp, struct ibv_qp_attr *attr,
struct ibv_modify_qp *cmd, size_t cmd_size)
{
/*
- * Masks over IBV_QP_DEST_QPN are only supported by
- * ibv_cmd_modify_qp_ex.
+ * Starting with IBV_QP_RATE_LIMIT the attribute must go through the
+ * _ex path.
*/
- if (attr_mask & ~((IBV_QP_DEST_QPN << 1) - 1))
+ if (attr_mask & ~(IBV_QP_RATE_LIMIT - 1))
return EOPNOTSUPP;
IBV_INIT_CMD(cmd, cmd_size, MODIFY_QP);
diff --git libibverbs/verbs.h libibverbs/verbs.h
index 8cdf8ab5..a6a9441d 100644
--- libibverbs/verbs.h
+++ libibverbs/verbs.h
@@ -861,6 +861,13 @@ enum ibv_qp_attr_mask {
IBV_QP_PATH_MIG_STATE = 1 << 18,
IBV_QP_CAP = 1 << 19,
IBV_QP_DEST_QPN = 1 << 20,
+ /* These bits were supported on older kernels, but never exposed from
+ libibverbs:
+ _IBV_QP_SMAC = 1 << 21,
+ _IBV_QP_ALT_SMAC = 1 << 22,
+ _IBV_QP_VID = 1 << 23,
+ _IBV_QP_ALT_VID = 1 << 24,
+ */
IBV_QP_RATE_LIMIT = 1 << 25,
};