diff options
author | Jiri Pirko <jiri@nvidia.com> | 2023-08-11 17:57:14 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-08-14 11:47:25 -0700 |
commit | 0149bca172622d802c0caff8cf0928fb0ded767b (patch) | |
tree | 4d379063c2a722dbe3dd41a0e3f802076fc35f69 /net | |
parent | b03f13cb67a59175ec7bb7201e5e746e50f2331e (diff) |
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')
-rw-r--r-- | net/devlink/netlink_gen.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/devlink/netlink_gen.c b/net/devlink/netlink_gen.c index 5f3e980c6a7c..467b7a431de1 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, }, { |