From: Florian Fainelli <f.fainelli@gmail.com>
To: Vladimir Oltean <vladimir.oltean@nxp.com>, netdev@vger.kernel.org
Cc: Andrew Lunn <andrew@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Claudiu Manoil <claudiu.manoil@nxp.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
UNGLinuxDriver@microchip.com,
Xiaoliang Yang <xiaoliang.yang_1@nxp.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 2/7] net: mscc: ocelot: remove struct ocelot_mm_state :: lock
Date: Mon, 17 Apr 2023 05:56:58 -0700 [thread overview]
Message-ID: <dceab485-1d51-0340-e5cc-8929901c64ad@gmail.com> (raw)
In-Reply-To: <20230415170551.3939607-3-vladimir.oltean@nxp.com>
On 4/15/2023 10:05 AM, Vladimir Oltean wrote:
> Unfortunately, the workarounds for the hardware bugs make it pointless
> to keep fine-grained locking for the MAC Merge state of each port.
>
> Our vsc9959_cut_through_fwd() implementation requires
> ocelot->fwd_domain_lock to be held, in order to serialize with changes
> to the bridging domains and to port speed changes (which affect which
> ports can be cut-through). Simultaneously, the traffic classes which can
> be cut-through cannot be preemptible at the same time, and this will
> depend on the MAC Merge layer state (which changes from threaded
> interrupt context).
>
> Since vsc9959_cut_through_fwd() would have to hold the mm->lock of all
> ports for a correct and race-free implementation with respect to
> ocelot_mm_irq(), in practice it means that any time a port's mm->lock is
> held, it would potentially block holders of ocelot->fwd_domain_lock.
>
> In the interest of simple locking rules, make all MAC Merge layer state
> changes (and preemptible traffic class changes) be serialized by the
> ocelot->fwd_domain_lock.
>
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
next prev parent reply other threads:[~2023-04-17 12:57 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-15 17:05 [PATCH net-next 0/7] Ocelot/Felix driver support for preemptible traffic classes Vladimir Oltean
2023-04-15 17:05 ` [PATCH net-next 1/7] net: mscc: ocelot: export a single ocelot_mm_irq() Vladimir Oltean
2023-04-17 12:51 ` Simon Horman
2023-04-17 12:56 ` Florian Fainelli
2023-04-15 17:05 ` [PATCH net-next 2/7] net: mscc: ocelot: remove struct ocelot_mm_state :: lock Vladimir Oltean
2023-04-17 12:53 ` Simon Horman
2023-04-17 12:56 ` Florian Fainelli [this message]
2023-04-15 17:05 ` [PATCH net-next 3/7] net: mscc: ocelot: optimize ocelot_mm_irq() Vladimir Oltean
2023-04-17 12:55 ` Simon Horman
2023-04-17 12:59 ` Florian Fainelli
2023-04-15 17:05 ` [PATCH net-next 4/7] net: mscc: ocelot: don't rely on cached verify_status in ocelot_port_get_mm() Vladimir Oltean
2023-04-17 12:59 ` Florian Fainelli
2023-04-17 13:01 ` Simon Horman
2023-04-15 17:05 ` [PATCH net-next 5/7] net: mscc: ocelot: add support for mqprio offload Vladimir Oltean
2023-04-17 13:00 ` Florian Fainelli
2023-04-15 17:05 ` [PATCH net-next 6/7] net: dsa: felix: act upon the mqprio qopt in taprio offload Vladimir Oltean
2023-04-17 13:01 ` Florian Fainelli
2023-04-15 17:05 ` [PATCH net-next 7/7] net: mscc: ocelot: add support for preemptible traffic classes Vladimir Oltean
2023-04-18 2:10 ` [PATCH net-next 0/7] Ocelot/Felix driver " 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=dceab485-1d51-0340-e5cc-8929901c64ad@gmail.com \
--to=f.fainelli@gmail.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=andrew@lunn.ch \
--cc=claudiu.manoil@nxp.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=vladimir.oltean@nxp.com \
--cc=xiaoliang.yang_1@nxp.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