aboutsummaryrefslogtreecommitdiffstats
path: root/net/devlink
diff options
context:
space:
mode:
authorJiri Pirko <jiri@nvidia.com>2023-08-11 17:57:14 +0200
committerJakub Kicinski <kuba@kernel.org>2023-08-14 11:47:25 -0700
commit0149bca172622d802c0caff8cf0928fb0ded767b (patch)
tree4d379063c2a722dbe3dd41a0e3f802076fc35f69 /net/devlink
parentb03f13cb67a59175ec7bb7201e5e746e50f2331e (diff)
downloadlinux-0149bca172622d802c0caff8cf0928fb0ded767b.tar.gz
netlink: specs: devlink: extend health reporter dump attributes by port index
Allow user to pass port index for health reporter dump request. Re-generate the related code. Signed-off-by: Jiri Pirko <jiri@nvidia.com> Acked-by: Jakub Kicinski <kuba@kernel.org> Link: https://lore.kernel.org/r/20230811155714.1736405-14-jiri@resnulli.us Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/devlink')
-rw-r--r--net/devlink/netlink_gen.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/devlink/netlink_gen.c b/net/devlink/netlink_gen.c
index 5f3e980c6a7c8..467b7a431de1f 100644
--- a/net/devlink/netlink_gen.c
+++ b/net/devlink/netlink_gen.c
@@ -129,9 +129,10 @@ static const struct nla_policy devlink_health_reporter_get_do_nl_policy[DEVLINK_
};
/* DEVLINK_CMD_HEALTH_REPORTER_GET - dump */
-static const struct nla_policy devlink_health_reporter_get_dump_nl_policy[DEVLINK_ATTR_DEV_NAME + 1] = {
+static const struct nla_policy devlink_health_reporter_get_dump_nl_policy[DEVLINK_ATTR_PORT_INDEX + 1] = {
[DEVLINK_ATTR_BUS_NAME] = { .type = NLA_NUL_STRING, },
[DEVLINK_ATTR_DEV_NAME] = { .type = NLA_NUL_STRING, },
+ [DEVLINK_ATTR_PORT_INDEX] = { .type = NLA_U32, },
};
/* DEVLINK_CMD_TRAP_GET - do */
@@ -373,7 +374,7 @@ const struct genl_split_ops devlink_nl_ops[32] = {
.cmd = DEVLINK_CMD_HEALTH_REPORTER_GET,
.dumpit = devlink_nl_health_reporter_get_dumpit,
.policy = devlink_health_reporter_get_dump_nl_policy,
- .maxattr = DEVLINK_ATTR_DEV_NAME,
+ .maxattr = DEVLINK_ATTR_PORT_INDEX,
.flags = GENL_CMD_CAP_DUMP,
},
{