From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: Marcin Wojtas <mw@semihalf.com>
Cc: netdev <netdev@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>, "Andrew Lunn" <andrew@lunn.ch>,
"Vivien Didelot" <vivien.didelot@gmail.com>,
"Florian Fainelli" <f.fainelli@gmail.com>,
"Oleksij Rempel" <linux@rempel-privat.de>,
"Christian Marangi" <ansuelsmth@gmail.com>,
"John Crispin" <john@phrozen.org>,
"Kurt Kanzenbach" <kurt@linutronix.de>,
"Mans Rullgard" <mans@mansr.com>,
"Arun Ramadoss" <arun.ramadoss@microchip.com>,
"Woojung Huh" <woojung.huh@microchip.com>,
"UNGLinuxDriver@microchip.com" <UNGLinuxDriver@microchip.com>,
"Claudiu Manoil" <claudiu.manoil@nxp.com>,
"Alexandre Belloni" <alexandre.belloni@bootlin.com>,
"George McCollister" <george.mccollister@gmail.com>,
"DENG Qingfang" <dqfext@gmail.com>,
"Sean Wang" <sean.wang@mediatek.com>,
"Landen Chao" <Landen.Chao@mediatek.com>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
"Hauke Mehrtens" <hauke@hauke-m.de>,
"Martin Blumenstingl" <martin.blumenstingl@googlemail.com>,
"Aleksander Jan Bajkowski" <olek2@wp.pl>,
"Alvin Šipraga" <alsi@bang-olufsen.dk>,
"Luiz Angelo Daros de Luca" <luizluca@gmail.com>,
"Linus Walleij" <linus.walleij@linaro.org>,
"Pawel Dembicki" <paweldembicki@gmail.com>,
"Clément Léger" <clement.leger@bootlin.com>,
"Geert Uytterhoeven" <geert+renesas@glider.be>,
"Russell King" <rmk+kernel@armlinux.org.uk>,
"Marek Behún" <kabel@kernel.org>,
"Rob Herring" <robh+dt@kernel.org>,
"Frank Rowand" <frowand.list@gmail.com>,
"Tomasz Nowicki" <tn@semihalf.com>,
"Grzegorz Jaszczyk" <jaz@semihalf.com>
Subject: Re: [PATCH v2 net-next 4/4] net: dsa: validate that DT nodes of shared ports have the properties they need
Date: Fri, 29 Jul 2022 18:34:45 +0000 [thread overview]
Message-ID: <20220729183444.jzr3eoj6xdumezwu@skbuf> (raw)
In-Reply-To: <CAPv3WKe7BVS3cjPws69Zi=XqBE3UkgQM1yLKJgmphiQO_n8Jgw@mail.gmail.com>
On Fri, Jul 29, 2022 at 07:57:50PM +0200, Marcin Wojtas wrote:
> I'm ok with enforcing the phylink usage and updating the binding
> description, so the CPU / DSA ports have a proper full description of
> the link. What I find problematic is including the drivers' related
> ifdefs and compat strings in the subsystem's generic code. With this
> change, if someone adds a new driver (or extends the existing ones),
> they will have to add the string in the driver AND net/dsa...
I chuckled when I read this. You must have missed:
* If you are considering expanding this table for newly introduced switches,
* think again. It is OK to remove switches from this table if there aren't DT
* blobs in circulation which rely on defaulting the shared ports.
The #ifdef's are there such that the compatible array is smaller on a
kernel when those drivers are compiled out.
> How about the following scenario:
> - Remove allow/blocklist from this patch and validate the description
> always (no opt out).
We're validating the description always. We're opting a fixed number of
switches out of _enforcing_ it, number which will not increase.
That's why the people here are copied, to state if they're ok with being
in one camp or the other.
> For an agreed timeframe (1 year? 2 LTS releases?)
> it wouldn't cause the switch probe to fail, but instead of
> dev_warn/dev_err, there should be a big fat WARN_ON(). Spoiled bootlog
> will encourage users to update the device trees.
The intention is _not_ to fail probing for drivers with incomplete
bindings, neither now nor after 1 year or 2 LTS releases.
The intention is to not allow drivers which didn't have any such DT
blobs, or awareness of the feature, to gain any parasitic users.
The DSA core currently allows it. If planets align just the right way,
those ports might even work by accident, until they don't.
> - After the deadline, the switch probe should start failing with
> improper description and everyone will have to use phylink.
Not applicable after the explanation above, I think. At least, it's not
my goal to fail drivers. If individual maintainers want to do so,
they're free to do it from my side.
> - Announce the binding change and start updating DT binding
> description schema (adding the validation on that level too).
> ?
The announcement is here, what else are you thinking of?
next prev parent reply other threads:[~2022-07-29 18:34 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-29 13:21 [PATCH v2 net-next 0/4] Validate OF nodes for DSA shared ports Vladimir Oltean
2022-07-29 13:21 ` [PATCH v2 net-next 1/4] of: base: export of_device_compatible_match() for use in modules Vladimir Oltean
2022-07-29 13:21 ` [PATCH v2 net-next 2/4] net: dsa: avoid dsa_port_link_{,un}register_of() calls with platform data Vladimir Oltean
2022-07-29 13:21 ` [PATCH v2 net-next 3/4] net: dsa: rename dsa_port_link_{,un}register_of Vladimir Oltean
2022-07-29 13:21 ` [PATCH v2 net-next 4/4] net: dsa: validate that DT nodes of shared ports have the properties they need Vladimir Oltean
2022-07-29 16:22 ` Rob Herring
2022-07-29 17:01 ` Vladimir Oltean
2022-07-29 18:39 ` Rob Herring
2022-07-30 16:23 ` Vladimir Oltean
2022-08-01 14:02 ` Rob Herring
2022-08-01 14:11 ` Vladimir Oltean
2022-08-01 14:26 ` Rob Herring
2022-07-29 17:57 ` Marcin Wojtas
2022-07-29 18:34 ` Vladimir Oltean [this message]
2022-07-29 20:36 ` Marcin Wojtas
2022-07-29 21:17 ` Andrew Lunn
2022-07-29 21:24 ` Florian Fainelli
2022-07-29 21:33 ` Marcin Wojtas
2022-07-29 21:44 ` Florian Fainelli
2022-07-30 0:49 ` Vladimir Oltean
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=20220729183444.jzr3eoj6xdumezwu@skbuf \
--to=vladimir.oltean@nxp.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=arun.ramadoss@microchip.com \
--cc=claudiu.manoil@nxp.com \
--cc=clement.leger@bootlin.com \
--cc=davem@davemloft.net \
--cc=dqfext@gmail.com \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=frowand.list@gmail.com \
--cc=geert+renesas@glider.be \
--cc=george.mccollister@gmail.com \
--cc=hauke@hauke-m.de \
--cc=jaz@semihalf.com \
--cc=john@phrozen.org \
--cc=kabel@kernel.org \
--cc=kuba@kernel.org \
--cc=kurt@linutronix.de \
--cc=linus.walleij@linaro.org \
--cc=linux@rempel-privat.de \
--cc=luizluca@gmail.com \
--cc=mans@mansr.com \
--cc=martin.blumenstingl@googlemail.com \
--cc=matthias.bgg@gmail.com \
--cc=mw@semihalf.com \
--cc=netdev@vger.kernel.org \
--cc=olek2@wp.pl \
--cc=pabeni@redhat.com \
--cc=paweldembicki@gmail.com \
--cc=rmk+kernel@armlinux.org.uk \
--cc=robh+dt@kernel.org \
--cc=sean.wang@mediatek.com \
--cc=tn@semihalf.com \
--cc=vivien.didelot@gmail.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