From: Simon Horman <simon.horman@corigine.com>
To: Petr Machata <petrm@nvidia.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, Ido Schimmel <idosch@nvidia.com>,
Amit Cohen <amcohen@nvidia.com>,
mlxsw@nvidia.com
Subject: Re: [PATCH net-next 4/8] mlxsw: spectrum_router: Use the available router pointer for netevent handling
Date: Fri, 9 Jun 2023 21:06:15 +0200 [thread overview]
Message-ID: <ZIN4J9J0KuPARJCA@corigine.com> (raw)
In-Reply-To: <ce43bcc7dd96b7d1db2d55ee47ea14023f873698.1686330239.git.petrm@nvidia.com>
On Fri, Jun 09, 2023 at 07:32:09PM +0200, Petr Machata wrote:
> This code handles NETEVENT_DELAY_PROBE_TIME_UPDATE, which is invoked every
> time the delay_probe_time changes. mlxsw router currently only maintains
> one timer, so the last delay_probe_time set wins.
>
> Currently, mlxsw uses mlxsw_sp_port_lower_dev_hold() to find a reference to
> the router. This is no longer necessary. But as a side effect, this makes
> sure that only updates to "interesting netdevices" (ones that have a
> physical netdevice lower) are projected.
>
> Retain that side effect by calling mlxsw_sp_port_dev_lower_find_rcu() and
> punting if there is none. Then just proceed using the router pointer that's
> already at hand in the helper.
>
> Note that previously, the code took and put a reference of the netdevice.
> Because the mlxsw_sp pointer is now obtained from the notifier block, the
> port pointer (non-) NULL-ness is all that's relevant, and the reference
> does not need to be taken anymore.
>
> Signed-off-by: Petr Machata <petrm@nvidia.com>
> Reviewed-by: Amit Cohen <amcohen@nvidia.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
next prev parent reply other threads:[~2023-06-09 19:06 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-09 17:32 [PATCH net-next 0/8] mlxsw: Cleanups in router code Petr Machata
2023-06-09 17:32 ` [PATCH net-next 1/8] mlxsw: spectrum_router: mlxsw_sp_router_fini(): Extract a helper variable Petr Machata
2023-06-09 19:05 ` Simon Horman
2023-06-09 17:32 ` [PATCH net-next 2/8] mlxsw: spectrum_router: Move here inetaddr validator notifiers Petr Machata
2023-06-09 19:05 ` Simon Horman
2023-06-09 17:32 ` [PATCH net-next 3/8] mlxsw: spectrum_router: Pass router to mlxsw_sp_router_schedule_work() directly Petr Machata
2023-06-09 19:05 ` Simon Horman
2023-06-09 17:32 ` [PATCH net-next 4/8] mlxsw: spectrum_router: Use the available router pointer for netevent handling Petr Machata
2023-06-09 19:06 ` Simon Horman [this message]
2023-06-09 17:32 ` [PATCH net-next 5/8] mlxsw: spectrum_router: Reuse work neighbor initialization in work scheduler Petr Machata
2023-06-09 19:06 ` Simon Horman
2023-06-09 17:32 ` [PATCH net-next 6/8] mlxsw: Convert RIF-has-netdevice queries to a dedicated helper Petr Machata
2023-06-09 19:06 ` Simon Horman
2023-06-09 17:32 ` [PATCH net-next 7/8] mlxsw: Convert does-RIF-have-this-netdev " Petr Machata
2023-06-09 19:07 ` Simon Horman
2023-06-09 17:32 ` [PATCH net-next 8/8] mlxsw: spectrum_router: Privatize mlxsw_sp_rif_dev() Petr Machata
2023-06-09 20:08 ` Simon Horman
2023-06-12 9:00 ` [PATCH net-next 0/8] mlxsw: Cleanups in router code patchwork-bot+netdevbpf
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=ZIN4J9J0KuPARJCA@corigine.com \
--to=simon.horman@corigine.com \
--cc=amcohen@nvidia.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=idosch@nvidia.com \
--cc=kuba@kernel.org \
--cc=mlxsw@nvidia.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.