mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: David Yang <mmyangfl@gmail.com>
Cc: netdev@vger.kernel.org, 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>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] net: dsa: loop: Fix devlink resource ID
Date: Wed, 10 Jun 2026 22:28:03 +0200	[thread overview]
Message-ID: <2c8baa5d-32c2-44fc-9075-27da9d6b4c7a@lunn.ch> (raw)
In-Reply-To: <CAAXyoMNjX5rMpcj2N-WTkUD871tp0-2ceaOzMmUdwWSSGG6J4g@mail.gmail.com>

On Wed, Jun 10, 2026 at 09:36:59PM +0800, David Yang wrote:
> On Wed, Jun 10, 2026 at 3:23 PM Andrew Lunn <andrew@lunn.ch> wrote:
> >
> > On Wed, Jun 10, 2026 at 02:25:45PM +0800, David Yang wrote:
> > > 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

      reply	other threads:[~2026-06-10 20:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-10  6:25 David Yang
2026-06-10  7:23 ` Andrew Lunn
2026-06-10 13:36   ` David Yang
2026-06-10 20:28     ` Andrew Lunn [this message]

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=2c8baa5d-32c2-44fc-9075-27da9d6b4c7a@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmyangfl@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.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

all inboxes | Powered by JetHome®