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

devlink: remove "gen" from struct devlink_gen_cmd name

No need to have "gen" inside name of the structure for devlink commands.
Remove it.
Signed-off-by: default avatarJiri Pirko <jiri@nvidia.com>
Reviewed-by: default avatarLeon Romanovsky <leonro@nvidia.com>
Reviewed-by: default avatarJacob Keller <jacob.e.keller@intel.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent c3a4fd57
...@@ -115,7 +115,7 @@ struct devlink_nl_dump_state { ...@@ -115,7 +115,7 @@ struct devlink_nl_dump_state {
}; };
}; };
struct devlink_gen_cmd { struct devlink_cmd {
int (*dump_one)(struct sk_buff *msg, struct devlink *devlink, int (*dump_one)(struct sk_buff *msg, struct devlink *devlink,
struct netlink_callback *cb); struct netlink_callback *cb);
}; };
...@@ -139,22 +139,22 @@ devlink_dump_state(struct netlink_callback *cb) ...@@ -139,22 +139,22 @@ devlink_dump_state(struct netlink_callback *cb)
return (struct devlink_nl_dump_state *)cb->ctx; return (struct devlink_nl_dump_state *)cb->ctx;
} }
/* gen cmds */ /* Commands */
extern const struct devlink_gen_cmd devl_gen_inst; extern const struct devlink_cmd devl_gen_inst;
extern const struct devlink_gen_cmd devl_gen_port; extern const struct devlink_cmd devl_gen_port;
extern const struct devlink_gen_cmd devl_gen_sb; extern const struct devlink_cmd devl_gen_sb;
extern const struct devlink_gen_cmd devl_gen_sb_pool; extern const struct devlink_cmd devl_gen_sb_pool;
extern const struct devlink_gen_cmd devl_gen_sb_port_pool; extern const struct devlink_cmd devl_gen_sb_port_pool;
extern const struct devlink_gen_cmd devl_gen_sb_tc_pool_bind; extern const struct devlink_cmd devl_gen_sb_tc_pool_bind;
extern const struct devlink_gen_cmd devl_gen_selftests; extern const struct devlink_cmd devl_gen_selftests;
extern const struct devlink_gen_cmd devl_gen_param; extern const struct devlink_cmd devl_gen_param;
extern const struct devlink_gen_cmd devl_gen_region; extern const struct devlink_cmd devl_gen_region;
extern const struct devlink_gen_cmd devl_gen_info; extern const struct devlink_cmd devl_gen_info;
extern const struct devlink_gen_cmd devl_gen_health_reporter; extern const struct devlink_cmd devl_gen_health_reporter;
extern const struct devlink_gen_cmd devl_gen_trap; extern const struct devlink_cmd devl_gen_trap;
extern const struct devlink_gen_cmd devl_gen_trap_group; extern const struct devlink_cmd devl_gen_trap_group;
extern const struct devlink_gen_cmd devl_gen_trap_policer; extern const struct devlink_cmd devl_gen_trap_policer;
extern const struct devlink_gen_cmd devl_gen_linecard; extern const struct devlink_cmd devl_gen_linecard;
/* Ports */ /* Ports */
int devlink_port_netdevice_event(struct notifier_block *nb, int devlink_port_netdevice_event(struct notifier_block *nb,
...@@ -182,7 +182,7 @@ struct devlink_linecard * ...@@ -182,7 +182,7 @@ struct devlink_linecard *
devlink_linecard_get_from_info(struct devlink *devlink, struct genl_info *info); devlink_linecard_get_from_info(struct devlink *devlink, struct genl_info *info);
/* Rates */ /* Rates */
extern const struct devlink_gen_cmd devl_gen_rate_get; extern const struct devlink_cmd devl_gen_rate_get;
struct devlink_rate * struct devlink_rate *
devlink_rate_get_from_info(struct devlink *devlink, struct genl_info *info); devlink_rate_get_from_info(struct devlink *devlink, struct genl_info *info);
......
...@@ -1236,7 +1236,7 @@ devlink_nl_cmd_rate_get_dump_one(struct sk_buff *msg, struct devlink *devlink, ...@@ -1236,7 +1236,7 @@ devlink_nl_cmd_rate_get_dump_one(struct sk_buff *msg, struct devlink *devlink,
return err; return err;
} }
const struct devlink_gen_cmd devl_gen_rate_get = { const struct devlink_cmd devl_gen_rate_get = {
.dump_one = devlink_nl_cmd_rate_get_dump_one, .dump_one = devlink_nl_cmd_rate_get_dump_one,
}; };
...@@ -1303,7 +1303,7 @@ devlink_nl_cmd_get_dump_one(struct sk_buff *msg, struct devlink *devlink, ...@@ -1303,7 +1303,7 @@ devlink_nl_cmd_get_dump_one(struct sk_buff *msg, struct devlink *devlink,
cb->nlh->nlmsg_seq, NLM_F_MULTI); cb->nlh->nlmsg_seq, NLM_F_MULTI);
} }
const struct devlink_gen_cmd devl_gen_inst = { const struct devlink_cmd devl_gen_inst = {
.dump_one = devlink_nl_cmd_get_dump_one, .dump_one = devlink_nl_cmd_get_dump_one,
}; };
...@@ -1359,7 +1359,7 @@ devlink_nl_cmd_port_get_dump_one(struct sk_buff *msg, struct devlink *devlink, ...@@ -1359,7 +1359,7 @@ devlink_nl_cmd_port_get_dump_one(struct sk_buff *msg, struct devlink *devlink,
return err; return err;
} }
const struct devlink_gen_cmd devl_gen_port = { const struct devlink_cmd devl_gen_port = {
.dump_one = devlink_nl_cmd_port_get_dump_one, .dump_one = devlink_nl_cmd_port_get_dump_one,
}; };
...@@ -2137,7 +2137,7 @@ static int devlink_nl_cmd_linecard_get_dump_one(struct sk_buff *msg, ...@@ -2137,7 +2137,7 @@ static int devlink_nl_cmd_linecard_get_dump_one(struct sk_buff *msg,
return err; return err;
} }
const struct devlink_gen_cmd devl_gen_linecard = { const struct devlink_cmd devl_gen_linecard = {
.dump_one = devlink_nl_cmd_linecard_get_dump_one, .dump_one = devlink_nl_cmd_linecard_get_dump_one,
}; };
...@@ -2392,7 +2392,7 @@ devlink_nl_cmd_sb_get_dump_one(struct sk_buff *msg, struct devlink *devlink, ...@@ -2392,7 +2392,7 @@ devlink_nl_cmd_sb_get_dump_one(struct sk_buff *msg, struct devlink *devlink,
return err; return err;
} }
const struct devlink_gen_cmd devl_gen_sb = { const struct devlink_cmd devl_gen_sb = {
.dump_one = devlink_nl_cmd_sb_get_dump_one, .dump_one = devlink_nl_cmd_sb_get_dump_one,
}; };
...@@ -2530,7 +2530,7 @@ devlink_nl_cmd_sb_pool_get_dump_one(struct sk_buff *msg, ...@@ -2530,7 +2530,7 @@ devlink_nl_cmd_sb_pool_get_dump_one(struct sk_buff *msg,
return err; return err;
} }
const struct devlink_gen_cmd devl_gen_sb_pool = { const struct devlink_cmd devl_gen_sb_pool = {
.dump_one = devlink_nl_cmd_sb_pool_get_dump_one, .dump_one = devlink_nl_cmd_sb_pool_get_dump_one,
}; };
...@@ -2738,7 +2738,7 @@ devlink_nl_cmd_sb_port_pool_get_dump_one(struct sk_buff *msg, ...@@ -2738,7 +2738,7 @@ devlink_nl_cmd_sb_port_pool_get_dump_one(struct sk_buff *msg,
return err; return err;
} }
const struct devlink_gen_cmd devl_gen_sb_port_pool = { const struct devlink_cmd devl_gen_sb_port_pool = {
.dump_one = devlink_nl_cmd_sb_port_pool_get_dump_one, .dump_one = devlink_nl_cmd_sb_port_pool_get_dump_one,
}; };
...@@ -2973,7 +2973,7 @@ devlink_nl_cmd_sb_tc_pool_bind_get_dump_one(struct sk_buff *msg, ...@@ -2973,7 +2973,7 @@ devlink_nl_cmd_sb_tc_pool_bind_get_dump_one(struct sk_buff *msg,
return err; return err;
} }
const struct devlink_gen_cmd devl_gen_sb_tc_pool_bind = { const struct devlink_cmd devl_gen_sb_tc_pool_bind = {
.dump_one = devlink_nl_cmd_sb_tc_pool_bind_get_dump_one, .dump_one = devlink_nl_cmd_sb_tc_pool_bind_get_dump_one,
}; };
...@@ -4785,7 +4785,7 @@ devlink_nl_cmd_selftests_get_dump_one(struct sk_buff *msg, ...@@ -4785,7 +4785,7 @@ devlink_nl_cmd_selftests_get_dump_one(struct sk_buff *msg,
cb->extack); cb->extack);
} }
const struct devlink_gen_cmd devl_gen_selftests = { const struct devlink_cmd devl_gen_selftests = {
.dump_one = devlink_nl_cmd_selftests_get_dump_one, .dump_one = devlink_nl_cmd_selftests_get_dump_one,
}; };
...@@ -5271,7 +5271,7 @@ devlink_nl_cmd_param_get_dump_one(struct sk_buff *msg, struct devlink *devlink, ...@@ -5271,7 +5271,7 @@ devlink_nl_cmd_param_get_dump_one(struct sk_buff *msg, struct devlink *devlink,
return err; return err;
} }
const struct devlink_gen_cmd devl_gen_param = { const struct devlink_cmd devl_gen_param = {
.dump_one = devlink_nl_cmd_param_get_dump_one, .dump_one = devlink_nl_cmd_param_get_dump_one,
}; };
...@@ -5978,7 +5978,7 @@ devlink_nl_cmd_region_get_dump_one(struct sk_buff *msg, struct devlink *devlink, ...@@ -5978,7 +5978,7 @@ devlink_nl_cmd_region_get_dump_one(struct sk_buff *msg, struct devlink *devlink,
return 0; return 0;
} }
const struct devlink_gen_cmd devl_gen_region = { const struct devlink_cmd devl_gen_region = {
.dump_one = devlink_nl_cmd_region_get_dump_one, .dump_one = devlink_nl_cmd_region_get_dump_one,
}; };
...@@ -6625,7 +6625,7 @@ devlink_nl_cmd_info_get_dump_one(struct sk_buff *msg, struct devlink *devlink, ...@@ -6625,7 +6625,7 @@ devlink_nl_cmd_info_get_dump_one(struct sk_buff *msg, struct devlink *devlink,
return err; return err;
} }
const struct devlink_gen_cmd devl_gen_info = { const struct devlink_cmd devl_gen_info = {
.dump_one = devlink_nl_cmd_info_get_dump_one, .dump_one = devlink_nl_cmd_info_get_dump_one,
}; };
...@@ -7793,7 +7793,7 @@ devlink_nl_cmd_health_reporter_get_dump_one(struct sk_buff *msg, ...@@ -7793,7 +7793,7 @@ devlink_nl_cmd_health_reporter_get_dump_one(struct sk_buff *msg,
return 0; return 0;
} }
const struct devlink_gen_cmd devl_gen_health_reporter = { const struct devlink_cmd devl_gen_health_reporter = {
.dump_one = devlink_nl_cmd_health_reporter_get_dump_one, .dump_one = devlink_nl_cmd_health_reporter_get_dump_one,
}; };
...@@ -8311,7 +8311,7 @@ devlink_nl_cmd_trap_get_dump_one(struct sk_buff *msg, struct devlink *devlink, ...@@ -8311,7 +8311,7 @@ devlink_nl_cmd_trap_get_dump_one(struct sk_buff *msg, struct devlink *devlink,
return err; return err;
} }
const struct devlink_gen_cmd devl_gen_trap = { const struct devlink_cmd devl_gen_trap = {
.dump_one = devlink_nl_cmd_trap_get_dump_one, .dump_one = devlink_nl_cmd_trap_get_dump_one,
}; };
...@@ -8524,7 +8524,7 @@ devlink_nl_cmd_trap_group_get_dump_one(struct sk_buff *msg, ...@@ -8524,7 +8524,7 @@ devlink_nl_cmd_trap_group_get_dump_one(struct sk_buff *msg,
return err; return err;
} }
const struct devlink_gen_cmd devl_gen_trap_group = { const struct devlink_cmd devl_gen_trap_group = {
.dump_one = devlink_nl_cmd_trap_group_get_dump_one, .dump_one = devlink_nl_cmd_trap_group_get_dump_one,
}; };
...@@ -8817,7 +8817,7 @@ devlink_nl_cmd_trap_policer_get_dump_one(struct sk_buff *msg, ...@@ -8817,7 +8817,7 @@ devlink_nl_cmd_trap_policer_get_dump_one(struct sk_buff *msg,
return err; return err;
} }
const struct devlink_gen_cmd devl_gen_trap_policer = { const struct devlink_cmd devl_gen_trap_policer = {
.dump_one = devlink_nl_cmd_trap_policer_get_dump_one, .dump_one = devlink_nl_cmd_trap_policer_get_dump_one,
}; };
......
...@@ -177,7 +177,7 @@ static void devlink_nl_post_doit(const struct genl_split_ops *ops, ...@@ -177,7 +177,7 @@ static void devlink_nl_post_doit(const struct genl_split_ops *ops,
devlink_put(devlink); devlink_put(devlink);
} }
static const struct devlink_gen_cmd *devl_gen_cmds[] = { static const struct devlink_cmd *devl_gen_cmds[] = {
[DEVLINK_CMD_GET] = &devl_gen_inst, [DEVLINK_CMD_GET] = &devl_gen_inst,
[DEVLINK_CMD_PORT_GET] = &devl_gen_port, [DEVLINK_CMD_PORT_GET] = &devl_gen_port,
[DEVLINK_CMD_SB_GET] = &devl_gen_sb, [DEVLINK_CMD_SB_GET] = &devl_gen_sb,
...@@ -201,7 +201,7 @@ int devlink_nl_instance_iter_dumpit(struct sk_buff *msg, ...@@ -201,7 +201,7 @@ int devlink_nl_instance_iter_dumpit(struct sk_buff *msg,
{ {
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);
const struct devlink_gen_cmd *cmd; const struct devlink_cmd *cmd;
struct devlink *devlink; struct devlink *devlink;
int err = 0; int err = 0;
......
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