From: Vladimir Oltean <olteanv@gmail.com>
To: Tobias Waldekranz <tobias@waldekranz.com>
Cc: davem@davemloft.net, kuba@kernel.org, atenart@kernel.org,
roopa@nvidia.com, razor@blackwall.org, bridge@lists.linux.dev,
netdev@vger.kernel.org, jiri@resnulli.us, ivecera@redhat.com
Subject: Re: [PATCH v4 net 2/2] net: bridge: switchdev: Ensure deferred event delivery on unoffload
Date: Wed, 14 Feb 2024 18:47:53 +0200 [thread overview]
Message-ID: <20240214164753.6ij6ksdgz5ailemv@skbuf> (raw)
In-Reply-To: <20240212191844.1055186-3-tobias@waldekranz.com> <20240212191844.1055186-3-tobias@waldekranz.com>
On Mon, Feb 12, 2024 at 08:18:44PM +0100, Tobias Waldekranz wrote:
> When unoffloading a device, it is important to ensure that all
> relevant deferred events are delivered to it before it disassociates
> itself from the bridge.
>
> Before this change, this was true for the normal case when a device
> maps 1:1 to a net_bridge_port, i.e.
>
> br0
> /
> swp0
>
> When swp0 leaves br0, the call to switchdev_deferred_process() in
> del_nbp() makes sure to process any outstanding events while the
> device is still associated with the bridge.
>
> In the case when the association is indirect though, i.e. when the
> device is attached to the bridge via an intermediate device, like a
> LAG...
>
> br0
> /
> lag0
> /
> swp0
>
> ...then detaching swp0 from lag0 does not cause any net_bridge_port to
> be deleted, so there was no guarantee that all events had been
> processed before the device disassociated itself from the bridge.
>
> Fix this by always synchronously processing all deferred events before
> signaling completion of unoffloading back to the driver.
>
> Fixes: 4e51bf44a03a ("net: bridge: move the switchdev object replay helpers to "push" mode")
> Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
> ---
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
prev parent reply other threads:[~2024-02-14 16:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-12 19:18 [PATCH v4 net 0/2] net: bridge: switchdev: Ensure MDB events are delivered exactly once Tobias Waldekranz
2024-02-12 19:18 ` [PATCH v4 net 1/2] net: bridge: switchdev: Skip MDB replays of deferred events on offload Tobias Waldekranz
2024-02-14 16:45 ` Vladimir Oltean
2024-02-14 21:28 ` Tobias Waldekranz
2024-02-12 19:18 ` [PATCH v4 net 2/2] net: bridge: switchdev: Ensure deferred event delivery on unoffload Tobias Waldekranz
2024-02-14 16:47 ` Vladimir Oltean [this message]
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=20240214164753.6ij6ksdgz5ailemv@skbuf \
--to=olteanv@gmail.com \
--cc=atenart@kernel.org \
--cc=bridge@lists.linux.dev \
--cc=davem@davemloft.net \
--cc=ivecera@redhat.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=razor@blackwall.org \
--cc=roopa@nvidia.com \
--cc=tobias@waldekranz.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