Commit 53590934 authored by Jiri Pirko's avatar Jiri Pirko Committed by Jakub Kicinski

devlink: rename netlink callback to be aligned with the generated ones

All remaining doit and dumpit netlink callback functions are going to be
used by generated split ops. They expect certain name format. Rename the
callback to be aligned with generated names.
Signed-off-by: default avatarJiri Pirko <jiri@nvidia.com>
Reviewed-by: default avatarJacob Keller <jacob.e.keller@intel.com>
Link: https://lore.kernel.org/r/20231021112711.660606-8-jiri@resnulli.usSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent e3570f04
...@@ -492,7 +492,7 @@ devlink_nl_reload_actions_performed_snd(struct devlink *devlink, u32 actions_per ...@@ -492,7 +492,7 @@ devlink_nl_reload_actions_performed_snd(struct devlink *devlink, u32 actions_per
return -EMSGSIZE; return -EMSGSIZE;
} }
int devlink_nl_cmd_reload(struct sk_buff *skb, struct genl_info *info) int devlink_nl_reload_doit(struct sk_buff *skb, struct genl_info *info)
{ {
struct devlink *devlink = info->user_ptr[0]; struct devlink *devlink = info->user_ptr[0];
enum devlink_reload_action action; enum devlink_reload_action action;
...@@ -658,7 +658,7 @@ static int devlink_nl_eswitch_fill(struct sk_buff *msg, struct devlink *devlink, ...@@ -658,7 +658,7 @@ static int devlink_nl_eswitch_fill(struct sk_buff *msg, struct devlink *devlink,
return err; return err;
} }
int devlink_nl_cmd_eswitch_get_doit(struct sk_buff *skb, struct genl_info *info) int devlink_nl_eswitch_get_doit(struct sk_buff *skb, struct genl_info *info)
{ {
struct devlink *devlink = info->user_ptr[0]; struct devlink *devlink = info->user_ptr[0];
struct sk_buff *msg; struct sk_buff *msg;
...@@ -679,7 +679,7 @@ int devlink_nl_cmd_eswitch_get_doit(struct sk_buff *skb, struct genl_info *info) ...@@ -679,7 +679,7 @@ int devlink_nl_cmd_eswitch_get_doit(struct sk_buff *skb, struct genl_info *info)
return genlmsg_reply(msg, info); return genlmsg_reply(msg, info);
} }
int devlink_nl_cmd_eswitch_set_doit(struct sk_buff *skb, struct genl_info *info) int devlink_nl_eswitch_set_doit(struct sk_buff *skb, struct genl_info *info)
{ {
struct devlink *devlink = info->user_ptr[0]; struct devlink *devlink = info->user_ptr[0];
const struct devlink_ops *ops = devlink->ops; const struct devlink_ops *ops = devlink->ops;
...@@ -1108,7 +1108,7 @@ static int devlink_flash_component_get(struct devlink *devlink, ...@@ -1108,7 +1108,7 @@ static int devlink_flash_component_get(struct devlink *devlink,
return 0; return 0;
} }
int devlink_nl_cmd_flash_update(struct sk_buff *skb, struct genl_info *info) int devlink_nl_flash_update_doit(struct sk_buff *skb, struct genl_info *info)
{ {
struct nlattr *nla_overwrite_mask, *nla_file_name; struct nlattr *nla_overwrite_mask, *nla_file_name;
struct devlink_flash_update_params params = {}; struct devlink_flash_update_params params = {};
...@@ -1351,7 +1351,7 @@ static const struct nla_policy devlink_selftest_nl_policy[DEVLINK_ATTR_SELFTEST_ ...@@ -1351,7 +1351,7 @@ static const struct nla_policy devlink_selftest_nl_policy[DEVLINK_ATTR_SELFTEST_
[DEVLINK_ATTR_SELFTEST_ID_FLASH] = { .type = NLA_FLAG }, [DEVLINK_ATTR_SELFTEST_ID_FLASH] = { .type = NLA_FLAG },
}; };
int devlink_nl_cmd_selftests_run(struct sk_buff *skb, struct genl_info *info) int devlink_nl_selftests_run_doit(struct sk_buff *skb, struct genl_info *info)
{ {
struct nlattr *tb[DEVLINK_ATTR_SELFTEST_ID_MAX + 1]; struct nlattr *tb[DEVLINK_ATTR_SELFTEST_ID_MAX + 1];
struct devlink *devlink = info->user_ptr[0]; struct devlink *devlink = info->user_ptr[0];
......
...@@ -229,65 +229,63 @@ int devlink_rate_nodes_check(struct devlink *devlink, u16 mode, ...@@ -229,65 +229,63 @@ int devlink_rate_nodes_check(struct devlink *devlink, u16 mode,
unsigned int devlink_linecard_index(struct devlink_linecard *linecard); unsigned int devlink_linecard_index(struct devlink_linecard *linecard);
/* Devlink nl cmds */ /* Devlink nl cmds */
int devlink_nl_cmd_reload(struct sk_buff *skb, struct genl_info *info); int devlink_nl_reload_doit(struct sk_buff *skb, struct genl_info *info);
int devlink_nl_cmd_eswitch_get_doit(struct sk_buff *skb, struct genl_info *info); int devlink_nl_eswitch_get_doit(struct sk_buff *skb, struct genl_info *info);
int devlink_nl_cmd_eswitch_set_doit(struct sk_buff *skb, struct genl_info *info); int devlink_nl_eswitch_set_doit(struct sk_buff *skb, struct genl_info *info);
int devlink_nl_cmd_flash_update(struct sk_buff *skb, struct genl_info *info); int devlink_nl_flash_update_doit(struct sk_buff *skb, struct genl_info *info);
int devlink_nl_cmd_selftests_run(struct sk_buff *skb, struct genl_info *info); int devlink_nl_selftests_run_doit(struct sk_buff *skb, struct genl_info *info);
int devlink_nl_cmd_port_set_doit(struct sk_buff *skb, struct genl_info *info); int devlink_nl_port_set_doit(struct sk_buff *skb, struct genl_info *info);
int devlink_nl_cmd_port_split_doit(struct sk_buff *skb, struct genl_info *info); int devlink_nl_port_split_doit(struct sk_buff *skb, struct genl_info *info);
int devlink_nl_cmd_port_unsplit_doit(struct sk_buff *skb, int devlink_nl_port_unsplit_doit(struct sk_buff *skb, struct genl_info *info);
int devlink_nl_port_new_doit(struct sk_buff *skb, struct genl_info *info);
int devlink_nl_port_del_doit(struct sk_buff *skb, struct genl_info *info);
int devlink_nl_sb_pool_set_doit(struct sk_buff *skb, struct genl_info *info);
int devlink_nl_sb_port_pool_set_doit(struct sk_buff *skb,
struct genl_info *info); struct genl_info *info);
int devlink_nl_cmd_port_new_doit(struct sk_buff *skb, struct genl_info *info); int devlink_nl_sb_tc_pool_bind_set_doit(struct sk_buff *skb,
int devlink_nl_cmd_port_del_doit(struct sk_buff *skb, struct genl_info *info);
int devlink_nl_cmd_sb_pool_set_doit(struct sk_buff *skb, struct genl_info *info);
int devlink_nl_cmd_sb_port_pool_set_doit(struct sk_buff *skb,
struct genl_info *info);
int devlink_nl_cmd_sb_tc_pool_bind_set_doit(struct sk_buff *skb,
struct genl_info *info);
int devlink_nl_cmd_sb_occ_snapshot_doit(struct sk_buff *skb,
struct genl_info *info); struct genl_info *info);
int devlink_nl_cmd_sb_occ_max_clear_doit(struct sk_buff *skb, int devlink_nl_sb_occ_snapshot_doit(struct sk_buff *skb,
struct genl_info *info); struct genl_info *info);
int devlink_nl_cmd_dpipe_table_get(struct sk_buff *skb, struct genl_info *info); int devlink_nl_sb_occ_max_clear_doit(struct sk_buff *skb,
int devlink_nl_cmd_dpipe_entries_get(struct sk_buff *skb,
struct genl_info *info);
int devlink_nl_cmd_dpipe_headers_get(struct sk_buff *skb,
struct genl_info *info); struct genl_info *info);
int devlink_nl_cmd_dpipe_table_counters_set(struct sk_buff *skb, int devlink_nl_dpipe_table_get_doit(struct sk_buff *skb,
struct genl_info *info); struct genl_info *info);
int devlink_nl_cmd_resource_set(struct sk_buff *skb, struct genl_info *info); int devlink_nl_dpipe_entries_get_doit(struct sk_buff *skb,
int devlink_nl_cmd_resource_dump(struct sk_buff *skb, struct genl_info *info); struct genl_info *info);
int devlink_nl_cmd_param_set_doit(struct sk_buff *skb, struct genl_info *info); int devlink_nl_dpipe_headers_get_doit(struct sk_buff *skb,
int devlink_nl_cmd_port_param_get_dumpit(struct sk_buff *msg, struct genl_info *info);
struct netlink_callback *cb); int devlink_nl_dpipe_table_counters_set_doit(struct sk_buff *skb,
int devlink_nl_cmd_port_param_get_doit(struct sk_buff *skb, struct genl_info *info);
struct genl_info *info); int devlink_nl_resource_set_doit(struct sk_buff *skb, struct genl_info *info);
int devlink_nl_cmd_port_param_set_doit(struct sk_buff *skb, int devlink_nl_resource_dump_doit(struct sk_buff *skb, struct genl_info *info);
struct genl_info *info); int devlink_nl_param_set_doit(struct sk_buff *skb, struct genl_info *info);
int devlink_nl_cmd_region_new(struct sk_buff *skb, struct genl_info *info); int devlink_nl_port_param_get_dumpit(struct sk_buff *msg,
int devlink_nl_cmd_region_del(struct sk_buff *skb, struct genl_info *info); struct netlink_callback *cb);
int devlink_nl_cmd_region_read_dumpit(struct sk_buff *skb, int devlink_nl_port_param_get_doit(struct sk_buff *skb,
struct netlink_callback *cb); struct genl_info *info);
int devlink_nl_cmd_health_reporter_set_doit(struct sk_buff *skb, int devlink_nl_port_param_set_doit(struct sk_buff *skb,
struct genl_info *info);
int devlink_nl_region_new_doit(struct sk_buff *skb, struct genl_info *info);
int devlink_nl_region_del_doit(struct sk_buff *skb, struct genl_info *info);
int devlink_nl_region_read_dumpit(struct sk_buff *skb,
struct netlink_callback *cb);
int devlink_nl_health_reporter_set_doit(struct sk_buff *skb,
struct genl_info *info);
int devlink_nl_health_reporter_recover_doit(struct sk_buff *skb,
struct genl_info *info); struct genl_info *info);
int devlink_nl_cmd_health_reporter_recover_doit(struct sk_buff *skb, int devlink_nl_health_reporter_diagnose_doit(struct sk_buff *skb,
struct genl_info *info);
int devlink_nl_cmd_health_reporter_diagnose_doit(struct sk_buff *skb,
struct genl_info *info);
int devlink_nl_cmd_health_reporter_dump_get_dumpit(struct sk_buff *skb,
struct netlink_callback *cb);
int devlink_nl_cmd_health_reporter_dump_clear_doit(struct sk_buff *skb,
struct genl_info *info);
int devlink_nl_cmd_health_reporter_test_doit(struct sk_buff *skb,
struct genl_info *info); struct genl_info *info);
int devlink_nl_cmd_trap_set_doit(struct sk_buff *skb, struct genl_info *info); int devlink_nl_health_reporter_dump_get_dumpit(struct sk_buff *skb,
int devlink_nl_cmd_trap_group_set_doit(struct sk_buff *skb, struct netlink_callback *cb);
struct genl_info *info); int devlink_nl_health_reporter_dump_clear_doit(struct sk_buff *skb,
int devlink_nl_cmd_trap_policer_set_doit(struct sk_buff *skb, struct genl_info *info);
int devlink_nl_health_reporter_test_doit(struct sk_buff *skb,
struct genl_info *info); struct genl_info *info);
int devlink_nl_cmd_rate_set_doit(struct sk_buff *skb, struct genl_info *info); int devlink_nl_trap_set_doit(struct sk_buff *skb, struct genl_info *info);
int devlink_nl_cmd_rate_new_doit(struct sk_buff *skb, struct genl_info *info); int devlink_nl_trap_group_set_doit(struct sk_buff *skb, struct genl_info *info);
int devlink_nl_cmd_rate_del_doit(struct sk_buff *skb, struct genl_info *info); int devlink_nl_trap_policer_set_doit(struct sk_buff *skb,
int devlink_nl_cmd_linecard_set_doit(struct sk_buff *skb,
struct genl_info *info); struct genl_info *info);
int devlink_nl_rate_set_doit(struct sk_buff *skb, struct genl_info *info);
int devlink_nl_rate_new_doit(struct sk_buff *skb, struct genl_info *info);
int devlink_nl_rate_del_doit(struct sk_buff *skb, struct genl_info *info);
int devlink_nl_linecard_set_doit(struct sk_buff *skb, struct genl_info *info);
...@@ -289,7 +289,7 @@ static int devlink_dpipe_tables_fill(struct genl_info *info, ...@@ -289,7 +289,7 @@ static int devlink_dpipe_tables_fill(struct genl_info *info,
return err; return err;
} }
int devlink_nl_cmd_dpipe_table_get(struct sk_buff *skb, struct genl_info *info) int devlink_nl_dpipe_table_get_doit(struct sk_buff *skb, struct genl_info *info)
{ {
struct devlink *devlink = info->user_ptr[0]; struct devlink *devlink = info->user_ptr[0];
const char *table_name = NULL; const char *table_name = NULL;
...@@ -562,8 +562,8 @@ static int devlink_dpipe_entries_fill(struct genl_info *info, ...@@ -562,8 +562,8 @@ static int devlink_dpipe_entries_fill(struct genl_info *info,
return genlmsg_reply(dump_ctx.skb, info); return genlmsg_reply(dump_ctx.skb, info);
} }
int devlink_nl_cmd_dpipe_entries_get(struct sk_buff *skb, int devlink_nl_dpipe_entries_get_doit(struct sk_buff *skb,
struct genl_info *info) struct genl_info *info)
{ {
struct devlink *devlink = info->user_ptr[0]; struct devlink *devlink = info->user_ptr[0];
struct devlink_dpipe_table *table; struct devlink_dpipe_table *table;
...@@ -712,8 +712,8 @@ static int devlink_dpipe_headers_fill(struct genl_info *info, ...@@ -712,8 +712,8 @@ static int devlink_dpipe_headers_fill(struct genl_info *info,
return err; return err;
} }
int devlink_nl_cmd_dpipe_headers_get(struct sk_buff *skb, int devlink_nl_dpipe_headers_get_doit(struct sk_buff *skb,
struct genl_info *info) struct genl_info *info)
{ {
struct devlink *devlink = info->user_ptr[0]; struct devlink *devlink = info->user_ptr[0];
...@@ -746,8 +746,8 @@ static int devlink_dpipe_table_counters_set(struct devlink *devlink, ...@@ -746,8 +746,8 @@ static int devlink_dpipe_table_counters_set(struct devlink *devlink,
return 0; return 0;
} }
int devlink_nl_cmd_dpipe_table_counters_set(struct sk_buff *skb, int devlink_nl_dpipe_table_counters_set_doit(struct sk_buff *skb,
struct genl_info *info) struct genl_info *info)
{ {
struct devlink *devlink = info->user_ptr[0]; struct devlink *devlink = info->user_ptr[0];
const char *table_name; const char *table_name;
......
...@@ -452,8 +452,8 @@ int devlink_nl_health_reporter_get_dumpit(struct sk_buff *skb, ...@@ -452,8 +452,8 @@ int devlink_nl_health_reporter_get_dumpit(struct sk_buff *skb,
devlink_nl_health_reporter_get_dump_one); devlink_nl_health_reporter_get_dump_one);
} }
int devlink_nl_cmd_health_reporter_set_doit(struct sk_buff *skb, int devlink_nl_health_reporter_set_doit(struct sk_buff *skb,
struct genl_info *info) struct genl_info *info)
{ {
struct devlink *devlink = info->user_ptr[0]; struct devlink *devlink = info->user_ptr[0];
struct devlink_health_reporter *reporter; struct devlink_health_reporter *reporter;
...@@ -655,8 +655,8 @@ devlink_health_reporter_state_update(struct devlink_health_reporter *reporter, ...@@ -655,8 +655,8 @@ devlink_health_reporter_state_update(struct devlink_health_reporter *reporter,
} }
EXPORT_SYMBOL_GPL(devlink_health_reporter_state_update); EXPORT_SYMBOL_GPL(devlink_health_reporter_state_update);
int devlink_nl_cmd_health_reporter_recover_doit(struct sk_buff *skb, int devlink_nl_health_reporter_recover_doit(struct sk_buff *skb,
struct genl_info *info) struct genl_info *info)
{ {
struct devlink *devlink = info->user_ptr[0]; struct devlink *devlink = info->user_ptr[0];
struct devlink_health_reporter *reporter; struct devlink_health_reporter *reporter;
...@@ -1108,8 +1108,8 @@ static int devlink_fmsg_dumpit(struct devlink_fmsg *fmsg, struct sk_buff *skb, ...@@ -1108,8 +1108,8 @@ static int devlink_fmsg_dumpit(struct devlink_fmsg *fmsg, struct sk_buff *skb,
return err; return err;
} }
int devlink_nl_cmd_health_reporter_diagnose_doit(struct sk_buff *skb, int devlink_nl_health_reporter_diagnose_doit(struct sk_buff *skb,
struct genl_info *info) struct genl_info *info)
{ {
struct devlink *devlink = info->user_ptr[0]; struct devlink *devlink = info->user_ptr[0];
struct devlink_health_reporter *reporter; struct devlink_health_reporter *reporter;
...@@ -1163,8 +1163,8 @@ devlink_health_reporter_get_from_cb_lock(struct netlink_callback *cb) ...@@ -1163,8 +1163,8 @@ devlink_health_reporter_get_from_cb_lock(struct netlink_callback *cb)
return reporter; return reporter;
} }
int devlink_nl_cmd_health_reporter_dump_get_dumpit(struct sk_buff *skb, int devlink_nl_health_reporter_dump_get_dumpit(struct sk_buff *skb,
struct netlink_callback *cb) struct netlink_callback *cb)
{ {
struct devlink_nl_dump_state *state = devlink_dump_state(cb); struct devlink_nl_dump_state *state = devlink_dump_state(cb);
struct devlink_health_reporter *reporter; struct devlink_health_reporter *reporter;
...@@ -1202,8 +1202,8 @@ int devlink_nl_cmd_health_reporter_dump_get_dumpit(struct sk_buff *skb, ...@@ -1202,8 +1202,8 @@ int devlink_nl_cmd_health_reporter_dump_get_dumpit(struct sk_buff *skb,
return err; return err;
} }
int devlink_nl_cmd_health_reporter_dump_clear_doit(struct sk_buff *skb, int devlink_nl_health_reporter_dump_clear_doit(struct sk_buff *skb,
struct genl_info *info) struct genl_info *info)
{ {
struct devlink *devlink = info->user_ptr[0]; struct devlink *devlink = info->user_ptr[0];
struct devlink_health_reporter *reporter; struct devlink_health_reporter *reporter;
...@@ -1219,8 +1219,8 @@ int devlink_nl_cmd_health_reporter_dump_clear_doit(struct sk_buff *skb, ...@@ -1219,8 +1219,8 @@ int devlink_nl_cmd_health_reporter_dump_clear_doit(struct sk_buff *skb,
return 0; return 0;
} }
int devlink_nl_cmd_health_reporter_test_doit(struct sk_buff *skb, int devlink_nl_health_reporter_test_doit(struct sk_buff *skb,
struct genl_info *info) struct genl_info *info)
{ {
struct devlink *devlink = info->user_ptr[0]; struct devlink *devlink = info->user_ptr[0];
struct devlink_health_reporter *reporter; struct devlink_health_reporter *reporter;
......
...@@ -369,8 +369,7 @@ static int devlink_linecard_type_unset(struct devlink_linecard *linecard, ...@@ -369,8 +369,7 @@ static int devlink_linecard_type_unset(struct devlink_linecard *linecard,
return err; return err;
} }
int devlink_nl_cmd_linecard_set_doit(struct sk_buff *skb, int devlink_nl_linecard_set_doit(struct sk_buff *skb, struct genl_info *info)
struct genl_info *info)
{ {
struct netlink_ext_ack *extack = info->extack; struct netlink_ext_ack *extack = info->extack;
struct devlink *devlink = info->user_ptr[0]; struct devlink *devlink = info->user_ptr[0];
......
...@@ -291,200 +291,200 @@ static const struct genl_small_ops devlink_nl_small_ops[40] = { ...@@ -291,200 +291,200 @@ static const struct genl_small_ops devlink_nl_small_ops[40] = {
{ {
.cmd = DEVLINK_CMD_PORT_SET, .cmd = DEVLINK_CMD_PORT_SET,
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
.doit = devlink_nl_cmd_port_set_doit, .doit = devlink_nl_port_set_doit,
.flags = GENL_ADMIN_PERM, .flags = GENL_ADMIN_PERM,
.internal_flags = DEVLINK_NL_FLAG_NEED_PORT, .internal_flags = DEVLINK_NL_FLAG_NEED_PORT,
}, },
{ {
.cmd = DEVLINK_CMD_RATE_SET, .cmd = DEVLINK_CMD_RATE_SET,
.doit = devlink_nl_cmd_rate_set_doit, .doit = devlink_nl_rate_set_doit,
.flags = GENL_ADMIN_PERM, .flags = GENL_ADMIN_PERM,
}, },
{ {
.cmd = DEVLINK_CMD_RATE_NEW, .cmd = DEVLINK_CMD_RATE_NEW,
.doit = devlink_nl_cmd_rate_new_doit, .doit = devlink_nl_rate_new_doit,
.flags = GENL_ADMIN_PERM, .flags = GENL_ADMIN_PERM,
}, },
{ {
.cmd = DEVLINK_CMD_RATE_DEL, .cmd = DEVLINK_CMD_RATE_DEL,
.doit = devlink_nl_cmd_rate_del_doit, .doit = devlink_nl_rate_del_doit,
.flags = GENL_ADMIN_PERM, .flags = GENL_ADMIN_PERM,
}, },
{ {
.cmd = DEVLINK_CMD_PORT_SPLIT, .cmd = DEVLINK_CMD_PORT_SPLIT,
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
.doit = devlink_nl_cmd_port_split_doit, .doit = devlink_nl_port_split_doit,
.flags = GENL_ADMIN_PERM, .flags = GENL_ADMIN_PERM,
.internal_flags = DEVLINK_NL_FLAG_NEED_PORT, .internal_flags = DEVLINK_NL_FLAG_NEED_PORT,
}, },
{ {
.cmd = DEVLINK_CMD_PORT_UNSPLIT, .cmd = DEVLINK_CMD_PORT_UNSPLIT,
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
.doit = devlink_nl_cmd_port_unsplit_doit, .doit = devlink_nl_port_unsplit_doit,
.flags = GENL_ADMIN_PERM, .flags = GENL_ADMIN_PERM,
.internal_flags = DEVLINK_NL_FLAG_NEED_PORT, .internal_flags = DEVLINK_NL_FLAG_NEED_PORT,
}, },
{ {
.cmd = DEVLINK_CMD_PORT_NEW, .cmd = DEVLINK_CMD_PORT_NEW,
.doit = devlink_nl_cmd_port_new_doit, .doit = devlink_nl_port_new_doit,
.flags = GENL_ADMIN_PERM, .flags = GENL_ADMIN_PERM,
}, },
{ {
.cmd = DEVLINK_CMD_PORT_DEL, .cmd = DEVLINK_CMD_PORT_DEL,
.doit = devlink_nl_cmd_port_del_doit, .doit = devlink_nl_port_del_doit,
.flags = GENL_ADMIN_PERM, .flags = GENL_ADMIN_PERM,
.internal_flags = DEVLINK_NL_FLAG_NEED_PORT, .internal_flags = DEVLINK_NL_FLAG_NEED_PORT,
}, },
{ {
.cmd = DEVLINK_CMD_LINECARD_SET, .cmd = DEVLINK_CMD_LINECARD_SET,
.doit = devlink_nl_cmd_linecard_set_doit, .doit = devlink_nl_linecard_set_doit,
.flags = GENL_ADMIN_PERM, .flags = GENL_ADMIN_PERM,
}, },
{ {
.cmd = DEVLINK_CMD_SB_POOL_SET, .cmd = DEVLINK_CMD_SB_POOL_SET,
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
.doit = devlink_nl_cmd_sb_pool_set_doit, .doit = devlink_nl_sb_pool_set_doit,
.flags = GENL_ADMIN_PERM, .flags = GENL_ADMIN_PERM,
}, },
{ {
.cmd = DEVLINK_CMD_SB_PORT_POOL_SET, .cmd = DEVLINK_CMD_SB_PORT_POOL_SET,
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
.doit = devlink_nl_cmd_sb_port_pool_set_doit, .doit = devlink_nl_sb_port_pool_set_doit,
.flags = GENL_ADMIN_PERM, .flags = GENL_ADMIN_PERM,
.internal_flags = DEVLINK_NL_FLAG_NEED_PORT, .internal_flags = DEVLINK_NL_FLAG_NEED_PORT,
}, },
{ {
.cmd = DEVLINK_CMD_SB_TC_POOL_BIND_SET, .cmd = DEVLINK_CMD_SB_TC_POOL_BIND_SET,
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
.doit = devlink_nl_cmd_sb_tc_pool_bind_set_doit, .doit = devlink_nl_sb_tc_pool_bind_set_doit,
.flags = GENL_ADMIN_PERM, .flags = GENL_ADMIN_PERM,
.internal_flags = DEVLINK_NL_FLAG_NEED_PORT, .internal_flags = DEVLINK_NL_FLAG_NEED_PORT,
}, },
{ {
.cmd = DEVLINK_CMD_SB_OCC_SNAPSHOT, .cmd = DEVLINK_CMD_SB_OCC_SNAPSHOT,
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
.doit = devlink_nl_cmd_sb_occ_snapshot_doit, .doit = devlink_nl_sb_occ_snapshot_doit,
.flags = GENL_ADMIN_PERM, .flags = GENL_ADMIN_PERM,
}, },
{ {
.cmd = DEVLINK_CMD_SB_OCC_MAX_CLEAR, .cmd = DEVLINK_CMD_SB_OCC_MAX_CLEAR,
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
.doit = devlink_nl_cmd_sb_occ_max_clear_doit, .doit = devlink_nl_sb_occ_max_clear_doit,
.flags = GENL_ADMIN_PERM, .flags = GENL_ADMIN_PERM,
}, },
{ {
.cmd = DEVLINK_CMD_ESWITCH_GET, .cmd = DEVLINK_CMD_ESWITCH_GET,
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
.doit = devlink_nl_cmd_eswitch_get_doit, .doit = devlink_nl_eswitch_get_doit,
.flags = GENL_ADMIN_PERM, .flags = GENL_ADMIN_PERM,
}, },
{ {
.cmd = DEVLINK_CMD_ESWITCH_SET, .cmd = DEVLINK_CMD_ESWITCH_SET,
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
.doit = devlink_nl_cmd_eswitch_set_doit, .doit = devlink_nl_eswitch_set_doit,
.flags = GENL_ADMIN_PERM, .flags = GENL_ADMIN_PERM,
}, },
{ {
.cmd = DEVLINK_CMD_DPIPE_TABLE_GET, .cmd = DEVLINK_CMD_DPIPE_TABLE_GET,
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
.doit = devlink_nl_cmd_dpipe_table_get, .doit = devlink_nl_dpipe_table_get_doit,
/* can be retrieved by unprivileged users */ /* can be retrieved by unprivileged users */
}, },
{ {
.cmd = DEVLINK_CMD_DPIPE_ENTRIES_GET, .cmd = DEVLINK_CMD_DPIPE_ENTRIES_GET,
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
.doit = devlink_nl_cmd_dpipe_entries_get, .doit = devlink_nl_dpipe_entries_get_doit,
/* can be retrieved by unprivileged users */ /* can be retrieved by unprivileged users */
}, },
{ {
.cmd = DEVLINK_CMD_DPIPE_HEADERS_GET, .cmd = DEVLINK_CMD_DPIPE_HEADERS_GET,
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
.doit = devlink_nl_cmd_dpipe_headers_get, .doit = devlink_nl_dpipe_headers_get_doit,
/* can be retrieved by unprivileged users */ /* can be retrieved by unprivileged users */
}, },
{ {
.cmd = DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET, .cmd = DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET,
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
.doit = devlink_nl_cmd_dpipe_table_counters_set, .doit = devlink_nl_dpipe_table_counters_set_doit,
.flags = GENL_ADMIN_PERM, .flags = GENL_ADMIN_PERM,
}, },
{ {
.cmd = DEVLINK_CMD_RESOURCE_SET, .cmd = DEVLINK_CMD_RESOURCE_SET,
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
.doit = devlink_nl_cmd_resource_set, .doit = devlink_nl_resource_set_doit,
.flags = GENL_ADMIN_PERM, .flags = GENL_ADMIN_PERM,
}, },
{ {
.cmd = DEVLINK_CMD_RESOURCE_DUMP, .cmd = DEVLINK_CMD_RESOURCE_DUMP,
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
.doit = devlink_nl_cmd_resource_dump, .doit = devlink_nl_resource_dump_doit,
/* can be retrieved by unprivileged users */ /* can be retrieved by unprivileged users */
}, },
{ {
.cmd = DEVLINK_CMD_RELOAD, .cmd = DEVLINK_CMD_RELOAD,
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
.doit = devlink_nl_cmd_reload, .doit = devlink_nl_reload_doit,
.flags = GENL_ADMIN_PERM, .flags = GENL_ADMIN_PERM,
}, },
{ {
.cmd = DEVLINK_CMD_PARAM_SET, .cmd = DEVLINK_CMD_PARAM_SET,
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
.doit = devlink_nl_cmd_param_set_doit, .doit = devlink_nl_param_set_doit,
.flags = GENL_ADMIN_PERM, .flags = GENL_ADMIN_PERM,
}, },
{ {
.cmd = DEVLINK_CMD_PORT_PARAM_GET, .cmd = DEVLINK_CMD_PORT_PARAM_GET,
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
.doit = devlink_nl_cmd_port_param_get_doit, .doit = devlink_nl_port_param_get_doit,
.dumpit = devlink_nl_cmd_port_param_get_dumpit, .dumpit = devlink_nl_port_param_get_dumpit,
.internal_flags = DEVLINK_NL_FLAG_NEED_PORT, .internal_flags = DEVLINK_NL_FLAG_NEED_PORT,
/* can be retrieved by unprivileged users */ /* can be retrieved by unprivileged users */
}, },
{ {
.cmd = DEVLINK_CMD_PORT_PARAM_SET, .cmd = DEVLINK_CMD_PORT_PARAM_SET,
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
.doit = devlink_nl_cmd_port_param_set_doit, .doit = devlink_nl_port_param_set_doit,
.flags = GENL_ADMIN_PERM, .flags = GENL_ADMIN_PERM,
.internal_flags = DEVLINK_NL_FLAG_NEED_PORT, .internal_flags = DEVLINK_NL_FLAG_NEED_PORT,
}, },
{ {
.cmd = DEVLINK_CMD_REGION_NEW, .cmd = DEVLINK_CMD_REGION_NEW,
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
.doit = devlink_nl_cmd_region_new, .doit = devlink_nl_region_new_doit,
.flags = GENL_ADMIN_PERM, .flags = GENL_ADMIN_PERM,
}, },
{ {
.cmd = DEVLINK_CMD_REGION_DEL, .cmd = DEVLINK_CMD_REGION_DEL,
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
.doit = devlink_nl_cmd_region_del, .doit = devlink_nl_region_del_doit,
.flags = GENL_ADMIN_PERM, .flags = GENL_ADMIN_PERM,
}, },
{ {
.cmd = DEVLINK_CMD_REGION_READ, .cmd = DEVLINK_CMD_REGION_READ,
.validate = GENL_DONT_VALIDATE_STRICT | .validate = GENL_DONT_VALIDATE_STRICT |
GENL_DONT_VALIDATE_DUMP_STRICT, GENL_DONT_VALIDATE_DUMP_STRICT,
.dumpit = devlink_nl_cmd_region_read_dumpit, .dumpit = devlink_nl_region_read_dumpit,
.flags = GENL_ADMIN_PERM, .flags = GENL_ADMIN_PERM,
}, },
{ {
.cmd = DEVLINK_CMD_HEALTH_REPORTER_SET, .cmd = DEVLINK_CMD_HEALTH_REPORTER_SET,
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
.doit = devlink_nl_cmd_health_reporter_set_doit, .doit = devlink_nl_health_reporter_set_doit,
.flags = GENL_ADMIN_PERM, .flags = GENL_ADMIN_PERM,
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK_OR_PORT, .internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK_OR_PORT,
}, },
{ {
.cmd = DEVLINK_CMD_HEALTH_REPORTER_RECOVER, .cmd = DEVLINK_CMD_HEALTH_REPORTER_RECOVER,
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
.doit = devlink_nl_cmd_health_reporter_recover_doit, .doit = devlink_nl_health_reporter_recover_doit,
.flags = GENL_ADMIN_PERM, .flags = GENL_ADMIN_PERM,
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK_OR_PORT, .internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK_OR_PORT,
}, },
{ {
.cmd = DEVLINK_CMD_HEALTH_REPORTER_DIAGNOSE, .cmd = DEVLINK_CMD_HEALTH_REPORTER_DIAGNOSE,
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
.doit = devlink_nl_cmd_health_reporter_diagnose_doit, .doit = devlink_nl_health_reporter_diagnose_doit,
.flags = GENL_ADMIN_PERM, .flags = GENL_ADMIN_PERM,
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK_OR_PORT, .internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK_OR_PORT,
}, },
...@@ -492,47 +492,47 @@ static const struct genl_small_ops devlink_nl_small_ops[40] = { ...@@ -492,47 +492,47 @@ static const struct genl_small_ops devlink_nl_small_ops[40] = {
.cmd = DEVLINK_CMD_HEALTH_REPORTER_DUMP_GET, .cmd = DEVLINK_CMD_HEALTH_REPORTER_DUMP_GET,
.validate = GENL_DONT_VALIDATE_STRICT | .validate = GENL_DONT_VALIDATE_STRICT |
GENL_DONT_VALIDATE_DUMP_STRICT, GENL_DONT_VALIDATE_DUMP_STRICT,
.dumpit = devlink_nl_cmd_health_reporter_dump_get_dumpit, .dumpit = devlink_nl_health_reporter_dump_get_dumpit,
.flags = GENL_ADMIN_PERM, .flags = GENL_ADMIN_PERM,
}, },
{ {
.cmd = DEVLINK_CMD_HEALTH_REPORTER_DUMP_CLEAR, .cmd = DEVLINK_CMD_HEALTH_REPORTER_DUMP_CLEAR,
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
.doit = devlink_nl_cmd_health_reporter_dump_clear_doit, .doit = devlink_nl_health_reporter_dump_clear_doit,
.flags = GENL_ADMIN_PERM, .flags = GENL_ADMIN_PERM,
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK_OR_PORT, .internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK_OR_PORT,
}, },
{ {
.cmd = DEVLINK_CMD_HEALTH_REPORTER_TEST, .cmd = DEVLINK_CMD_HEALTH_REPORTER_TEST,
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
.doit = devlink_nl_cmd_health_reporter_test_doit, .doit = devlink_nl_health_reporter_test_doit,
.flags = GENL_ADMIN_PERM, .flags = GENL_ADMIN_PERM,
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK_OR_PORT, .internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK_OR_PORT,
}, },
{ {
.cmd = DEVLINK_CMD_FLASH_UPDATE, .cmd = DEVLINK_CMD_FLASH_UPDATE,
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
.doit = devlink_nl_cmd_flash_update, .doit = devlink_nl_flash_update_doit,
.flags = GENL_ADMIN_PERM, .flags = GENL_ADMIN_PERM,
}, },
{ {
.cmd = DEVLINK_CMD_TRAP_SET, .cmd = DEVLINK_CMD_TRAP_SET,
.doit = devlink_nl_cmd_trap_set_doit, .doit = devlink_nl_trap_set_doit,
.flags = GENL_ADMIN_PERM, .flags = GENL_ADMIN_PERM,
}, },
{ {
.cmd = DEVLINK_CMD_TRAP_GROUP_SET, .cmd = DEVLINK_CMD_TRAP_GROUP_SET,
.doit = devlink_nl_cmd_trap_group_set_doit, .doit = devlink_nl_trap_group_set_doit,
.flags = GENL_ADMIN_PERM, .flags = GENL_ADMIN_PERM,
}, },
{ {
.cmd = DEVLINK_CMD_TRAP_POLICER_SET, .cmd = DEVLINK_CMD_TRAP_POLICER_SET,
.doit = devlink_nl_cmd_trap_policer_set_doit, .doit = devlink_nl_trap_policer_set_doit,
.flags = GENL_ADMIN_PERM, .flags = GENL_ADMIN_PERM,
}, },
{ {
.cmd = DEVLINK_CMD_SELFTESTS_RUN, .cmd = DEVLINK_CMD_SELFTESTS_RUN,
.doit = devlink_nl_cmd_selftests_run, .doit = devlink_nl_selftests_run_doit,
.flags = GENL_ADMIN_PERM, .flags = GENL_ADMIN_PERM,
}, },
/* -- No new ops here! Use split ops going forward! -- */ /* -- No new ops here! Use split ops going forward! -- */
......
...@@ -581,7 +581,7 @@ static int __devlink_nl_cmd_param_set_doit(struct devlink *devlink, ...@@ -581,7 +581,7 @@ static int __devlink_nl_cmd_param_set_doit(struct devlink *devlink,
return 0; return 0;
} }
int devlink_nl_cmd_param_set_doit(struct sk_buff *skb, struct genl_info *info) int devlink_nl_param_set_doit(struct sk_buff *skb, struct genl_info *info)
{ {
struct devlink *devlink = info->user_ptr[0]; struct devlink *devlink = info->user_ptr[0];
...@@ -589,22 +589,22 @@ int devlink_nl_cmd_param_set_doit(struct sk_buff *skb, struct genl_info *info) ...@@ -589,22 +589,22 @@ int devlink_nl_cmd_param_set_doit(struct sk_buff *skb, struct genl_info *info)
info, DEVLINK_CMD_PARAM_NEW); info, DEVLINK_CMD_PARAM_NEW);
} }
int devlink_nl_cmd_port_param_get_dumpit(struct sk_buff *msg, int devlink_nl_port_param_get_dumpit(struct sk_buff *msg,
struct netlink_callback *cb) struct netlink_callback *cb)
{ {
NL_SET_ERR_MSG(cb->extack, "Port params are not supported"); NL_SET_ERR_MSG(cb->extack, "Port params are not supported");
return msg->len; return msg->len;
} }
int devlink_nl_cmd_port_param_get_doit(struct sk_buff *skb, int devlink_nl_port_param_get_doit(struct sk_buff *skb,
struct genl_info *info) struct genl_info *info)
{ {
NL_SET_ERR_MSG(info->extack, "Port params are not supported"); NL_SET_ERR_MSG(info->extack, "Port params are not supported");
return -EINVAL; return -EINVAL;
} }
int devlink_nl_cmd_port_param_set_doit(struct sk_buff *skb, int devlink_nl_port_param_set_doit(struct sk_buff *skb,
struct genl_info *info) struct genl_info *info)
{ {
NL_SET_ERR_MSG(info->extack, "Port params are not supported"); NL_SET_ERR_MSG(info->extack, "Port params are not supported");
return -EINVAL; return -EINVAL;
......
...@@ -772,7 +772,7 @@ static int devlink_port_function_set(struct devlink_port *port, ...@@ -772,7 +772,7 @@ static int devlink_port_function_set(struct devlink_port *port,
return err; return err;
} }
int devlink_nl_cmd_port_set_doit(struct sk_buff *skb, struct genl_info *info) int devlink_nl_port_set_doit(struct sk_buff *skb, struct genl_info *info)
{ {
struct devlink_port *devlink_port = info->user_ptr[1]; struct devlink_port *devlink_port = info->user_ptr[1];
int err; int err;
...@@ -798,7 +798,7 @@ int devlink_nl_cmd_port_set_doit(struct sk_buff *skb, struct genl_info *info) ...@@ -798,7 +798,7 @@ int devlink_nl_cmd_port_set_doit(struct sk_buff *skb, struct genl_info *info)
return 0; return 0;
} }
int devlink_nl_cmd_port_split_doit(struct sk_buff *skb, struct genl_info *info) int devlink_nl_port_split_doit(struct sk_buff *skb, struct genl_info *info)
{ {
struct devlink_port *devlink_port = info->user_ptr[1]; struct devlink_port *devlink_port = info->user_ptr[1];
struct devlink *devlink = info->user_ptr[0]; struct devlink *devlink = info->user_ptr[0];
...@@ -829,8 +829,7 @@ int devlink_nl_cmd_port_split_doit(struct sk_buff *skb, struct genl_info *info) ...@@ -829,8 +829,7 @@ int devlink_nl_cmd_port_split_doit(struct sk_buff *skb, struct genl_info *info)
info->extack); info->extack);
} }
int devlink_nl_cmd_port_unsplit_doit(struct sk_buff *skb, int devlink_nl_port_unsplit_doit(struct sk_buff *skb, struct genl_info *info)
struct genl_info *info)
{ {
struct devlink_port *devlink_port = info->user_ptr[1]; struct devlink_port *devlink_port = info->user_ptr[1];
struct devlink *devlink = info->user_ptr[0]; struct devlink *devlink = info->user_ptr[0];
...@@ -840,7 +839,7 @@ int devlink_nl_cmd_port_unsplit_doit(struct sk_buff *skb, ...@@ -840,7 +839,7 @@ int devlink_nl_cmd_port_unsplit_doit(struct sk_buff *skb,
return devlink_port->ops->port_unsplit(devlink, devlink_port, info->extack); return devlink_port->ops->port_unsplit(devlink, devlink_port, info->extack);
} }
int devlink_nl_cmd_port_new_doit(struct sk_buff *skb, struct genl_info *info) int devlink_nl_port_new_doit(struct sk_buff *skb, struct genl_info *info)
{ {
struct netlink_ext_ack *extack = info->extack; struct netlink_ext_ack *extack = info->extack;
struct devlink_port_new_attrs new_attrs = {}; struct devlink_port_new_attrs new_attrs = {};
...@@ -904,7 +903,7 @@ int devlink_nl_cmd_port_new_doit(struct sk_buff *skb, struct genl_info *info) ...@@ -904,7 +903,7 @@ int devlink_nl_cmd_port_new_doit(struct sk_buff *skb, struct genl_info *info)
return err; return err;
} }
int devlink_nl_cmd_port_del_doit(struct sk_buff *skb, struct genl_info *info) int devlink_nl_port_del_doit(struct sk_buff *skb, struct genl_info *info)
{ {
struct devlink_port *devlink_port = info->user_ptr[1]; struct devlink_port *devlink_port = info->user_ptr[1];
struct netlink_ext_ack *extack = info->extack; struct netlink_ext_ack *extack = info->extack;
......
...@@ -458,7 +458,7 @@ static bool devlink_rate_set_ops_supported(const struct devlink_ops *ops, ...@@ -458,7 +458,7 @@ static bool devlink_rate_set_ops_supported(const struct devlink_ops *ops,
return true; return true;
} }
int devlink_nl_cmd_rate_set_doit(struct sk_buff *skb, struct genl_info *info) int devlink_nl_rate_set_doit(struct sk_buff *skb, struct genl_info *info)
{ {
struct devlink *devlink = info->user_ptr[0]; struct devlink *devlink = info->user_ptr[0];
struct devlink_rate *devlink_rate; struct devlink_rate *devlink_rate;
...@@ -480,7 +480,7 @@ int devlink_nl_cmd_rate_set_doit(struct sk_buff *skb, struct genl_info *info) ...@@ -480,7 +480,7 @@ int devlink_nl_cmd_rate_set_doit(struct sk_buff *skb, struct genl_info *info)
return err; return err;
} }
int devlink_nl_cmd_rate_new_doit(struct sk_buff *skb, struct genl_info *info) int devlink_nl_rate_new_doit(struct sk_buff *skb, struct genl_info *info)
{ {
struct devlink *devlink = info->user_ptr[0]; struct devlink *devlink = info->user_ptr[0];
struct devlink_rate *rate_node; struct devlink_rate *rate_node;
...@@ -536,7 +536,7 @@ int devlink_nl_cmd_rate_new_doit(struct sk_buff *skb, struct genl_info *info) ...@@ -536,7 +536,7 @@ int devlink_nl_cmd_rate_new_doit(struct sk_buff *skb, struct genl_info *info)
return err; return err;
} }
int devlink_nl_cmd_rate_del_doit(struct sk_buff *skb, struct genl_info *info) int devlink_nl_rate_del_doit(struct sk_buff *skb, struct genl_info *info)
{ {
struct devlink *devlink = info->user_ptr[0]; struct devlink *devlink = info->user_ptr[0];
struct devlink_rate *rate_node; struct devlink_rate *rate_node;
......
...@@ -588,7 +588,7 @@ int devlink_nl_region_get_dumpit(struct sk_buff *skb, ...@@ -588,7 +588,7 @@ int devlink_nl_region_get_dumpit(struct sk_buff *skb,
return devlink_nl_dumpit(skb, cb, devlink_nl_region_get_dump_one); return devlink_nl_dumpit(skb, cb, devlink_nl_region_get_dump_one);
} }
int devlink_nl_cmd_region_del(struct sk_buff *skb, struct genl_info *info) int devlink_nl_region_del_doit(struct sk_buff *skb, struct genl_info *info)
{ {
struct devlink *devlink = info->user_ptr[0]; struct devlink *devlink = info->user_ptr[0];
struct devlink_snapshot *snapshot; struct devlink_snapshot *snapshot;
...@@ -633,7 +633,7 @@ int devlink_nl_cmd_region_del(struct sk_buff *skb, struct genl_info *info) ...@@ -633,7 +633,7 @@ int devlink_nl_cmd_region_del(struct sk_buff *skb, struct genl_info *info)
return 0; return 0;
} }
int devlink_nl_cmd_region_new(struct sk_buff *skb, struct genl_info *info) int devlink_nl_region_new_doit(struct sk_buff *skb, struct genl_info *info)
{ {
struct devlink *devlink = info->user_ptr[0]; struct devlink *devlink = info->user_ptr[0];
struct devlink_snapshot *snapshot; struct devlink_snapshot *snapshot;
...@@ -863,8 +863,8 @@ devlink_region_direct_fill(void *cb_priv, u8 *chunk, u32 chunk_size, ...@@ -863,8 +863,8 @@ devlink_region_direct_fill(void *cb_priv, u8 *chunk, u32 chunk_size,
curr_offset, chunk_size, chunk); curr_offset, chunk_size, chunk);
} }
int devlink_nl_cmd_region_read_dumpit(struct sk_buff *skb, int devlink_nl_region_read_dumpit(struct sk_buff *skb,
struct netlink_callback *cb) struct netlink_callback *cb)
{ {
const struct genl_dumpit_info *info = genl_dumpit_info(cb); const struct genl_dumpit_info *info = genl_dumpit_info(cb);
struct devlink_nl_dump_state *state = devlink_dump_state(cb); struct devlink_nl_dump_state *state = devlink_dump_state(cb);
......
...@@ -105,7 +105,7 @@ devlink_resource_validate_size(struct devlink_resource *resource, u64 size, ...@@ -105,7 +105,7 @@ devlink_resource_validate_size(struct devlink_resource *resource, u64 size,
return err; return err;
} }
int devlink_nl_cmd_resource_set(struct sk_buff *skb, struct genl_info *info) int devlink_nl_resource_set_doit(struct sk_buff *skb, struct genl_info *info)
{ {
struct devlink *devlink = info->user_ptr[0]; struct devlink *devlink = info->user_ptr[0];
struct devlink_resource *resource; struct devlink_resource *resource;
...@@ -285,7 +285,7 @@ static int devlink_resource_fill(struct genl_info *info, ...@@ -285,7 +285,7 @@ static int devlink_resource_fill(struct genl_info *info,
return err; return err;
} }
int devlink_nl_cmd_resource_dump(struct sk_buff *skb, struct genl_info *info) int devlink_nl_resource_dump_doit(struct sk_buff *skb, struct genl_info *info)
{ {
struct devlink *devlink = info->user_ptr[0]; struct devlink *devlink = info->user_ptr[0];
......
...@@ -413,7 +413,7 @@ static int devlink_sb_pool_set(struct devlink *devlink, unsigned int sb_index, ...@@ -413,7 +413,7 @@ static int devlink_sb_pool_set(struct devlink *devlink, unsigned int sb_index,
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
int devlink_nl_cmd_sb_pool_set_doit(struct sk_buff *skb, struct genl_info *info) int devlink_nl_sb_pool_set_doit(struct sk_buff *skb, struct genl_info *info)
{ {
struct devlink *devlink = info->user_ptr[0]; struct devlink *devlink = info->user_ptr[0];
enum devlink_sb_threshold_type threshold_type; enum devlink_sb_threshold_type threshold_type;
...@@ -621,8 +621,8 @@ static int devlink_sb_port_pool_set(struct devlink_port *devlink_port, ...@@ -621,8 +621,8 @@ static int devlink_sb_port_pool_set(struct devlink_port *devlink_port,
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
int devlink_nl_cmd_sb_port_pool_set_doit(struct sk_buff *skb, int devlink_nl_sb_port_pool_set_doit(struct sk_buff *skb,
struct genl_info *info) struct genl_info *info)
{ {
struct devlink_port *devlink_port = info->user_ptr[1]; struct devlink_port *devlink_port = info->user_ptr[1];
struct devlink *devlink = info->user_ptr[0]; struct devlink *devlink = info->user_ptr[0];
...@@ -861,8 +861,8 @@ static int devlink_sb_tc_pool_bind_set(struct devlink_port *devlink_port, ...@@ -861,8 +861,8 @@ static int devlink_sb_tc_pool_bind_set(struct devlink_port *devlink_port,
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
int devlink_nl_cmd_sb_tc_pool_bind_set_doit(struct sk_buff *skb, int devlink_nl_sb_tc_pool_bind_set_doit(struct sk_buff *skb,
struct genl_info *info) struct genl_info *info)
{ {
struct devlink_port *devlink_port = info->user_ptr[1]; struct devlink_port *devlink_port = info->user_ptr[1];
struct devlink *devlink = info->user_ptr[0]; struct devlink *devlink = info->user_ptr[0];
...@@ -900,8 +900,7 @@ int devlink_nl_cmd_sb_tc_pool_bind_set_doit(struct sk_buff *skb, ...@@ -900,8 +900,7 @@ int devlink_nl_cmd_sb_tc_pool_bind_set_doit(struct sk_buff *skb,
pool_index, threshold, info->extack); pool_index, threshold, info->extack);
} }
int devlink_nl_cmd_sb_occ_snapshot_doit(struct sk_buff *skb, int devlink_nl_sb_occ_snapshot_doit(struct sk_buff *skb, struct genl_info *info)
struct genl_info *info)
{ {
struct devlink *devlink = info->user_ptr[0]; struct devlink *devlink = info->user_ptr[0];
const struct devlink_ops *ops = devlink->ops; const struct devlink_ops *ops = devlink->ops;
...@@ -916,8 +915,8 @@ int devlink_nl_cmd_sb_occ_snapshot_doit(struct sk_buff *skb, ...@@ -916,8 +915,8 @@ int devlink_nl_cmd_sb_occ_snapshot_doit(struct sk_buff *skb,
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
int devlink_nl_cmd_sb_occ_max_clear_doit(struct sk_buff *skb, int devlink_nl_sb_occ_max_clear_doit(struct sk_buff *skb,
struct genl_info *info) struct genl_info *info)
{ {
struct devlink *devlink = info->user_ptr[0]; struct devlink *devlink = info->user_ptr[0];
const struct devlink_ops *ops = devlink->ops; const struct devlink_ops *ops = devlink->ops;
......
...@@ -414,7 +414,7 @@ static int devlink_trap_action_set(struct devlink *devlink, ...@@ -414,7 +414,7 @@ static int devlink_trap_action_set(struct devlink *devlink,
info->extack); info->extack);
} }
int devlink_nl_cmd_trap_set_doit(struct sk_buff *skb, struct genl_info *info) int devlink_nl_trap_set_doit(struct sk_buff *skb, struct genl_info *info)
{ {
struct netlink_ext_ack *extack = info->extack; struct netlink_ext_ack *extack = info->extack;
struct devlink *devlink = info->user_ptr[0]; struct devlink *devlink = info->user_ptr[0];
...@@ -684,8 +684,7 @@ static int devlink_trap_group_set(struct devlink *devlink, ...@@ -684,8 +684,7 @@ static int devlink_trap_group_set(struct devlink *devlink,
return 0; return 0;
} }
int devlink_nl_cmd_trap_group_set_doit(struct sk_buff *skb, int devlink_nl_trap_group_set_doit(struct sk_buff *skb, struct genl_info *info)
struct genl_info *info)
{ {
struct netlink_ext_ack *extack = info->extack; struct netlink_ext_ack *extack = info->extack;
struct devlink *devlink = info->user_ptr[0]; struct devlink *devlink = info->user_ptr[0];
...@@ -926,8 +925,8 @@ devlink_trap_policer_set(struct devlink *devlink, ...@@ -926,8 +925,8 @@ devlink_trap_policer_set(struct devlink *devlink,
return 0; return 0;
} }
int devlink_nl_cmd_trap_policer_set_doit(struct sk_buff *skb, int devlink_nl_trap_policer_set_doit(struct sk_buff *skb,
struct genl_info *info) struct genl_info *info)
{ {
struct devlink_trap_policer_item *policer_item; struct devlink_trap_policer_item *policer_item;
struct netlink_ext_ack *extack = info->extack; struct netlink_ext_ack *extack = info->extack;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment