Skip to content

Commit 3ebeebc

Browse files
Kumar Sanghvirolandd
authored andcommitted
RDMA/iwcm: Propagate ird/ord values upwards
Update struct iw_cm_event to support propagating the ird/ord values upwards to the application. Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com> Reviewed-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
1 parent 9595480 commit 3ebeebc

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

‎drivers/infiniband/core/cma.c‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1340,6 +1340,8 @@ static int cma_iw_handler(struct iw_cm_id *iw_id, struct iw_cm_event *iw_event)
13401340
switch (iw_event->status) {
13411341
case 0:
13421342
event.event = RDMA_CM_EVENT_ESTABLISHED;
1343+
event.param.conn.initiator_depth = iw_event->ird;
1344+
event.param.conn.responder_resources = iw_event->ord;
13431345
break;
13441346
case -ECONNRESET:
13451347
case -ECONNREFUSED:
@@ -1355,6 +1357,8 @@ static int cma_iw_handler(struct iw_cm_id *iw_id, struct iw_cm_event *iw_event)
13551357
break;
13561358
case IW_CM_EVENT_ESTABLISHED:
13571359
event.event = RDMA_CM_EVENT_ESTABLISHED;
1360+
event.param.conn.initiator_depth = iw_event->ird;
1361+
event.param.conn.responder_resources = iw_event->ord;
13581362
break;
13591363
default:
13601364
BUG_ON(1);
@@ -1445,8 +1449,8 @@ static int iw_conn_req_handler(struct iw_cm_id *cm_id,
14451449
event.event = RDMA_CM_EVENT_CONNECT_REQUEST;
14461450
event.param.conn.private_data = iw_event->private_data;
14471451
event.param.conn.private_data_len = iw_event->private_data_len;
1448-
event.param.conn.initiator_depth = attr.max_qp_init_rd_atom;
1449-
event.param.conn.responder_resources = attr.max_qp_rd_atom;
1452+
event.param.conn.initiator_depth = iw_event->ird;
1453+
event.param.conn.responder_resources = iw_event->ord;
14501454

14511455
/*
14521456
* Protect against the user destroying conn_id from another thread

‎include/rdma/iw_cm.h‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,10 @@ struct iw_cm_event {
5252
struct sockaddr_in local_addr;
5353
struct sockaddr_in remote_addr;
5454
void *private_data;
55-
u8 private_data_len;
5655
void *provider_data;
56+
u8 private_data_len;
57+
u8 ord;
58+
u8 ird;
5759
};
5860

5961
/**

0 commit comments

Comments
 (0)