[net-next][PATCH 18/18] RDS: IB: add missing connection cache usage info

From: Santosh Shilimkar
Date: Mon Dec 05 2016 - 02:00:40 EST


rds-tools already support it.

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@xxxxxxxxxx>
---
include/uapi/linux/rds.h | 1 +
net/rds/ib.c | 1 +
2 files changed, 2 insertions(+)

diff --git a/include/uapi/linux/rds.h b/include/uapi/linux/rds.h
index 3833113..410ae3c 100644
--- a/include/uapi/linux/rds.h
+++ b/include/uapi/linux/rds.h
@@ -183,6 +183,7 @@ struct rds_info_rdma_connection {
uint32_t max_send_sge;
uint32_t rdma_mr_max;
uint32_t rdma_mr_size;
+ uint32_t cache_allocs;
};

/* RDS message Receive Path Latency points */
diff --git a/net/rds/ib.c b/net/rds/ib.c
index 8d70884..b5e2699 100644
--- a/net/rds/ib.c
+++ b/net/rds/ib.c
@@ -313,6 +313,7 @@ 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->cache_allocs = atomic_read(&ic->i_cache_allocs);
rds_ib_get_mr_info(rds_ibdev, iinfo);
}
return 1;
--
1.9.1