- 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
65 lines
2.2 KiB
Diff
65 lines
2.2 KiB
Diff
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,
|
|
};
|
|
|