diff options
author | Jiri Pirko <jiri@nvidia.com> | 2023-12-16 15:29:56 +0300 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2023-12-19 17:31:40 +0300 |
commit | 5648de0b1f2b68bffce9bdd49a276607b9a3e3d4 (patch) | |
tree | a368a145818c5e5d8e1b20b42215b0af4c59e96b /net/devlink/devl_internal.h | |
parent | cddbff470e3318834af518168d3a917b6e975062 (diff) | |
download | linux-5648de0b1f2b68bffce9bdd49a276607b9a3e3d4.tar.xz |
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/devl_internal.h')
-rw-r--r-- | net/devlink/devl_internal.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/devlink/devl_internal.h b/net/devlink/devl_internal.h index 510990de094e..84dc9628d3f2 100644 --- a/net/devlink/devl_internal.h +++ b/net/devlink/devl_internal.h @@ -191,6 +191,13 @@ static inline bool devlink_nl_notify_need(struct devlink *devlink) DEVLINK_MCGRP_CONFIG); } +static inline void devlink_nl_notify_send(struct devlink *devlink, + struct sk_buff *msg) +{ + genlmsg_multicast_netns(&devlink_nl_family, devlink_net(devlink), + msg, 0, DEVLINK_MCGRP_CONFIG, GFP_KERNEL); +} + /* Notify */ void devlink_notify_register(struct devlink *devlink); void devlink_notify_unregister(struct devlink *devlink); |