]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
RDS: add flow control info to rds_info_rdma_connection
authorWei Lin Guay <wei.lin.guay@oracle.com>
Wed, 27 Jan 2016 12:18:08 +0000 (13:18 +0100)
committerChuck Anderson <chuck.anderson@oracle.com>
Sun, 17 Apr 2016 21:50:15 +0000 (14:50 -0700)
Added per connection flow_ctl_post_credit and
flow_ctl_send_credit to rds-info. These info help
in debugging RDS IB flow control. The newly added
attributes are placed at the bottom of the data
structure to ensure backward compatibility.

Orabug: 22306628

Reviewed-by: HÃ¥kon Bugge <haakon.bugge@oracle.com>
Reviewed-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: Wei Lin Guay <wei.lin.guay@oracle.com>
include/uapi/linux/rds.h
net/rds/ib.c

index aa796039498d22c5a191d79715b056d3859ba8c2..902894edecc7f3fe527a4501f0c054ba4fb9c3f2 100644 (file)
@@ -244,6 +244,8 @@ struct rds_info_rdma_connection {
        uint8_t         sl;
        uint32_t        cache_allocs;
        uint32_t        frag;
+       uint16_t        flow_ctl_post_credit;
+       uint16_t        flow_ctl_send_credit;
 };
 
 /*
index fb05fd99ebd72587102a58cbb6902966a16b3ed5..fb232b1f49e8e3c78e3a75501a1081b4f5ad1a0c 100644 (file)
@@ -394,6 +394,10 @@ 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->flow_ctl_post_credit =
+                       IB_GET_POST_CREDITS(atomic_read(&ic->i_credits));
+               iinfo->flow_ctl_send_credit =
+                       IB_GET_SEND_CREDITS(atomic_read(&ic->i_credits));
                rds_ib_get_mr_info(rds_ibdev, iinfo);
                iinfo->cache_allocs = atomic_read(&ic->i_cache_allocs);
        }