From: Daniel Golle <daniel@makrotopia.org>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Jiri Pirko <jiri@resnulli.us>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>, Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
Vladimir Oltean <olteanv@gmail.com>,
netdev@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v5 1/5] net: dsa: wire flash_update devlink callback to drivers
Date: Sat, 1 Aug 2026 06:07:43 +0100 [thread overview]
Message-ID: <am1_H0cwO1ehMsU2@makrotopia.org> (raw)
In-Reply-To: <a35bf784-a5c5-4a6b-be43-4d7a2e0dc663@lunn.ch>
On Thu, Jul 30, 2026 at 11:08:35PM +0200, Andrew Lunn wrote:
A quick note first: this review crossed mid-air with newer versions,
v6 through v8 were already out. v8 is the current one, where this
patch is retitled "net: dsa: add devlink flash_update callback to
dsa_switch_ops":
https://lore.kernel.org/all/2103d1c460b35c5e59c96bd91a892596478474d1.1785389905.git.daniel@makrotopia.org/
This part is unchanged there, though, so your comment applies as-is.
>> +#define DSA_DEVLINK_OPS \
[...]
>> +static const struct devlink_ops dsa_devlink_ops = {
>> + DSA_DEVLINK_OPS
>> +};
>
> Is this going to scale? How many different permutations are there?
It obviously doesn't scale. The choice to do this was because the
cost of requesting an update file, which would happen before the
-EOPNOTSUPP, is a relatively high cost. None of the other devlink
operations have such costly side-effects even if not implemented by
a DSA driver.
> Firmware upgrade is an infrequent operation, so do we actually care
> about a request_firmware() which might turn out to be pointless? I
> personally would prefer to avoid the scalability issue and just return
> -EOPNOTSUPP.
I will drop the macro and the second struct, make .flash_update a
regular member of the single dsa_devlink_ops, and have the trampoline
return -EOPNOTSUPP when ds->ops->devlink_flash_update is absent in v9.
Cheers
Daniel
next prev parent reply other threads:[~2026-08-01 5:08 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-25 2:14 [PATCH net-next v5 0/5] net: dsa: mxl862xx: support firmware update Daniel Golle
2026-07-25 2:15 ` [PATCH net-next v5 1/5] net: dsa: wire flash_update devlink callback to drivers Daniel Golle
2026-07-30 21:08 ` Andrew Lunn
2026-08-01 5:07 ` Daniel Golle [this message]
2026-07-25 2:16 ` [PATCH net-next v5 2/5] net: dsa: mxl862xx: add SMDIO clause-22 register access Daniel Golle
2026-07-30 21:11 ` Andrew Lunn
2026-07-25 2:16 ` [PATCH net-next v5 3/5] net: dsa: mxl862xx: add devlink flash_update and info_get Daniel Golle
2026-07-30 21:29 ` Andrew Lunn
2026-08-01 5:11 ` Daniel Golle
2026-07-25 2:16 ` [PATCH net-next v5 4/5] net: dsa: mxl862xx: recover switch stuck in MCUboot rescue mode Daniel Golle
2026-07-30 21:34 ` Andrew Lunn
2026-07-25 2:17 ` [PATCH net-next v5 5/5] net: dsa: mxl862xx: document devlink flash and info support Daniel Golle
2026-07-30 21:36 ` Andrew Lunn
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=am1_H0cwO1ehMsU2@makrotopia.org \
--to=daniel@makrotopia.org \
--cc=andrew@lunn.ch \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=skhan@linuxfoundation.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.