]> git.baikalelectronics.ru Git - kernel.git/commit
devlink: Add health reporter create/destroy functionality
authorEran Ben Elisha <eranbe@mellanox.com>
Thu, 17 Jan 2019 21:59:11 +0000 (23:59 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 18 Jan 2019 22:51:22 +0000 (14:51 -0800)
commit9925c3a9d3dbc3a7ba0137f5881bd45ee39c8e40
treeed7d092f3ec6845f631ecdbe17cf46ed1ddd24fa
parent98de2918a9744ed8798e8692d5b6a458bf241203
devlink: Add health reporter create/destroy functionality

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 the 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,
buffers and status.

Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Reviewed-by: Moshe Shemesh <moshe@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/devlink.h
net/core/devlink.c