• Christoph Lameter's avatar
    IB/core: Make device counter infrastructure dynamic · b40f4757
    Christoph Lameter authored
    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: default avatarChristoph Lameter <cl@linux.com>
    Signed-off-by: default avatarMark Bloch <markb@mellanox.com>
    Reviewed-by: default avatarSteve Wise <swise@opengridcomputing.com>
    Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
    [ Add caching, make structure names more informative, add i40iw support,
      other significant rewrites from the original patch ]
    b40f4757
Name
Last commit
Last update
..
ib.h Loading commit data...
ib_addr.h Loading commit data...
ib_cache.h Loading commit data...
ib_cm.h Loading commit data...
ib_fmr_pool.h Loading commit data...
ib_mad.h Loading commit data...
ib_marshall.h Loading commit data...
ib_pack.h Loading commit data...
ib_pma.h Loading commit data...
ib_sa.h Loading commit data...
ib_smi.h Loading commit data...
ib_umem.h Loading commit data...
ib_umem_odp.h Loading commit data...
ib_verbs.h Loading commit data...
iw_cm.h Loading commit data...
iw_portmap.h Loading commit data...
mr_pool.h Loading commit data...
opa_port_info.h Loading commit data...
opa_smi.h Loading commit data...
rdma_cm.h Loading commit data...
rdma_cm_ib.h Loading commit data...
rdma_netlink.h Loading commit data...
rdma_vt.h Loading commit data...
rdmavt_cq.h Loading commit data...
rdmavt_mr.h Loading commit data...
rdmavt_qp.h Loading commit data...
rw.h Loading commit data...