From: Jiri Pirko <jiri@resnulli.us>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
edumazet@google.com, michael.chan@broadcom.com,
yisen.zhuang@huawei.com, salil.mehta@huawei.com,
jesse.brandeburg@intel.com, anthony.l.nguyen@intel.com,
tariqt@nvidia.com, saeedm@nvidia.com, leon@kernel.org,
idosch@nvidia.com, petrm@nvidia.com, mailhol.vincent@wanadoo.fr,
jacob.e.keller@intel.com, maximmi@nvidia.com, gal@nvidia.com
Subject: Re: [patch net-next 7/8] devlink: convert reporters dump to devlink_nl_instance_iter_dump()
Date: Sat, 7 Jan 2023 11:11:13 +0100 [thread overview]
Message-ID: <Y7lFQa6kBN2AQqz3@nanopsycho> (raw)
In-Reply-To: <20230107094909.530239-8-jiri@resnulli.us>
Sat, Jan 07, 2023 at 10:49:08AM CET, jiri@resnulli.us wrote:
>From: Jiri Pirko <jiri@nvidia.com>
>
>Benefit from recently introduced instance iteration and convert
>reporters .dumpit generic netlink callback to use it.
>
>Signed-off-by: Jiri Pirko <jiri@nvidia.com>
>---
> net/devlink/devl_internal.h | 12 +----
> net/devlink/leftover.c | 87 ++++++++++++++++---------------------
> net/devlink/netlink.c | 6 ++-
> 3 files changed, 44 insertions(+), 61 deletions(-)
>
>diff --git a/net/devlink/devl_internal.h b/net/devlink/devl_internal.h
>index 52d958c1c977..2b0e119e7b84 100644
>--- a/net/devlink/devl_internal.h
>+++ b/net/devlink/devl_internal.h
>@@ -121,17 +121,6 @@ struct devlink_gen_cmd {
> struct netlink_callback *cb);
> };
>
>-/* Iterate over registered devlink instances for devlink dump.
>- * devlink_put() needs to be called for each iterated devlink pointer
>- * in loop body in order to release the reference.
>- * Note: this is NOT a generic iterator, it makes assumptions about the use
>- * of @state and can only be used once per dumpit implementation.
>- */
>-#define devlink_dump_for_each_instance_get(msg, state, devlink) \
>- for (; (devlink = devlinks_xa_find_get(sock_net(msg->sk), \
>- &state->instance)); \
>- state->instance++, state->idx = 0)
>-
I'm sorry, I managed to quash this during rebase by mistake. Sending v2.
next prev parent reply other threads:[~2023-01-07 10:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-07 9:49 [patch net-next 0/8] devlink: features, linecard and reporters locking cleanup Jiri Pirko
2023-01-07 9:49 ` [patch net-next 1/8] devlink: remove devlink features Jiri Pirko
2023-01-07 9:49 ` [patch net-next 2/8] devlink: remove linecards lock Jiri Pirko
2023-01-07 9:49 ` [patch net-next 3/8] devlink: remove linecard reference counting Jiri Pirko
2023-01-07 9:49 ` [patch net-next 4/8] devlink: remove reporters_lock Jiri Pirko
2023-01-07 9:49 ` [patch net-next 5/8] devlink: remove reporter reference counting Jiri Pirko
2023-01-07 9:49 ` [patch net-next 6/8] devlink: convert linecards dump to devlink_nl_instance_iter_dump() Jiri Pirko
2023-01-07 9:49 ` [patch net-next 7/8] devlink: convert reporters " Jiri Pirko
2023-01-07 10:11 ` Jiri Pirko [this message]
2023-01-07 9:49 ` [patch net-next 8/8] devlink: add instance lock assertion in devl_is_registered() Jiri Pirko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y7lFQa6kBN2AQqz3@nanopsycho \
--to=jiri@resnulli.us \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gal@nvidia.com \
--cc=idosch@nvidia.com \
--cc=jacob.e.keller@intel.com \
--cc=jesse.brandeburg@intel.com \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=mailhol.vincent@wanadoo.fr \
--cc=maximmi@nvidia.com \
--cc=michael.chan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=petrm@nvidia.com \
--cc=saeedm@nvidia.com \
--cc=salil.mehta@huawei.com \
--cc=tariqt@nvidia.com \
--cc=yisen.zhuang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox