Accepting request 540247 from home:NMoreyChaisemartin:branches:science:HPC
- Backport upstream patches * bnxt_re-lib-fix-the-memory-barrier-call-during-poll-cq.patch Fix memory ordering issue * bnxt_re-lib-increment-psn-in-case-of-0-length-packets.patch Fix PSN getting out of sync when sending 0 length packet * verbs-Do-not-block-QP-attr_masks-used-by-older-kernels.patch Fix bits detection to allow RDMA CM to work on older kernsl - Refresh older patches to include commit logs: * 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/540247 OBS-URL: https://build.opensuse.org/package/show/science:HPC/rdma-core?expand=0&rev=59
This commit is contained in:
parent
f33a17a320
commit
6c79bc4c77
33
bnxt_re-lib-fix-the-memory-barrier-call-during-poll-cq.patch
Normal file
33
bnxt_re-lib-fix-the-memory-barrier-call-during-poll-cq.patch
Normal file
@ -0,0 +1,33 @@
|
||||
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)
|
29
bnxt_re-lib-increment-psn-in-case-of-0-length-packets.patch
Normal file
29
bnxt_re-lib-increment-psn-in-case-of-0-length-packets.patch
Normal file
@ -0,0 +1,29 @@
|
||||
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;
|
@ -1,3 +1,37 @@
|
||||
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
|
||||
|
@ -1,3 +1,31 @@
|
||||
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
|
||||
|
@ -1,3 +1,22 @@
|
||||
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
|
||||
|
@ -1,3 +1,13 @@
|
||||
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
|
||||
|
@ -1,3 +1,20 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 9 13:34:40 UTC 2017 - nmoreychaisemartin@suse.com
|
||||
|
||||
- Backport upstream patches
|
||||
* bnxt_re-lib-fix-the-memory-barrier-call-during-poll-cq.patch
|
||||
Fix memory ordering issue
|
||||
* bnxt_re-lib-increment-psn-in-case-of-0-length-packets.patch
|
||||
Fix PSN getting out of sync when sending 0 length packet
|
||||
* verbs-Do-not-block-QP-attr_masks-used-by-older-kernels.patch
|
||||
Fix bits detection to allow RDMA CM to work on older kernsl
|
||||
|
||||
- Refresh older patches to include commit logs:
|
||||
* 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
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 8 14:05:44 UTC 2017 - nmoreychaisemartin@suse.com
|
||||
|
||||
|
@ -54,6 +54,9 @@ Patch0: ibacm-Incorrect-usage-of-BE-byte-order-of-MLID-attach-detach_mca
|
||||
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
|
||||
@ -319,6 +322,9 @@ on those changes.
|
||||
%patch1
|
||||
%patch2
|
||||
%patch3
|
||||
%patch4
|
||||
%patch5
|
||||
%patch6
|
||||
|
||||
%build
|
||||
|
||||
|
64
verbs-Do-not-block-QP-attr_masks-used-by-older-kernels.patch
Normal file
64
verbs-Do-not-block-QP-attr_masks-used-by-older-kernels.patch
Normal file
@ -0,0 +1,64 @@
|
||||
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,
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user