Re: [PATCH net-next v6 1/4] net: dsa: add driver-private pointer to struct dsa_bridge
From: Vladimir Oltean
Date: Mon Mar 23 2026 - 12:41:09 EST
On Sun, Mar 22, 2026 at 12:18:58AM +0000, Daniel Golle wrote:
> When a DSA driver offloads a bridge to firmware, it typically receives a
> firmware-assigned bridge identifier (e.g. a FID) that must be stored and
> retrieved by subsequent operations. Without a place to store this in the
> DSA core's bridge structure, drivers must maintain a parallel list of
> bridge objects and search it on every join, leave, and FDB operation.
Why list?
What's wrong with a driver-level array for lookup? The bridge.num is
guaranteed to be between 1 and ds->max_num_bridges.