Commit Graph

5 Commits

Author SHA1 Message Date
Petr Oros 8b6e99b243 devlink: introduce a helper for netlink multicast send
JIRA: https://issues.redhat.com/browse/RHEL-30145

Upstream commit(s):
commit 5648de0b1f2b68bffce9bdd49a276607b9a3e3d4
Author: Jiri Pirko <jiri@nvidia.com>
Date:   Sat Dec 16 13:29:56 2023 +0100

    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>

Signed-off-by: Petr Oros <poros@redhat.com>
2024-04-26 17:16:10 +02:00
Petr Oros 9c60d75257 devlink: send notifications only if there are listeners
JIRA: https://issues.redhat.com/browse/RHEL-30145

Upstream commit(s):
commit cddbff470e3318834af518168d3a917b6e975062
Author: Jiri Pirko <jiri@nvidia.com>
Date:   Sat Dec 16 13:29:55 2023 +0100

    devlink: send notifications only if there are listeners

    Introduce devlink_nl_notify_need() helper and using it to check at the
    beginning of notification functions to avoid overhead of composing
    notification messages in case nobody listens.

    Signed-off-by: Jiri Pirko <jiri@nvidia.com>
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>

Signed-off-by: Petr Oros <poros@redhat.com>
2024-04-26 17:16:10 +02:00
Petr Oros 6975febb78 devlink: use devl_is_registered() helper instead xa_get_mark()
JIRA: https://issues.redhat.com/browse/RHEL-30145

Upstream commit(s):
commit 337ad364c48a0db7cedb5abb8d5e9163792fd596
Author: Jiri Pirko <jiri@nvidia.com>
Date:   Sat Dec 16 13:29:53 2023 +0100

    devlink: use devl_is_registered() helper instead xa_get_mark()

    Instead of checking the xarray mark directly using xa_get_mark() helper
    use devl_is_registered() helper which wraps it up. Note that there are
    couple more users of xa_get_mark() left which are going to be handled
    by the next patch.

    Signed-off-by: Jiri Pirko <jiri@nvidia.com>
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>

Signed-off-by: Petr Oros <poros@redhat.com>
2024-04-26 17:16:09 +02:00
Petr Oros 73146979d4 devlink: rename netlink callback to be aligned with the generated ones
JIRA: https://issues.redhat.com/browse/RHEL-30145

Upstream commit(s):
commit 53590934ba9549c55c57a32e2a6980139af00345
Author: Jiri Pirko <jiri@nvidia.com>
Date:   Sat Oct 21 13:27:08 2023 +0200

    devlink: rename netlink callback to be aligned with the generated ones

    All remaining doit and dumpit netlink callback functions are going to be
    used by generated split ops. They expect certain name format. Rename the
    callback to be aligned with generated names.

    Signed-off-by: Jiri Pirko <jiri@nvidia.com>
    Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
    Link: https://lore.kernel.org/r/20231021112711.660606-8-jiri@resnulli.us
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Signed-off-by: Petr Oros <poros@redhat.com>
2024-04-26 17:16:04 +02:00
Ivan Vecera 16e9a1e99d devlink: push trap related code into separate file
JIRA: https://issues.redhat.com/browse/RHEL-30656

commit 4bbdec80ff270a69b6b61644c597ad6657f2a58b
Author: Jiri Pirko <jiri@nvidia.com>
Date:   Mon Aug 28 08:16:52 2023 +0200

    devlink: push trap related code into separate file

    Cut out another chunk from leftover.c and put trap related code
    into a separate file.

    Signed-off-by: Jiri Pirko <jiri@nvidia.com>
    Link: https://lore.kernel.org/r/20230828061657.300667-11-jiri@resnulli.us
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Signed-off-by: Ivan Vecera <ivecera@redhat.com>
2024-04-10 09:19:33 +02:00