• Eran Ben Elisha's avatar
    devlink: Add health report functionality · c8e1da0b
    Eran Ben Elisha authored
    Upon error discover, every driver can report it to the devlink health
    mechanism via devlink_health_report function, using the appropriate
    reporter registered to it. Driver can pass error specific context which
    will be delivered to it as part of the dump / recovery callbacks.
    
    Once an error is reported, devlink health will do the following actions:
    * A log is being send to the kernel trace events buffer
    * Health status and statistics are being updated for the reporter instance
    * Object dump is being taken and stored at the reporter instance (as long
      as there is no other dump which is already stored)
    * Auto recovery attempt is being done. Depends on:
      - Auto Recovery configuration
      - Grace period vs. Time since last recover
    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>
    c8e1da0b
devlink.c 152 KB