netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Vladimir Oltean <vladimir.oltean@nxp.com>, netdev@vger.kernel.org
Cc: "Andrew Lunn" <andrew@lunn.ch>,
	"Vivien Didelot" <vivien.didelot@gmail.com>,
	"Vladimir Oltean" <olteanv@gmail.com>,
	UNGLinuxDriver@microchip.com, "DENG Qingfang" <dqfext@gmail.com>,
	"Kurt Kanzenbach" <kurt@linutronix.de>,
	"Hauke Mehrtens" <hauke@hauke-m.de>,
	"Woojung Huh" <woojung.huh@microchip.com>,
	"Sean Wang" <sean.wang@mediatek.com>,
	"Landen Chao" <Landen.Chao@mediatek.com>,
	"Alexandre Belloni" <alexandre.belloni@bootlin.com>,
	"George McCollister" <george.mccollister@gmail.com>,
	"John Crispin" <john@phrozen.org>,
	"Aleksander Jan Bajkowski" <olek2@wp.pl>,
	"Egil Hjelmeland" <privat@egil-hjelmeland.no>,
	"Oleksij Rempel" <o.rempel@pengutronix.de>,
	"Prasanna Vengateshan" <prasanna.vengateshan@microchip.com>,
	"Ansuel Smith" <ansuelsmth@gmail.com>,
	"Alvin Šipraga" <alsi@bang-olufsen.dk>
Subject: Re: [PATCH v3 net-next 5/9] net: dsa: lantiq_gswip: serialize access to the PCE table
Date: Fri, 22 Oct 2021 10:31:50 -0700	[thread overview]
Message-ID: <7eecb2e5-a859-10ef-2cca-767333688d90@gmail.com> (raw)
In-Reply-To: <20211022172728.2379321-6-vladimir.oltean@nxp.com>

On 10/22/21 10:27 AM, Vladimir Oltean wrote:
> Looking at the code, the GSWIP switch appears to hold bridging service
> structures (VLANs, FDBs, forwarding rules) in PCE table entries.
> Hardware access to the PCE table is non-atomic, and is comprised of
> several register reads and writes.
> 
> These accesses are currently serialized by the rtnl_lock, but DSA is
> changing its driver API and that lock will no longer be held when
> calling ->port_fdb_add() and ->port_fdb_del().
> 
> So this driver needs to serialize the access to the PCE table using its
> own locking scheme. This patch adds that.
> 
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>

Looks like we are missing a mutex_init() for this driver, otherwise, LGTM!
-- 
Florian

  reply	other threads:[~2021-10-22 17:31 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-22 17:27 [PATCH v3 net-next 0/9] Drop rtnl_lock from DSA .port_fdb_{add,del} Vladimir Oltean
2021-10-22 17:27 ` [PATCH v3 net-next 1/9] net: dsa: sja1105: wait for dynamic config command completion on writes too Vladimir Oltean
2021-10-22 17:27 ` [PATCH v3 net-next 2/9] net: dsa: sja1105: serialize access to the dynamic config interface Vladimir Oltean
2021-10-22 17:35   ` Florian Fainelli
2021-10-22 17:27 ` [PATCH v3 net-next 3/9] net: mscc: ocelot: serialize access to the MAC table Vladimir Oltean
2021-10-22 17:34   ` Florian Fainelli
2021-10-22 18:00     ` Vladimir Oltean
2021-10-22 19:04       ` Andrew Lunn
2021-10-22 20:50         ` Vladimir Oltean
2021-10-22 17:27 ` [PATCH v3 net-next 4/9] net: dsa: b53: serialize access to the ARL table Vladimir Oltean
2021-10-22 17:27 ` [PATCH v3 net-next 5/9] net: dsa: lantiq_gswip: serialize access to the PCE table Vladimir Oltean
2021-10-22 17:31   ` Florian Fainelli [this message]
2021-10-22 17:27 ` [PATCH v3 net-next 6/9] net: dsa: introduce locking for the address lists on CPU and DSA ports Vladimir Oltean
2021-10-22 17:37   ` Florian Fainelli
2021-10-22 17:27 ` [PATCH v3 net-next 7/9] net: dsa: drop rtnl_lock from dsa_slave_switchdev_event_work Vladimir Oltean
2021-10-22 17:37   ` Florian Fainelli
2021-10-22 17:27 ` [PATCH v3 net-next 8/9] selftests: lib: forwarding: allow tests to not require mz and jq Vladimir Oltean
2021-10-22 17:39   ` Florian Fainelli
2021-10-22 17:27 ` [PATCH v3 net-next 9/9] selftests: net: dsa: add a stress test for unlocked FDB operations Vladimir Oltean
2021-10-22 17:40   ` Florian Fainelli

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=7eecb2e5-a859-10ef-2cca-767333688d90@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=Landen.Chao@mediatek.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=alsi@bang-olufsen.dk \
    --cc=andrew@lunn.ch \
    --cc=ansuelsmth@gmail.com \
    --cc=dqfext@gmail.com \
    --cc=george.mccollister@gmail.com \
    --cc=hauke@hauke-m.de \
    --cc=john@phrozen.org \
    --cc=kurt@linutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    --cc=olek2@wp.pl \
    --cc=olteanv@gmail.com \
    --cc=prasanna.vengateshan@microchip.com \
    --cc=privat@egil-hjelmeland.no \
    --cc=sean.wang@mediatek.com \
    --cc=vivien.didelot@gmail.com \
    --cc=vladimir.oltean@nxp.com \
    --cc=woojung.huh@microchip.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).