devlink: Implement devlink health reporters on per-port basis

Add devlink-health reporter support on per-port basis.
The main difference existing devlink-health is that port reporters are
stored in per-devlink_port lists. Upon creation of such health reporter the
reference to a port it belongs to is stored in reporter struct.

Fill the port index attribute in devlink-health response to
allow devlink userspace utility to distinguish between device and port
reporters.

Signed-off-by: Vladyslav Tarasiuk <vladyslavt@mellanox.com>
Reviewed-by: Moshe Shemesh <moshe@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Vladyslav Tarasiuk
2020-07-10 15:25:10 +03:00
کامیت شده توسط David S. Miller
والد bd8210055c
کامیت f4f5416601
2فایلهای تغییر یافته به همراه79 افزوده شده و 17 حذف شده

مشاهده پرونده

@@ -101,6 +101,8 @@ struct devlink_port {
u8 attrs_set:1,
switch_port:1;
struct delayed_work type_warn_dw;
struct list_head reporter_list;
struct mutex reporters_lock; /* Protects reporter_list */
};
struct devlink_sb_pool_info {