From: Andrew Lunn <andrew@lunn.ch>
To: Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: netdev@vger.kernel.org, Vivien Didelot <vivien.didelot@gmail.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Vladimir Oltean <olteanv@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Kevin Hilman <khilman@kernel.org>,
Ulf Hansson <ulf.hansson@linaro.org>,
Len Brown <len.brown@intel.com>, Pavel Machek <pavel@ucw.cz>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [RFC PATCH net-next 00/10] Use robust notifiers in DSA
Date: Thu, 18 Aug 2022 23:49:24 +0200 [thread overview]
Message-ID: <Yv6z5HTyenpJ+pex@lunn.ch> (raw)
In-Reply-To: <20220818154911.2973417-1-vladimir.oltean@nxp.com>
> I am posting this as RFC because something still feels off, but I can't
> exactly pinpoint what, and I'm looking for some feedback. Since most DSA
> switches are behind I/O protocols that can fail or time out (SPI, I2C,
> MDIO etc), everything can fail; that's a fact. On the other hand, when
> a network device or the entire system is torn down, nobody cares that
> SPI I/O failed - the system is still shutting down; that is also a fact.
> I'm not quite sure how to reconcile the two. On one hand we're
> suppressing errors emitted by DSA drivers in the non-robust form of
> notifiers, and on the other hand there's nothing we can do about them
> either way (upper layers don't necessarily care).
I would split it into two classes of errors:
Bus transactions fail. This very likely means the hardware design is
bad, connectors are loose, etc. There is not much we can do about
this, bad things are going to happen no what.
We have consumed all of some sort of resource. Out of memory, the ATU
is full, too many LAGs, etc. We try to roll back in order to get out
of this resource problem.
So i would say -EIO, -ETIMEDOUT, we don't care about too
much. -ENOMEM, -ENOBUF, -EOPNOTSUPP or whatever, we should try to do a
robust rollback.
The original design of switchdev was two phase:
1) Allocate whatever resources are needed, can fail
2) Put those resources into use, must not fail
At some point that all got thrown away.
Andrew
next prev parent reply other threads:[~2022-08-18 21:49 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-18 15:49 [RFC PATCH net-next 00/10] Use robust notifiers in DSA Vladimir Oltean
2022-08-18 15:49 ` [RFC PATCH net-next 01/10] notifier: allow robust variants to take a different void *v argument on rollback Vladimir Oltean
2022-08-18 15:49 ` [RFC PATCH net-next 02/10] net: dsa: introduce and use robust form of dsa_tree_notify() Vladimir Oltean
2022-08-18 15:49 ` [RFC PATCH net-next 03/10] net: dsa: introduce and use robust form of dsa_broadcast() Vladimir Oltean
2022-08-18 15:49 ` [RFC PATCH net-next 04/10] net: dsa: introduce and use robust form of dsa_port_notify() Vladimir Oltean
2022-08-18 15:49 ` [RFC PATCH net-next 05/10] Revert "net: dsa: felix: suppress non-changes to the tagging protocol" Vladimir Oltean
2022-08-18 15:49 ` [RFC PATCH net-next 06/10] net: dsa: convert switch.c functions to return void if they can Vladimir Oltean
2022-08-18 15:49 ` [RFC PATCH net-next 07/10] net: dsa: remove "breaking chain" comment from dsa_switch_event Vladimir Oltean
2022-08-18 15:49 ` [RFC PATCH net-next 08/10] net: dsa: introduce a robust form of MTU cross-chip notifiers Vladimir Oltean
2022-08-18 15:49 ` [RFC PATCH net-next 09/10] net: dsa: make dsa_tree_notify() and derivatives return void Vladimir Oltean
2022-08-18 15:49 ` [RFC PATCH net-next 10/10] net: dsa: make _del variants of functions " Vladimir Oltean
2022-08-18 21:49 ` Andrew Lunn [this message]
2022-08-18 22:28 ` [RFC PATCH net-next 00/10] Use robust notifiers in DSA Vladimir Oltean
2022-08-18 22:35 ` Andrew Lunn
2022-08-19 0:13 ` 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=Yv6z5HTyenpJ+pex@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=khilman@kernel.org \
--cc=kuba@kernel.org \
--cc=len.brown@intel.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=pavel@ucw.cz \
--cc=rafael@kernel.org \
--cc=ulf.hansson@linaro.org \
--cc=vivien.didelot@gmail.com \
--cc=vladimir.oltean@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;
as well as URLs for NNTP newsgroup(s).