devlink: rename and reorder instances of struct devlink_cmd

In order to maintain naming consistency, rename and reorder all usages
of struct struct devlink_cmd in the following way:
1) Remove "gen" and replace it with "cmd" to match the struct name
2) Order devl_cmds[] and the header file to match the order
   of enum devlink_command
3) Move devl_cmd_rate_get among the peers
4) Remove "inst" for DEVLINK_CMD_GET
5) Add "_get" suffix to all to match DEVLINK_CMD_*_GET (only rate had it
   done correctly)

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Jiri Pirko
2023-01-31 10:06:13 +01:00
committed by Jakub Kicinski
parent f87445953d
commit 8589ba4e64
3 changed files with 50 additions and 51 deletions

View File

@@ -140,21 +140,22 @@ devlink_dump_state(struct netlink_callback *cb)
}
/* Commands */
extern const struct devlink_cmd devl_gen_inst;
extern const struct devlink_cmd devl_gen_port;
extern const struct devlink_cmd devl_gen_sb;
extern const struct devlink_cmd devl_gen_sb_pool;
extern const struct devlink_cmd devl_gen_sb_port_pool;
extern const struct devlink_cmd devl_gen_sb_tc_pool_bind;
extern const struct devlink_cmd devl_gen_selftests;
extern const struct devlink_cmd devl_gen_param;
extern const struct devlink_cmd devl_gen_region;
extern const struct devlink_cmd devl_gen_info;
extern const struct devlink_cmd devl_gen_health_reporter;
extern const struct devlink_cmd devl_gen_trap;
extern const struct devlink_cmd devl_gen_trap_group;
extern const struct devlink_cmd devl_gen_trap_policer;
extern const struct devlink_cmd devl_gen_linecard;
extern const struct devlink_cmd devl_cmd_get;
extern const struct devlink_cmd devl_cmd_port_get;
extern const struct devlink_cmd devl_cmd_sb_get;
extern const struct devlink_cmd devl_cmd_sb_pool_get;
extern const struct devlink_cmd devl_cmd_sb_port_pool_get;
extern const struct devlink_cmd devl_cmd_sb_tc_pool_bind_get;
extern const struct devlink_cmd devl_cmd_param_get;
extern const struct devlink_cmd devl_cmd_region_get;
extern const struct devlink_cmd devl_cmd_info_get;
extern const struct devlink_cmd devl_cmd_health_reporter_get;
extern const struct devlink_cmd devl_cmd_trap_get;
extern const struct devlink_cmd devl_cmd_trap_group_get;
extern const struct devlink_cmd devl_cmd_trap_policer_get;
extern const struct devlink_cmd devl_cmd_rate_get;
extern const struct devlink_cmd devl_cmd_linecard_get;
extern const struct devlink_cmd devl_cmd_selftests_get;
/* Ports */
int devlink_port_netdevice_event(struct notifier_block *nb,
@@ -182,8 +183,6 @@ struct devlink_linecard *
devlink_linecard_get_from_info(struct devlink *devlink, struct genl_info *info);
/* Rates */
extern const struct devlink_cmd devl_gen_rate_get;
struct devlink_rate *
devlink_rate_get_from_info(struct devlink *devlink, struct genl_info *info);
struct devlink_rate *