]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
rds: RDS diagnostics when connections are stuck in Receiver Not Ready state.
authorhui.han <hui.han@oracle.com>
Fri, 29 Sep 2017 08:44:21 +0000 (16:44 +0800)
committerChuck Anderson <chuck.anderson@oracle.com>
Fri, 6 Oct 2017 03:47:17 +0000 (20:47 -0700)
    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 <hui.han@oracle.com>
Reviewed-by: Venkat Venkatsubra <venkat.x.venkatsubra@oracle.com>
include/uapi/linux/rds.h
net/rds/ib.c

index ce93edb7a1f979ec9f953a8fe314407d3b81694b..219c84630919a2173bb5a2e1f690da7606294ad2 100644 (file)
@@ -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;
+
 };
 
 /*
index bccffbc12e97d397a2ae0dbc1e9e0c792dfbcac2..e6b143aa7addae4d0bc50752677468e4d0246578 100644 (file)
@@ -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 =