Skip to content

Commit

Permalink
IB/cm: Expose service ID in request events
Browse files Browse the repository at this point in the history
Expose the service ID on an incoming CM or SIDR request to the event
handler. This will allow the RDMA CM module to de-multiplex connection
requests based on the information encoded in the service ID.

Acked-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Haggai Eran <haggaie@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
  • Loading branch information
Haggai Eran authored and Doug Ledford committed Aug 30, 2015
1 parent ddde896 commit 15865e7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/infiniband/core/cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1268,6 +1268,7 @@ static void cm_format_paths_from_req(struct cm_req_msg *req_msg,
primary_path->packet_life_time =
cm_req_get_primary_local_ack_timeout(req_msg);
primary_path->packet_life_time -= (primary_path->packet_life_time > 0);
primary_path->service_id = req_msg->service_id;

if (req_msg->alt_local_lid) {
memset(alt_path, 0, sizeof *alt_path);
Expand All @@ -1289,6 +1290,7 @@ static void cm_format_paths_from_req(struct cm_req_msg *req_msg,
alt_path->packet_life_time =
cm_req_get_alt_local_ack_timeout(req_msg);
alt_path->packet_life_time -= (alt_path->packet_life_time > 0);
alt_path->service_id = req_msg->service_id;
}
}

Expand Down Expand Up @@ -2992,6 +2994,7 @@ static void cm_format_sidr_req_event(struct cm_work *work,
param = &work->cm_event.param.sidr_req_rcvd;
param->pkey = __be16_to_cpu(sidr_req_msg->pkey);
param->listen_id = listen_id;
param->service_id = sidr_req_msg->service_id;
param->port = work->port->port_num;
work->cm_event.private_data = &sidr_req_msg->private_data;
}
Expand Down
1 change: 1 addition & 0 deletions include/rdma/ib_cm.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ struct ib_cm_apr_event_param {

struct ib_cm_sidr_req_event_param {
struct ib_cm_id *listen_id;
__be64 service_id;
u8 port;
u16 pkey;
};
Expand Down

0 comments on commit 15865e7

Please sign in to comment.