aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/ucma.c
diff options
context:
space:
mode:
authorLeon Romanovsky <leonro@mellanox.com>2020-02-12 09:26:27 +0200
committerJason Gunthorpe <jgg@mellanox.com>2020-02-13 11:38:19 -0400
commitca750d4a9c426854e221ca404fbefeab9800134e (patch)
tree954162d6942c035fa564e443db6e375afc9d0c8c /drivers/infiniband/core/ucma.c
parentRDMA/siw: Fix setting active_mtu attribute (diff)
downloadlinux-dev-ca750d4a9c426854e221ca404fbefeab9800134e.tar.xz
linux-dev-ca750d4a9c426854e221ca404fbefeab9800134e.zip
RDMA/ucma: Mask QPN to be 24 bits according to IBTA
IBTA declares QPN as 24bits, mask input to ensure that kernel doesn't get higher bits and ensure by adding WANR_ONCE() that other CM users do the same. Link: https://lore.kernel.org/r/20200212072635.682689-2-leon@kernel.org Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/core/ucma.c')
-rw-r--r--drivers/infiniband/core/ucma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/core/ucma.c b/drivers/infiniband/core/ucma.c
index 0274e9b704be..57e68491a2fd 100644
--- a/drivers/infiniband/core/ucma.c
+++ b/drivers/infiniband/core/ucma.c
@@ -1045,7 +1045,7 @@ static void ucma_copy_conn_param(struct rdma_cm_id *id,
dst->retry_count = src->retry_count;
dst->rnr_retry_count = src->rnr_retry_count;
dst->srq = src->srq;
- dst->qp_num = src->qp_num;
+ dst->qp_num = src->qp_num & 0xFFFFFF;
dst->qkey = (id->route.addr.src_addr.ss_family == AF_IB) ? src->qkey : 0;
}