net: mptcp: rename netlink handlers to mptcp_pm_nl_<blah>_{doit,dumpit}

so that they will match names generated from YAML spec.

Link: https://github.com/multipath-tcp/mptcp_net-next/issues/340
Suggested-by: Paolo Abeni <pabeni@redhat.com>
Acked-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Davide Caratti <dcaratti@redhat.com>
Signed-off-by: Mat Martineau <martineau@kernel.org>
Link: https://lore.kernel.org/r/20231023-send-net-next-20231023-1-v2-6-16b1f701f900@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Davide Caratti 2023-10-23 11:17:10 -07:00 committed by Jakub Kicinski
parent 9d1ed17f93
commit 1e07938e29
3 changed files with 32 additions and 32 deletions

View File

@ -1334,7 +1334,7 @@ next:
return 0;
}
static int mptcp_nl_cmd_add_addr(struct sk_buff *skb, struct genl_info *info)
static int mptcp_pm_nl_add_addr_doit(struct sk_buff *skb, struct genl_info *info)
{
struct nlattr *attr = info->attrs[MPTCP_PM_ENDPOINT_ADDR];
struct pm_nl_pernet *pernet = genl_info_pm_nl(info);
@ -1515,7 +1515,7 @@ next:
return 0;
}
static int mptcp_nl_cmd_del_addr(struct sk_buff *skb, struct genl_info *info)
static int mptcp_pm_nl_del_addr_doit(struct sk_buff *skb, struct genl_info *info)
{
struct nlattr *attr = info->attrs[MPTCP_PM_ENDPOINT_ADDR];
struct pm_nl_pernet *pernet = genl_info_pm_nl(info);
@ -1650,7 +1650,7 @@ static void __reset_counters(struct pm_nl_pernet *pernet)
pernet->addrs = 0;
}
static int mptcp_nl_cmd_flush_addrs(struct sk_buff *skb, struct genl_info *info)
static int mptcp_pm_nl_flush_addrs_doit(struct sk_buff *skb, struct genl_info *info)
{
struct pm_nl_pernet *pernet = genl_info_pm_nl(info);
LIST_HEAD(free_list);
@ -1706,7 +1706,7 @@ nla_put_failure:
return -EMSGSIZE;
}
static int mptcp_nl_cmd_get_addr(struct sk_buff *skb, struct genl_info *info)
static int mptcp_pm_nl_get_addr_doit(struct sk_buff *skb, struct genl_info *info)
{
struct nlattr *attr = info->attrs[MPTCP_PM_ENDPOINT_ADDR];
struct pm_nl_pernet *pernet = genl_info_pm_nl(info);
@ -1756,8 +1756,8 @@ fail:
return ret;
}
static int mptcp_nl_cmd_dump_addrs(struct sk_buff *msg,
struct netlink_callback *cb)
static int mptcp_pm_nl_get_addr_dumpit(struct sk_buff *msg,
struct netlink_callback *cb)
{
struct net *net = sock_net(msg->sk);
struct mptcp_pm_addr_entry *entry;
@ -1815,7 +1815,7 @@ static int parse_limit(struct genl_info *info, int id, unsigned int *limit)
}
static int
mptcp_nl_cmd_set_limits(struct sk_buff *skb, struct genl_info *info)
mptcp_pm_nl_set_limits_doit(struct sk_buff *skb, struct genl_info *info)
{
struct pm_nl_pernet *pernet = genl_info_pm_nl(info);
unsigned int rcv_addrs, subflows;
@ -1841,7 +1841,7 @@ unlock:
}
static int
mptcp_nl_cmd_get_limits(struct sk_buff *skb, struct genl_info *info)
mptcp_pm_nl_get_limits_doit(struct sk_buff *skb, struct genl_info *info)
{
struct pm_nl_pernet *pernet = genl_info_pm_nl(info);
struct sk_buff *msg;
@ -1950,7 +1950,7 @@ int mptcp_pm_nl_set_flags(struct net *net, struct mptcp_pm_addr_entry *addr, u8
return 0;
}
static int mptcp_nl_cmd_set_flags(struct sk_buff *skb, struct genl_info *info)
static int mptcp_pm_nl_set_flags_doit(struct sk_buff *skb, struct genl_info *info)
{
struct mptcp_pm_addr_entry remote = { .addr = { .family = AF_UNSPEC }, };
struct mptcp_pm_addr_entry addr = { .addr = { .family = AF_UNSPEC }, };
@ -2314,11 +2314,11 @@ nla_put_failure:
nlmsg_free(skb);
}
static const struct genl_ops mptcp_pm_ops[] = {
static const struct genl_ops mptcp_pm_nl_ops[] = {
{
.cmd = MPTCP_PM_CMD_ADD_ADDR,
.validate = GENL_DONT_VALIDATE_STRICT,
.doit = mptcp_nl_cmd_add_addr,
.doit = mptcp_pm_nl_add_addr_doit,
.policy = mptcp_pm_endpoint_nl_policy,
.maxattr = MPTCP_PM_ENDPOINT_ADDR,
.flags = GENL_UNS_ADMIN_PERM,
@ -2326,7 +2326,7 @@ static const struct genl_ops mptcp_pm_ops[] = {
{
.cmd = MPTCP_PM_CMD_DEL_ADDR,
.validate = GENL_DONT_VALIDATE_STRICT,
.doit = mptcp_nl_cmd_del_addr,
.doit = mptcp_pm_nl_del_addr_doit,
.policy = mptcp_pm_endpoint_nl_policy,
.maxattr = MPTCP_PM_ENDPOINT_ADDR,
.flags = GENL_UNS_ADMIN_PERM,
@ -2334,8 +2334,8 @@ static const struct genl_ops mptcp_pm_ops[] = {
{
.cmd = MPTCP_PM_CMD_GET_ADDR,
.validate = GENL_DONT_VALIDATE_STRICT,
.doit = mptcp_nl_cmd_get_addr,
.dumpit = mptcp_nl_cmd_dump_addrs,
.doit = mptcp_pm_nl_get_addr_doit,
.dumpit = mptcp_pm_nl_get_addr_dumpit,
.policy = mptcp_pm_endpoint_nl_policy,
.maxattr = MPTCP_PM_ENDPOINT_ADDR,
.flags = GENL_UNS_ADMIN_PERM,
@ -2343,7 +2343,7 @@ static const struct genl_ops mptcp_pm_ops[] = {
{
.cmd = MPTCP_PM_CMD_FLUSH_ADDRS,
.validate = GENL_DONT_VALIDATE_STRICT,
.doit = mptcp_nl_cmd_flush_addrs,
.doit = mptcp_pm_nl_flush_addrs_doit,
.policy = mptcp_pm_endpoint_nl_policy,
.maxattr = MPTCP_PM_ENDPOINT_ADDR,
.flags = GENL_UNS_ADMIN_PERM,
@ -2351,7 +2351,7 @@ static const struct genl_ops mptcp_pm_ops[] = {
{
.cmd = MPTCP_PM_CMD_SET_LIMITS,
.validate = GENL_DONT_VALIDATE_STRICT,
.doit = mptcp_nl_cmd_set_limits,
.doit = mptcp_pm_nl_set_limits_doit,
.policy = mptcp_pm_set_limits_nl_policy,
.maxattr = MPTCP_PM_ATTR_SUBFLOWS,
.flags = GENL_UNS_ADMIN_PERM,
@ -2359,14 +2359,14 @@ static const struct genl_ops mptcp_pm_ops[] = {
{
.cmd = MPTCP_PM_CMD_GET_LIMITS,
.validate = GENL_DONT_VALIDATE_STRICT,
.doit = mptcp_nl_cmd_get_limits,
.doit = mptcp_pm_nl_get_limits_doit,
.policy = mptcp_pm_set_limits_nl_policy,
.maxattr = MPTCP_PM_ATTR_SUBFLOWS,
},
{
.cmd = MPTCP_PM_CMD_SET_FLAGS,
.validate = GENL_DONT_VALIDATE_STRICT,
.doit = mptcp_nl_cmd_set_flags,
.doit = mptcp_pm_nl_set_flags_doit,
.policy = mptcp_pm_set_flags_nl_policy,
.maxattr = MPTCP_PM_ATTR_ADDR_REMOTE,
.flags = GENL_UNS_ADMIN_PERM,
@ -2374,7 +2374,7 @@ static const struct genl_ops mptcp_pm_ops[] = {
{
.cmd = MPTCP_PM_CMD_ANNOUNCE,
.validate = GENL_DONT_VALIDATE_STRICT,
.doit = mptcp_nl_cmd_announce,
.doit = mptcp_pm_nl_announce_doit,
.policy = mptcp_pm_announce_nl_policy,
.maxattr = MPTCP_PM_ATTR_TOKEN,
.flags = GENL_UNS_ADMIN_PERM,
@ -2382,7 +2382,7 @@ static const struct genl_ops mptcp_pm_ops[] = {
{
.cmd = MPTCP_PM_CMD_REMOVE,
.validate = GENL_DONT_VALIDATE_STRICT,
.doit = mptcp_nl_cmd_remove,
.doit = mptcp_pm_nl_remove_doit,
.policy = mptcp_pm_remove_nl_policy,
.maxattr = MPTCP_PM_ATTR_LOC_ID,
.flags = GENL_UNS_ADMIN_PERM,
@ -2390,7 +2390,7 @@ static const struct genl_ops mptcp_pm_ops[] = {
{
.cmd = MPTCP_PM_CMD_SUBFLOW_CREATE,
.validate = GENL_DONT_VALIDATE_STRICT,
.doit = mptcp_nl_cmd_sf_create,
.doit = mptcp_pm_nl_subflow_create_doit,
.policy = mptcp_pm_subflow_create_nl_policy,
.maxattr = MPTCP_PM_ATTR_ADDR_REMOTE,
.flags = GENL_UNS_ADMIN_PERM,
@ -2398,7 +2398,7 @@ static const struct genl_ops mptcp_pm_ops[] = {
{
.cmd = MPTCP_PM_CMD_SUBFLOW_DESTROY,
.validate = GENL_DONT_VALIDATE_STRICT,
.doit = mptcp_nl_cmd_sf_destroy,
.doit = mptcp_pm_nl_subflow_destroy_doit,
.policy = mptcp_pm_subflow_create_nl_policy,
.maxattr = MPTCP_PM_ATTR_ADDR_REMOTE,
.flags = GENL_UNS_ADMIN_PERM,
@ -2410,8 +2410,8 @@ static struct genl_family mptcp_genl_family __ro_after_init = {
.version = MPTCP_PM_VER,
.netnsok = true,
.module = THIS_MODULE,
.ops = mptcp_pm_ops,
.n_ops = ARRAY_SIZE(mptcp_pm_ops),
.ops = mptcp_pm_nl_ops,
.n_ops = ARRAY_SIZE(mptcp_pm_nl_ops),
.resv_start_op = MPTCP_PM_CMD_SUBFLOW_DESTROY + 1,
.mcgrps = mptcp_pm_mcgrps,
.n_mcgrps = ARRAY_SIZE(mptcp_pm_mcgrps),

View File

@ -145,7 +145,7 @@ int mptcp_userspace_pm_get_local_id(struct mptcp_sock *msk,
return mptcp_userspace_pm_append_new_local_addr(msk, &new_entry);
}
int mptcp_nl_cmd_announce(struct sk_buff *skb, struct genl_info *info)
int mptcp_pm_nl_announce_doit(struct sk_buff *skb, struct genl_info *info)
{
struct nlattr *token = info->attrs[MPTCP_PM_ATTR_TOKEN];
struct nlattr *addr = info->attrs[MPTCP_PM_ATTR_ADDR];
@ -208,7 +208,7 @@ int mptcp_nl_cmd_announce(struct sk_buff *skb, struct genl_info *info)
return err;
}
int mptcp_nl_cmd_remove(struct sk_buff *skb, struct genl_info *info)
int mptcp_pm_nl_remove_doit(struct sk_buff *skb, struct genl_info *info)
{
struct nlattr *token = info->attrs[MPTCP_PM_ATTR_TOKEN];
struct nlattr *id = info->attrs[MPTCP_PM_ATTR_LOC_ID];
@ -270,7 +270,7 @@ int mptcp_nl_cmd_remove(struct sk_buff *skb, struct genl_info *info)
return err;
}
int mptcp_nl_cmd_sf_create(struct sk_buff *skb, struct genl_info *info)
int mptcp_pm_nl_subflow_create_doit(struct sk_buff *skb, struct genl_info *info)
{
struct nlattr *raddr = info->attrs[MPTCP_PM_ATTR_ADDR_REMOTE];
struct nlattr *token = info->attrs[MPTCP_PM_ATTR_TOKEN];
@ -394,7 +394,7 @@ static struct sock *mptcp_nl_find_ssk(struct mptcp_sock *msk,
return NULL;
}
int mptcp_nl_cmd_sf_destroy(struct sk_buff *skb, struct genl_info *info)
int mptcp_pm_nl_subflow_destroy_doit(struct sk_buff *skb, struct genl_info *info)
{
struct nlattr *raddr = info->attrs[MPTCP_PM_ATTR_ADDR_REMOTE];
struct nlattr *token = info->attrs[MPTCP_PM_ATTR_TOKEN];

View File

@ -877,10 +877,10 @@ void mptcp_pm_remove_addrs_and_subflows(struct mptcp_sock *msk,
struct list_head *rm_list);
void mptcp_free_local_addr_list(struct mptcp_sock *msk);
int mptcp_nl_cmd_announce(struct sk_buff *skb, struct genl_info *info);
int mptcp_nl_cmd_remove(struct sk_buff *skb, struct genl_info *info);
int mptcp_nl_cmd_sf_create(struct sk_buff *skb, struct genl_info *info);
int mptcp_nl_cmd_sf_destroy(struct sk_buff *skb, struct genl_info *info);
int mptcp_pm_nl_announce_doit(struct sk_buff *skb, struct genl_info *info);
int mptcp_pm_nl_remove_doit(struct sk_buff *skb, struct genl_info *info);
int mptcp_pm_nl_subflow_create_doit(struct sk_buff *skb, struct genl_info *info);
int mptcp_pm_nl_subflow_destroy_doit(struct sk_buff *skb, struct genl_info *info);
void mptcp_event(enum mptcp_event_type type, const struct mptcp_sock *msk,
const struct sock *ssk, gfp_t gfp);