Skip to content

Commit 750999a

Browse files
RN97vijay-suman
authored andcommitted
rds/rdma: correctly assign the dest qp num in rds ib connection
Commit c9f739615de0 ("net/rds: Extract dest qp num for displaying in rds-info") assigns the dest qp num in rds ib connection during RDMA_CM_EVENT_ESTABLISHED event handling. This works good for active side of the connection. For passive side, the dest qp num is passed in the RDMA_CM_EVENT_CONNECT_REQUEST event. This patch adds the change that sets dest qp num in rds ib connection during RDMA_CM_EVENT_CONNECT_REQUEST event handling. Without this patch, the dest qp num on passive side is set to 0. We can observe this behavior in rds-info -I output. Fixes: c9f739615de0 ("net/rds: Extract dest qp num for displaying in rds-info") v1->v2: Addressed review comments on where to set dest qp num. Orabug: 34429467 Signed-off-by: Rohit Nair <[email protected]> Reviewed-by: Arumugam Kolappan <[email protected]>
1 parent 90ffff5 commit 750999a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

net/rds/ib_cm.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,8 @@ void rds_ib_cm_connect_complete(struct rds_connection *conn, struct rdma_cm_even
424424

425425
/* Save the qp number information in the connection details. */
426426
ic->i_qp_num = ic->i_cm_id->qp->qp_num;
427-
ic->i_dst_qp_num = event->param.conn.qp_num;
427+
if (event->param.conn.qp_num)
428+
ic->i_dst_qp_num = event->param.conn.qp_num;
428429

429430
rds_ib_cancel_cm_watchdog(ic, "connect complete");
430431

@@ -1880,6 +1881,8 @@ int rds_ib_cm_handle_connect(struct rdma_cm_id *cm_id,
18801881
event->param.conn.initiator_depth);
18811882
if (err)
18821883
reason = "rds_ib_cm_accept failed";
1884+
else if (event->param.conn.qp_num)
1885+
ic->i_dst_qp_num = event->param.conn.qp_num;
18831886
}
18841887

18851888
out:

0 commit comments

Comments
 (0)