netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: netdev@vger.kernel.org
Cc: kuba@kernel.org, pabeni@redhat.com, davem@davemloft.net,
	edumazet@google.com, idosch@nvidia.com, petrm@nvidia.com
Subject: Re: [patch net-next] devlink: add missing unregister linecard notification
Date: Thu, 24 Aug 2023 10:09:01 +0200	[thread overview]
Message-ID: <ZOcQHYAcUwd+VguS@nanopsycho> (raw)
In-Reply-To: <20230817125240.2144794-1-jiri@resnulli.us>

Kuba, do you plan to merge net into net-next any time soon? I have
another patchset depending on this.

Btw, I aimed this to net-next on purpose, in net it does not make much
sense imho.

Thanks!

Thu, Aug 17, 2023 at 02:52:40PM CEST, jiri@resnulli.us wrote:
>From: Jiri Pirko <jiri@nvidia.com>
>
>Cited fixes commit introduced linecard notifications for register,
>however it didn't add them for unregister. Fix that by adding them.
>
>Fixes: c246f9b5fd61 ("devlink: add support to create line card and expose to user")
>Signed-off-by: Jiri Pirko <jiri@nvidia.com>
>---
> net/devlink/leftover.c | 3 +++
> 1 file changed, 3 insertions(+)
>
>diff --git a/net/devlink/leftover.c b/net/devlink/leftover.c
>index c26c63275b0b..e7f76cc58533 100644
>--- a/net/devlink/leftover.c
>+++ b/net/devlink/leftover.c
>@@ -6630,6 +6630,7 @@ void devlink_notify_unregister(struct devlink *devlink)
> 	struct devlink_param_item *param_item;
> 	struct devlink_trap_item *trap_item;
> 	struct devlink_port *devlink_port;
>+	struct devlink_linecard *linecard;
> 	struct devlink_rate *rate_node;
> 	struct devlink_region *region;
> 	unsigned long port_index;
>@@ -6658,6 +6659,8 @@ void devlink_notify_unregister(struct devlink *devlink)
> 
> 	xa_for_each(&devlink->ports, port_index, devlink_port)
> 		devlink_port_notify(devlink_port, DEVLINK_CMD_PORT_DEL);
>+	list_for_each_entry_reverse(linecard, &devlink->linecard_list, list)
>+		devlink_linecard_notify(linecard, DEVLINK_CMD_LINECARD_DEL);
> 	devlink_notify(devlink, DEVLINK_CMD_DEL);
> }
> 
>-- 
>2.41.0
>

  parent reply	other threads:[~2023-08-24  8:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-17 12:52 [patch net-next] devlink: add missing unregister linecard notification Jiri Pirko
2023-08-17 18:37 ` Simon Horman
2023-08-19  1:40 ` patchwork-bot+netdevbpf
2023-08-24  8:09 ` Jiri Pirko [this message]
2023-08-24 13:07   ` Paolo Abeni

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=ZOcQHYAcUwd+VguS@nanopsycho \
    --to=jiri@resnulli.us \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=idosch@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=petrm@nvidia.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;
as well as URLs for NNTP newsgroup(s).