Thread (4 messages) 4 messages, 2 authors, 2026-06-10

Re: [PATCH net-next] net: dsa: loop: Fix devlink resource ID

From: Andrew Lunn <andrew@lunn.ch>
Date: 2026-06-10 20:28:09
Also in: lkml

On Wed, Jun 10, 2026 at 09:36:59PM +0800, David Yang wrote:
On Wed, Jun 10, 2026 at 3:23 PM Andrew Lunn [off-list ref] wrote:
quoted
On Wed, Jun 10, 2026 at 02:25:45PM +0800, David Yang wrote:
quoted
Fix collision with DEVLINK_RESOURCE_ID_PARENT_TOP (0) by keeping the
real resource IDs in enum dsa_loop_devlink_resource_id starting at 1.
Please could you expand on this. What is actually wrong here?

When i look at mv88e6xxx, hellcreak and b53 it does the same.

     Andrew
dsa_devlink_resource_register() is, but other users of
devl_resource_register() (mlxsw and netdevsim) avoid 0 explicitly.

In this case for dsa_loop, the usage is semantically questionable (0
being its own parent) but might just work as well. But it is a real
problem on mv88e6xxx, where ATU_bin_* are in fact registered as
top-level siblings, not as children of ATU, due to ATU ID colliding
with PARENT_TOP.
So please produce a patchset fixing all users of
devl_resource_register() which pass 0. And then maybe add WARN_ON()?

    Andrew

---
pw-bot: cr
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help