linux/drivers/infiniband/core
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
..
addr.c IB/core: Add IP to GID netlink offload 2016-05-24 14:44:04 -04:00
agent.c
agent.h
cache.c IB/core: Fix oops in ib_cache_gid_set_default_gid 2016-04-22 20:26:44 -04:00
cm_msgs.h
cm.c
cma_configfs.c
cma.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
core_priv.h IB/core: Add IP to GID netlink offload 2016-05-24 14:44:04 -04:00
cq.c
device.c IB/core: Add IP to GID netlink offload 2016-05-24 14:44:04 -04:00
fmr_pool.c
iwcm.c IB/core: Fix a potential array overrun in CMA and SA agent 2016-05-13 19:40:02 -04:00
iwcm.h
iwpm_msg.c iwpm: crash fix for large connections test 2016-03-16 13:48:32 -04:00
iwpm_util.c IB/IWPM: Fix a potential skb leak 2016-05-13 19:40:01 -04:00
iwpm_util.h iwpm: crash fix for large connections test 2016-03-16 13:48:32 -04:00
mad_priv.h
mad_rmpp.c
mad_rmpp.h
mad.c IB/MAD: Integrate ib_mad module into ib_core module 2016-05-24 14:40:13 -04:00
Makefile IB/SA: Integrate ib_sa module into ib_core module 2016-05-24 14:42:36 -04:00
mr_pool.c IB/core: add a simple MR pool 2016-05-13 13:37:18 -04:00
multicast.c IB/core: Support new type of join-state for multicast 2016-05-25 15:39:03 -04:00
netlink.c IB/core: Remove unnecessary check in ibnl_rcv_msg 2016-05-13 19:40:01 -04:00
opa_smi.h
packer.c
roce_gid_mgmt.c
rw.c IB/core: Enhance ib_map_mr_sg() 2016-05-13 13:37:57 -04:00
sa_query.c Merge branches 'misc-4.7-2', 'ipoib' and 'ib-router' into k.o/for-4.7 2016-05-26 11:55:19 -04:00
sa.h
smi.c
smi.h
sysfs.c IB/core: Make device counter infrastructure dynamic 2016-05-26 12:52:51 -04:00
ucm.c IB/security: Restrict use of the write() interface 2016-04-28 12:03:16 -04:00
ucma.c IB/security: Restrict use of the write() interface 2016-04-28 12:03:16 -04:00
ud_header.c
umem_odp.c
umem_rbtree.c
umem.c
user_mad.c
uverbs_cmd.c IB/core: Do not require CAP_NET_ADMIN for packet sniffing 2016-05-18 10:31:58 -04:00
uverbs_main.c IB/security: Restrict use of the write() interface 2016-04-28 12:03:16 -04:00
uverbs_marshall.c
uverbs.h
verbs.c IB/core: Enhance ib_map_mr_sg() 2016-05-13 13:37:57 -04:00