diff options
author | Jiri Pirko <jiri@nvidia.com> | 2023-12-16 13:29:56 +0100 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2023-12-19 15:31:40 +0100 |
commit | 5648de0b1f2b68bffce9bdd49a276607b9a3e3d4 (patch) | |
tree | a368a145818c5e5d8e1b20b42215b0af4c59e96b /net/devlink/dev.c | |
parent | cddbff470e3318834af518168d3a917b6e975062 (diff) | |
download | lwn-5648de0b1f2b68bffce9bdd49a276607b9a3e3d4.tar.gz lwn-5648de0b1f2b68bffce9bdd49a276607b9a3e3d4.zip |
devlink: introduce a helper for netlink multicast send
Introduce a helper devlink_nl_notify_send() so each object notification
function does not have to call genlmsg_multicast_netns() with the same
arguments.
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net/devlink/dev.c')
-rw-r--r-- | net/devlink/dev.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/devlink/dev.c b/net/devlink/dev.c index 63fe3e02c928..19dbf540748a 100644 --- a/net/devlink/dev.c +++ b/net/devlink/dev.c @@ -217,8 +217,7 @@ static void devlink_notify(struct devlink *devlink, enum devlink_command cmd) return; } - genlmsg_multicast_netns(&devlink_nl_family, devlink_net(devlink), - msg, 0, DEVLINK_MCGRP_CONFIG, GFP_KERNEL); + devlink_nl_notify_send(devlink, msg); } int devlink_nl_get_doit(struct sk_buff *skb, struct genl_info *info) @@ -1013,8 +1012,7 @@ static void __devlink_flash_update_notify(struct devlink *devlink, if (err) goto out_free_msg; - genlmsg_multicast_netns(&devlink_nl_family, devlink_net(devlink), - msg, 0, DEVLINK_MCGRP_CONFIG, GFP_KERNEL); + devlink_nl_notify_send(devlink, msg); return; out_free_msg: |