From: netdev-bot+sashiko@kernel.org
To: daniel@makrotopia.org
Cc: jiri@resnulli.us, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
corbet@lwn.net, skhan@linuxfoundation.org, rdunlap@infradead.org,
gregkh@linuxfoundation.org, rafael@kernel.org, dakr@kernel.org,
andrew@lunn.ch, olteanv@gmail.com, linux@armlinux.org.uk,
netdev@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, driver-core@lists.linux.dev
Subject: Re: [PATCH net-next v19 1/6] net: dsa: add devlink flash_update callback to dsa_switch_ops
Date: Sun, 04 Oct 2026 15:56:33 +0000 [thread overview]
Message-ID: <179112939336.434549.10896420930582445721@kernel.org> (raw)
In-Reply-To: <35450d868a8d1918380481420022b618e3758762.1791035885.git.daniel@makrotopia.org>
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] This patch gives every DSA switch a new devlink capability:
firmware flash through the new `dsa_switch_ops::devlink_flash_update`…
--
net: dsa: add devlink flash_update callback to dsa_switch_ops
This adds a devlink_flash_update callback to dsa_switch_ops. It also
installs a dsa_devlink_flash_update() trampoline in dsa_devlink_ops,
which returns -EOPNOTSUPP when the driver does not implement the
callback. The commit message describes how flash requests behave on
switches without the callback, and the locking context the op is
called in.
> diff --git a/include/net/dsa.h b/include/net/dsa.h
> index 5d12191b6f6f5..1fcf4af6c5064 100644
> --- a/include/net/dsa.h
> +++ b/include/net/dsa.h
> @@ -1176,6 +1176,9 @@ struct dsa_switch_ops {
> int (*devlink_info_get)(struct dsa_switch *ds,
> struct devlink_info_req *req,
> struct netlink_ext_ack *extack);
> + int (*devlink_flash_update)(struct dsa_switch *ds,
> + struct devlink_flash_update_params *params,
> + struct netlink_ext_ack *extack);
[Severity: Low]
This isn't a bug, but should the Devlink section of
Documentation/networking/dsa/dsa.rst mention the new op?
That section currently says:
DSA drivers can make use of the following devlink features:
and lists only Regions, Params, Resources and Shared buffers. It ends
with a pointer to Documentation/networking/devlink/.
The later patches in the series add only the driver-specific
Documentation/networking/devlink/mxl862xx.rst. They don't touch dsa.rst.
The calling context in the commit message is not written down anywhere
in the DSA docs either:
- the devlink instance lock is held
- rtnl_lock is not held
- the devlink instance is registered in dsa_switch_setup(), before
dsa_tree_setup_ports() creates the user ports
Would a short entry for flash update in that list be useful to driver
authors? It could also cover these constraints.
The list already left out devlink_info_get before this patch.
> int (*devlink_sb_pool_get)(struct dsa_switch *ds,
> unsigned int sb_index, u16 pool_index,
> struct devlink_sb_pool_info *pool_info);
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/cover.1791035885.git.daniel%40makrotopia.org
next reply other threads:[~2026-10-04 15:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-04 15:56 netdev-bot+sashiko [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-10-03 15:50 [PATCH net-next v19 0/6] net: dsa: mxl862xx: devlink flash and rescue Daniel Golle
2026-10-03 15:51 ` [PATCH net-next v19 1/6] net: dsa: add devlink flash_update callback to dsa_switch_ops Daniel Golle
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=179112939336.434549.10896420930582445721@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=andrew@lunn.ch \
--cc=corbet@lwn.net \
--cc=dakr@kernel.org \
--cc=daniel@makrotopia.org \
--cc=davem@davemloft.net \
--cc=driver-core@lists.linux.dev \
--cc=edumazet@google.com \
--cc=gregkh@linuxfoundation.org \
--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=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=rafael@kernel.org \
--cc=rdunlap@infradead.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox