From da8fb38d97f8321e7ce929b0d9d571e6b7595fb1a4f949e0afdfbf66b9c3f233 Mon Sep 17 00:00:00 2001 From: Nicolas Morey-Chaisemartin Date: Tue, 28 Nov 2017 16:39:19 +0000 Subject: [PATCH] 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 --- _service | 2 +- ...e-memory-barrier-call-during-poll-cq.patch | 33 ---------- ...ment-psn-in-case-of-0-length-packets.patch | 29 --------- ...ed-for-subnet-list-causes-a-segfault.patch | 49 -------------- ...te-order-of-MLID-attach-detach_mcast.patch | 50 --------------- ...t_port-ignore-sysfs-rate-file-errors.patch | 33 ---------- libqedr-fix-inline-data-copy.patch | 23 ------- rdma-core-15.0.dc927a03.tar.gz | 3 - rdma-core-15.1.0.6ade95ef.tar.gz | 3 + rdma-core.changes | 27 ++++++++ rdma-core.spec | 31 +++++---- ...-QP-attr_masks-used-by-older-kernels.patch | 64 ------------------- 12 files changed, 46 insertions(+), 301 deletions(-) delete mode 100644 bnxt_re-lib-fix-the-memory-barrier-call-during-poll-cq.patch delete mode 100644 bnxt_re-lib-increment-psn-in-case-of-0-length-packets.patch delete mode 100644 ibacm-Incorrect-list-used-for-subnet-list-causes-a-segfault.patch delete mode 100644 ibacm-Incorrect-usage-of-BE-byte-order-of-MLID-attach-detach_mcast.patch delete mode 100644 libibumad-umad.c-In-get_port-ignore-sysfs-rate-file-errors.patch delete mode 100644 libqedr-fix-inline-data-copy.patch delete mode 100644 rdma-core-15.0.dc927a03.tar.gz create mode 100644 rdma-core-15.1.0.6ade95ef.tar.gz delete mode 100644 verbs-Do-not-block-QP-attr_masks-used-by-older-kernels.patch diff --git a/_service b/_service index 97d62c2..d477b3b 100644 --- a/_service +++ b/_service @@ -8,7 +8,7 @@ @PARENT_TAG@.@TAG_OFFSET@.%h v(.*) \1 - dc927a0380346c7857f005b8ff3747a6a42ecdb0 + 6ade95efedf3099cacf05928ae7aa874f9e5c61d suse/rdma-core.spec diff --git a/bnxt_re-lib-fix-the-memory-barrier-call-during-poll-cq.patch b/bnxt_re-lib-fix-the-memory-barrier-call-during-poll-cq.patch deleted file mode 100644 index 37746fd..0000000 --- a/bnxt_re-lib-fix-the-memory-barrier-call-during-poll-cq.patch +++ /dev/null @@ -1,33 +0,0 @@ -commit e3609c2c453fc3198a759db17d660f04781f8583 -Author: Devesh Sharma -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 - -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) diff --git a/bnxt_re-lib-increment-psn-in-case-of-0-length-packets.patch b/bnxt_re-lib-increment-psn-in-case-of-0-length-packets.patch deleted file mode 100644 index 5c83dd2..0000000 --- a/bnxt_re-lib-increment-psn-in-case-of-0-length-packets.patch +++ /dev/null @@ -1,29 +0,0 @@ -commit 093dadc78984c9e44ea1c86ca4527a592a42417e -Author: Devesh Sharma -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 - -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; diff --git a/ibacm-Incorrect-list-used-for-subnet-list-causes-a-segfault.patch b/ibacm-Incorrect-list-used-for-subnet-list-causes-a-segfault.patch deleted file mode 100644 index 52a1f7f..0000000 --- a/ibacm-Incorrect-list-used-for-subnet-list-causes-a-segfault.patch +++ /dev/null @@ -1,49 +0,0 @@ -commit e733db47760bcdb59d8296fecc4e06c7d451712b -Author: Michael J. Ruhl -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 - Signed-off-by: Michael J. Ruhl - -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); - } - } - } diff --git a/ibacm-Incorrect-usage-of-BE-byte-order-of-MLID-attach-detach_mcast.patch b/ibacm-Incorrect-usage-of-BE-byte-order-of-MLID-attach-detach_mcast.patch deleted file mode 100644 index 9adf40b..0000000 --- a/ibacm-Incorrect-usage-of-BE-byte-order-of-MLID-attach-detach_mcast.patch +++ /dev/null @@ -1,50 +0,0 @@ -commit ed6a98208e04be9401eb727b57e78a29eecbe660 -Author: Michael J. Ruhl -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 - Signed-off-by: Michael J. Ruhl - -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; - } diff --git a/libibumad-umad.c-In-get_port-ignore-sysfs-rate-file-errors.patch b/libibumad-umad.c-In-get_port-ignore-sysfs-rate-file-errors.patch deleted file mode 100644 index beff378..0000000 --- a/libibumad-umad.c-In-get_port-ignore-sysfs-rate-file-errors.patch +++ /dev/null @@ -1,33 +0,0 @@ -commit 1da6cfac736285ac822b1f48aec327ce42822356 -Author: Hal Rosenstock -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 - - Signed-off-by: Hal Rosenstock - -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; - diff --git a/libqedr-fix-inline-data-copy.patch b/libqedr-fix-inline-data-copy.patch deleted file mode 100644 index 3f2da20..0000000 --- a/libqedr-fix-inline-data-copy.patch +++ /dev/null @@ -1,23 +0,0 @@ -commit 774d9d7a17606ffc37bb43b87130c4f177de8e25 -Author: Ram Amrani -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 - -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); - } - diff --git a/rdma-core-15.0.dc927a03.tar.gz b/rdma-core-15.0.dc927a03.tar.gz deleted file mode 100644 index e773c2f..0000000 --- a/rdma-core-15.0.dc927a03.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:810fa06bea669828c87e3041cf395d7ea1333ae963cfaead7c66dcf91362db3e -size 908793 diff --git a/rdma-core-15.1.0.6ade95ef.tar.gz b/rdma-core-15.1.0.6ade95ef.tar.gz new file mode 100644 index 0000000..cde57b5 --- /dev/null +++ b/rdma-core-15.1.0.6ade95ef.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5dd3c9fa87193176014e2c7ef1b0a13069fe46e31d0834c0e3e631a9ea24bf85 +size 1027245 diff --git a/rdma-core.changes b/rdma-core.changes index b0b58de..2623203 100644 --- a/rdma-core.changes +++ b/rdma-core.changes @@ -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 diff --git a/rdma-core.spec b/rdma-core.spec index 500f77f..a17012f 100644 --- a/rdma-core.spec +++ b/rdma-core.spec @@ -17,9 +17,9 @@ %bcond_without systemd -%define git_ver .0.dc927a03 +%define git_ver .0.6ade95ef Name: rdma-core -Version: 15 +Version: 15.1 Release: 0 Summary: RDMA core userspace libraries and daemons License: GPL-2.0 or BSD-2-Clause @@ -50,17 +50,11 @@ Group: Productivity/Networking/Other Url: https://github.com/linux-rdma/rdma-core Source: rdma-core-%{version}%{git_ver}.tar.gz 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: cmake >= 2.8.11 BuildRequires: gcc BuildRequires: pkgconfig +BuildRequires: python3-base BuildRequires: pkgconfig(libsystemd) BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(systemd) @@ -84,9 +78,21 @@ Obsoletes: rdma < %{version} Provides: 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 %{with curlmini} BuildRequires: curl-mini %endif +%endif # Tumbleweed's cmake RPM macro adds -Wl,--no-undefined to the module flags # which is totally inappropriate and breaks building 'ENABLE_EXPORTS' style @@ -318,13 +324,6 @@ on those changes. %prep %setup -q -n %{name}-%{version}%{git_ver} -%patch0 -%patch1 -%patch2 -%patch3 -%patch4 -%patch5 -%patch6 %build diff --git a/verbs-Do-not-block-QP-attr_masks-used-by-older-kernels.patch b/verbs-Do-not-block-QP-attr_masks-used-by-older-kernels.patch deleted file mode 100644 index ed80fbe..0000000 --- a/verbs-Do-not-block-QP-attr_masks-used-by-older-kernels.patch +++ /dev/null @@ -1,64 +0,0 @@ -commit a5d774e8d247ebcdabe3e450abadfb659d2ae47a -Author: Jason Gunthorpe -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 - Signed-off-by: Jason Gunthorpe - -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, - }; -