Thread (16 messages) 16 messages, 3 authors, 2026-03-25

Re: [PATCH net-next v6 2/4] net: dsa: add bridge member iteration macro and port mask helper

From: Vladimir Oltean <olteanv@gmail.com>
Date: 2026-03-25 08:34:33
Also in: lkml

On Tue, Mar 24, 2026 at 11:31:30PM +0000, Daniel Golle wrote:
On Mon, Mar 23, 2026 at 06:31:04PM +0200, Vladimir Oltean wrote:
quoted
On Mon, Mar 23, 2026 at 02:29:41AM +0000, Daniel Golle wrote:
quoted
I'm also planning to introduce dsa_bridge_for_each_member macro in
addition to that which works on (struct dsa_bridge *) and uses
dsa_switch_for_each_bridge_member.
I don't like the dsa_bridge_for_each_member() name. You are likely
not considering cross-chip bridging, where a bridge spans multiple
dsa_switch structures. That is also a serious reason why your
bridge->priv design is not viable (two switches can't lay their eggs
in the same basket without overwriting each other).
dsa_bridge_for_each_local_member() ?

dsa_switch_for_each_dsa_bridge_member()
(but that's too close to dsa_switch_for_each_bridge_member imho)

I was planning to have both, dsa_switch and dsa_bridge as parameters,
of course, limiting the scope to a single dsa_switch.
I'm not sure that we do need two iterators. Just
dsa_switch_for_each_bridge_member() should be fine.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help