Skip to content

Commit ab3964a

Browse files
haggaiedledford
authored andcommitted
IB/cma: Use inner P_Key to determine netdev
When discussing the patches to demux ids in rdma_cm instead of ib_cm, it was decided that it is best to use the P_Key value in the packet headers. However, the mlx5 and ipath drivers are currently unable to send correct P_Key values in GMP headers. They always send using a single P_Key that is set during the GSI QP initialization. Change the rdma_cm code to look at the P_Key value that is part of the packet payload as a workaround. Once the drivers are fixed this patch can be reverted. Fixes: 4c21b5b ("IB/cma: Add net_dev and private data checks to RDMA CM") Signed-off-by: Haggai Eran <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
1 parent 0174b38 commit ab3964a

File tree

1 file changed

+2
-2
lines changed
  • drivers/infiniband/core

1 file changed

+2
-2
lines changed

drivers/infiniband/core/cma.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,14 +1067,14 @@ static int cma_save_req_info(const struct ib_cm_event *ib_event,
10671067
sizeof(req->local_gid));
10681068
req->has_gid = true;
10691069
req->service_id = req_param->primary_path->service_id;
1070-
req->pkey = req_param->bth_pkey;
1070+
req->pkey = be16_to_cpu(req_param->primary_path->pkey);
10711071
break;
10721072
case IB_CM_SIDR_REQ_RECEIVED:
10731073
req->device = sidr_param->listen_id->device;
10741074
req->port = sidr_param->port;
10751075
req->has_gid = false;
10761076
req->service_id = sidr_param->service_id;
1077-
req->pkey = sidr_param->bth_pkey;
1077+
req->pkey = sidr_param->pkey;
10781078
break;
10791079
default:
10801080
return -EINVAL;

0 commit comments

Comments
 (0)