提交 de5dd81b 编写于 作者: S Steve Wise 提交者: Roland Dreier

RDMA/cxgb4: Export T4 TCP MIB

Signed-off-by: NSteve Wise <swise@opengridcomputing.com>
Signed-off-by: NRoland Dreier <rolandd@cisco.com>
上级 3160977a
...@@ -391,7 +391,17 @@ static ssize_t show_board(struct device *dev, struct device_attribute *attr, ...@@ -391,7 +391,17 @@ static ssize_t show_board(struct device *dev, struct device_attribute *attr,
static int c4iw_get_mib(struct ib_device *ibdev, static int c4iw_get_mib(struct ib_device *ibdev,
union rdma_protocol_stats *stats) union rdma_protocol_stats *stats)
{ {
return -ENOSYS; struct tp_tcp_stats v4, v6;
struct c4iw_dev *c4iw_dev = to_c4iw_dev(ibdev);
cxgb4_get_tcp_stats(c4iw_dev->rdev.lldi.pdev, &v4, &v6);
memset(stats, 0, sizeof *stats);
stats->iw.tcpInSegs = v4.tcpInSegs + v6.tcpInSegs;
stats->iw.tcpOutSegs = v4.tcpOutSegs + v6.tcpOutSegs;
stats->iw.tcpRetransSegs = v4.tcpRetransSegs + v6.tcpRetransSegs;
stats->iw.tcpOutRsts = v4.tcpOutRsts + v6.tcpOutSegs;
return 0;
} }
static DEVICE_ATTR(hw_rev, S_IRUGO, show_rev, NULL); static DEVICE_ATTR(hw_rev, S_IRUGO, show_rev, NULL);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册