diff options
author | Vladyslav Tarasiuk <vladyslavt@mellanox.com> | 2020-07-10 15:25:10 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-07-10 14:32:02 -0700 |
commit | f4f541660121aeb91a1b462ab3f3c5a86ab7c3dd (patch) | |
tree | dcbda7ec1bbb66de139fbd0020993b7b1b289002 /include | |
parent | bd8210055c36a453358d75017dce7522d950dd38 (diff) | |
download | lwn-f4f541660121aeb91a1b462ab3f3c5a86ab7c3dd.tar.gz lwn-f4f541660121aeb91a1b462ab3f3c5a86ab7c3dd.zip |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/devlink.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/devlink.h b/include/net/devlink.h index 746bed538664..bb1139752405 100644 --- a/include/net/devlink.h +++ b/include/net/devlink.h @@ -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 { |