• Eran Ben Elisha's avatar
    devlink: Add health reporter create/destroy functionality · a0bdcc59
    Eran Ben Elisha authored
    Devlink health reporter is an instance for reporting, diagnosing and
    recovering from run time errors discovered by the reporters.
    Define it's data structure and supported operations.
    In addition, expose devlink API to create and destroy a reporter.
    Each devlink instance will hold it's own reporters list.
    
    As part of the allocation, driver shall provide a set of callbacks which
    will be used by devlink in order to handle health reports and user
    commands related to this reporter. In addition, driver is entitled to
    provide some priv pointer, which can be fetched from the reporter by
    devlink_health_reporter_priv function.
    
    For each reporter, devlink will hold a metadata of statistics,
    dump msg and status.
    
    For passing dumps and diagnose data to the user-space, it will use devlink
    fmsg API.
    Signed-off-by: default avatarEran Ben Elisha <eranbe@mellanox.com>
    Reviewed-by: default avatarMoshe Shemesh <moshe@mellanox.com>
    Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    a0bdcc59
devlink.c 149 KB