From 708e107cd0c17d070fba4ee4e9d813523e7ee928 Mon Sep 17 00:00:00 2001 From: "hui.han" Date: Fri, 29 Sep 2017 16:44:21 +0800 Subject: [PATCH] rds: RDS diagnostics when connections are stuck in Receiver Not Ready state. Orabug:26522310 Enhance diagnosabilty,when an RDS IB/CM connection gets into "Receiver Not Ready" state.These are the data added to the per-RDS/IB connection info that is currently displayed through rds-info: - w_alloc_ctr of the receive ring (struct rds_ib_work_ring) - w_free_ctr - qp_num number of the connection Signed-off-by: hui.han Reviewed-by: Venkat Venkatsubra --- include/uapi/linux/rds.h | 4 ++++ net/rds/ib.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/include/uapi/linux/rds.h b/include/uapi/linux/rds.h index ce93edb7a1f97..219c84630919a 100644 --- a/include/uapi/linux/rds.h +++ b/include/uapi/linux/rds.h @@ -245,6 +245,10 @@ struct rds_info_rdma_connection { uint32_t frag; uint16_t flow_ctl_post_credit; uint16_t flow_ctl_send_credit; + uint32_t qp_num; + uint32_t w_alloc_ctr; + uint32_t w_free_ctr; + }; /* diff --git a/net/rds/ib.c b/net/rds/ib.c index bccffbc12e97d..e6b143aa7adda 100644 --- a/net/rds/ib.c +++ b/net/rds/ib.c @@ -377,6 +377,9 @@ static int rds_ib_conn_info_visitor(struct rds_connection *conn, iinfo->max_send_wr = ic->i_send_ring.w_nr; iinfo->max_recv_wr = ic->i_recv_ring.w_nr; iinfo->max_send_sge = rds_ibdev->max_sge; + iinfo->qp_num = ic->i_cm_id->qp->qp_num; + iinfo->w_alloc_ctr = ic->i_recv_ring.w_alloc_ctr; + iinfo->w_free_ctr = (u32) atomic_read(&ic->i_recv_ring.w_free_ctr); iinfo->flow_ctl_post_credit = IB_GET_POST_CREDITS(atomic_read(&ic->i_credits)); iinfo->flow_ctl_send_credit = -- 2.50.1