Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

IB/ucm: Get rid of duplicate P_Key parameter

The P_Key is provided into a SIDR REQ in two places, once as a
parameter, and again in the path record. Remove the P_Key as a
parameter and always use the one given in the path record.

This change has no practical effect on ABI functionality.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>

authored by

Sean Hefty and committed by
Roland Dreier
75af9088 526b4caa

+3 -5
+1 -1
drivers/infiniband/core/cm.c
··· 2615 2615 cm_format_mad_hdr(&sidr_req_msg->hdr, CM_SIDR_REQ_ATTR_ID, 2616 2616 cm_form_tid(cm_id_priv, CM_MSG_SEQUENCE_SIDR)); 2617 2617 sidr_req_msg->request_id = cm_id_priv->id.local_id; 2618 - sidr_req_msg->pkey = cpu_to_be16(param->pkey); 2618 + sidr_req_msg->pkey = cpu_to_be16(param->path->pkey); 2619 2619 sidr_req_msg->service_id = param->service_id; 2620 2620 2621 2621 if (param->private_data && param->private_data_len)
-1
drivers/infiniband/core/ucm.c
··· 1044 1044 param.service_id = cmd.sid; 1045 1045 param.timeout_ms = cmd.timeout; 1046 1046 param.max_cm_retries = cmd.max_cm_retries; 1047 - param.pkey = cmd.pkey; 1048 1047 1049 1048 ctx = ib_ucm_ctx_get(file, cmd.id); 1050 1049 if (!IS_ERR(ctx)) {
+1 -2
include/rdma/ib_cm.h
··· 546 546 const void *private_data; 547 547 u8 private_data_len; 548 548 u8 max_cm_retries; 549 - u16 pkey; 550 549 }; 551 550 552 551 /** ··· 569 570 }; 570 571 571 572 /** 572 - * ib_send_cm_sidr_rep - Sends a service ID resolution request to the 573 + * ib_send_cm_sidr_rep - Sends a service ID resolution reply to the 573 574 * remote node. 574 575 * @cm_id: Communication identifier associated with the received service ID 575 576 * resolution request.
+1 -1
include/rdma/ib_user_cm.h
··· 200 200 __be64 sid; 201 201 __u64 data; 202 202 __u64 path; 203 - __u16 pkey; 203 + __u16 reserved_pkey; 204 204 __u8 len; 205 205 __u8 max_cm_retries; 206 206 __u8 reserved[4];