Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 217726
b: refs/heads/master
c: de5dd81
h: refs/heads/master
v: v3
  • Loading branch information
Steve Wise authored and Roland Dreier committed Oct 23, 2010
1 parent 1af3928 commit 587fd91
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3160977a6e66ea4c4b4f33010f5d04f0004b938c
refs/heads/master: de5dd81b49c27c7818492be0746bfed6ac3b1c8d
12 changes: 11 additions & 1 deletion trunk/drivers/infiniband/hw/cxgb4/provider.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
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);
Expand Down

0 comments on commit 587fd91

Please sign in to comment.