linux-sg2042/drivers/infiniband/hw/cxgb4
Christoph Lameter b40f4757da IB/core: Make device counter infrastructure dynamic
In practice, each RDMA device has a unique set of counters that the
hardware implements.  Having a central set of counters that they must
all adhere to is limiting and causes many useful counters to not be
available.

Therefore we create a dynamic counter registration infrastructure.

The driver must implement a stats structure allocation routine, in
which the driver must place the directory name it wants, a list of
names for all of the counters, an array of u64 counters themselves,
plus a few generic configuration options.

We then implement a core routine to create a sysfs file for each
of the named stats elements, and a core routine to retrieve the
stats when any of the sysfs attribute files are read.

To avoid excessive beating on the stats generation routine in the
drivers, the core code also caches the stats for a short period of
time so that someone attempting to read all of the stats in a
given device's directory will not result in a stats generation
call per file read.

Future work will attempt to standardize just the shared stats
elements, and possibly add a method to get the stats via netlink
in addition to sysfs.

Signed-off-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Mark Bloch <markb@mellanox.com>
Reviewed-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
[ Add caching, make structure names more informative, add i40iw support,
  other significant rewrites from the original patch ]
2016-05-26 12:52:51 -04:00
..
Kconfig RDMA/cxgb4: Update Kconfig to include Chelsio T5 adapter 2014-04-28 17:29:41 -07:00
Makefile RDMA/cxgb4: Remove kfifo usage 2012-05-18 13:22:36 -07:00
cm.c iw_cxgb4: Convert a __force cast 2016-05-13 19:38:11 -04:00
cq.c RDMA/iw_cxgb4: Fix bar2 virt addr calculation for T4 chips 2016-04-26 12:47:09 -04:00
device.c Merge branches 'nes', 'cxgb4' and 'iwpm' into k.o/for-4.6 2016-03-16 13:57:43 -04:00
ev.c InfiniBand/RDMA changes for 3.20 merge window: 2015-02-21 12:53:21 -08:00
id_table.c drivers/infiniband/hw: rename random32() to prandom_u32() 2013-05-07 18:38:27 -07:00
iw_cxgb4.h Merge branches 'cxgb4-2', 'i40iw-2', 'ipoib', 'misc-4.7' and 'mlx5-fcs' into k.o/for-4.7 2016-05-13 19:40:38 -04:00
mem.c Merge branches 'cxgb4-2', 'i40iw-2', 'ipoib', 'misc-4.7' and 'mlx5-fcs' into k.o/for-4.7 2016-05-13 19:40:38 -04:00
provider.c IB/core: Make device counter infrastructure dynamic 2016-05-26 12:52:51 -04:00
qp.c RDMA/iw_cxgb4: Fix bar2 virt addr calculation for T4 chips 2016-04-26 12:47:09 -04:00
resource.c RDMA/cxgb4: Add missing debug stats 2014-04-11 11:36:09 -07:00
t4.h iw_cxgb4: Pass qid range to user space driver 2015-12-24 00:17:30 -05:00
t4fw_ri_api.h cxgb4, iw_cxgb4: move delayed ack macro definitions 2016-03-22 00:25:05 -07:00
user.h iw_cxgb4: Pass qid range to user space driver 2015-12-24 00:17:30 -05:00