diff options
author | Jakub Kicinski <kuba@kernel.org> | 2023-08-14 23:47:19 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-08-16 00:01:03 +0200 |
commit | 5c670a010de46687ed27553602d8131ce4d7a9fb (patch) | |
tree | 21e6b86bf8601507147e8a28c50d89bcfffc9419 /include/net/genetlink.h | |
parent | genetlink: use attrs from struct genl_info (diff) | |
download | linux-5c670a010de46687ed27553602d8131ce4d7a9fb.tar.xz linux-5c670a010de46687ed27553602d8131ce4d7a9fb.zip |
genetlink: add a family pointer to struct genl_info
Having family in struct genl_info is quite useful. It cuts
down the number of arguments which need to be passed to
helpers which already take struct genl_info.
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Link: https://lore.kernel.org/r/20230814214723.2924989-7-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/net/genetlink.h')
-rw-r--r-- | include/net/genetlink.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/genetlink.h b/include/net/genetlink.h index a8a15b9c22c8..6b858c4cba5b 100644 --- a/include/net/genetlink.h +++ b/include/net/genetlink.h @@ -93,6 +93,7 @@ struct genl_family { * struct genl_info - receiving information * @snd_seq: sending sequence number * @snd_portid: netlink portid of sender + * @family: generic netlink family * @nlhdr: netlink message header * @genlhdr: generic netlink message header * @attrs: netlink attributes @@ -103,6 +104,7 @@ struct genl_family { struct genl_info { u32 snd_seq; u32 snd_portid; + const struct genl_family *family; const struct nlmsghdr * nlhdr; struct genlmsghdr * genlhdr; struct nlattr ** attrs; @@ -247,13 +249,11 @@ struct genl_split_ops { /** * struct genl_dumpit_info - info that is available during dumpit op call - * @family: generic netlink family - for internal genl code usage * @op: generic netlink ops - for internal genl code usage * @attrs: netlink attributes * @info: struct genl_info describing the request */ struct genl_dumpit_info { - const struct genl_family *family; struct genl_split_ops op; struct genl_info info; }; |