[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b5f79571-b4a8-4f21-8dc8-e1aa11056a5d@gmail.com>
Date: Thu, 4 Apr 2024 16:43:38 -0400
From: Joseph Huang <joseph.huang.2024@...il.com>
To: Vladimir Oltean <olteanv@...il.com>,
Joseph Huang <Joseph.Huang@...min.com>
Cc: netdev@...r.kernel.org, Andrew Lunn <andrew@...n.ch>,
Florian Fainelli <f.fainelli@...il.com>,
"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Roopa Prabhu <roopa@...dia.com>, Nikolay Aleksandrov <razor@...ckwall.org>,
Linus Lüssing <linus.luessing@...3.blue>,
linux-kernel@...r.kernel.org, bridge@...ts.linux.dev
Subject: Re: [PATCH RFC net-next 07/10] net: dsa: mv88e6xxx: Track bridge mdb
objects
Hi Vladimir,
On 4/2/2024 8:23 AM, Vladimir Oltean wrote:
> Can you comment on the feasibility/infeasibility of Tobias' proposal of:
> "The bridge could just provide some MDB iterator to save us from having
> to cache all the configured groups."?
> https://lore.kernel.org/netdev/87sg31n04a.fsf@waldekranz.com/
>
> What is done here will have to be scaled to many drivers - potentially
> all existing DSA ones, as far as I'm aware.
>
I thought about implementing an MDB iterator as suggested by Tobias, but
I'm a bit concerned about the coherence of these MDB objects. In theory,
when the device driver is trying to act on an event, the source of the
trigger may have changed its state in the bridge already. If, upon
receiving an event in the device driver, we iterate over what the bridge
has at that instant, the differences between the worlds as seen by the
bridge and the device driver might lead to some unexpected results.
However, if we cache the MDB objects in the device driver, at least the
order in which the events took place will be coherent and at any give
time the state of the MDB objects in the device driver can be guaranteed
to be sane. This is also the approach the prestera device driver took.
Thanks,
Joseph
Powered by blists - more mailing lists