提交 3ebeebc3 编写于 作者: K Kumar Sanghvi 提交者: Roland Dreier

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: NKumar Sanghvi <kumaras@chelsio.com>
Reviewed-by: NSteve Wise <swise@opengridcomputing.com>
Signed-off-by: NRoland Dreier <roland@purestorage.com>
上级 9595480c
...@@ -1340,6 +1340,8 @@ static int cma_iw_handler(struct iw_cm_id *iw_id, struct iw_cm_event *iw_event) ...@@ -1340,6 +1340,8 @@ static int cma_iw_handler(struct iw_cm_id *iw_id, struct iw_cm_event *iw_event)
switch (iw_event->status) { switch (iw_event->status) {
case 0: case 0:
event.event = RDMA_CM_EVENT_ESTABLISHED; event.event = RDMA_CM_EVENT_ESTABLISHED;
event.param.conn.initiator_depth = iw_event->ird;
event.param.conn.responder_resources = iw_event->ord;
break; break;
case -ECONNRESET: case -ECONNRESET:
case -ECONNREFUSED: case -ECONNREFUSED:
...@@ -1355,6 +1357,8 @@ static int cma_iw_handler(struct iw_cm_id *iw_id, struct iw_cm_event *iw_event) ...@@ -1355,6 +1357,8 @@ static int cma_iw_handler(struct iw_cm_id *iw_id, struct iw_cm_event *iw_event)
break; break;
case IW_CM_EVENT_ESTABLISHED: case IW_CM_EVENT_ESTABLISHED:
event.event = RDMA_CM_EVENT_ESTABLISHED; event.event = RDMA_CM_EVENT_ESTABLISHED;
event.param.conn.initiator_depth = iw_event->ird;
event.param.conn.responder_resources = iw_event->ord;
break; break;
default: default:
BUG_ON(1); BUG_ON(1);
...@@ -1445,8 +1449,8 @@ static int iw_conn_req_handler(struct iw_cm_id *cm_id, ...@@ -1445,8 +1449,8 @@ static int iw_conn_req_handler(struct iw_cm_id *cm_id,
event.event = RDMA_CM_EVENT_CONNECT_REQUEST; event.event = RDMA_CM_EVENT_CONNECT_REQUEST;
event.param.conn.private_data = iw_event->private_data; event.param.conn.private_data = iw_event->private_data;
event.param.conn.private_data_len = iw_event->private_data_len; event.param.conn.private_data_len = iw_event->private_data_len;
event.param.conn.initiator_depth = attr.max_qp_init_rd_atom; event.param.conn.initiator_depth = iw_event->ird;
event.param.conn.responder_resources = attr.max_qp_rd_atom; event.param.conn.responder_resources = iw_event->ord;
/* /*
* Protect against the user destroying conn_id from another thread * Protect against the user destroying conn_id from another thread
......
...@@ -52,8 +52,10 @@ struct iw_cm_event { ...@@ -52,8 +52,10 @@ struct iw_cm_event {
struct sockaddr_in local_addr; struct sockaddr_in local_addr;
struct sockaddr_in remote_addr; struct sockaddr_in remote_addr;
void *private_data; void *private_data;
u8 private_data_len;
void *provider_data; void *provider_data;
u8 private_data_len;
u8 ord;
u8 ird;
}; };
/** /**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册