[PATCH net-next v6 1/4] net: dsa: add driver-private pointer to struct dsa_bridge

From: Daniel Golle

Date: Sat Mar 21 2026 - 20:20:02 EST


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.

Add a void *priv field to struct dsa_bridge so drivers can store their
firmware bridge identifier directly, eliminating the need for driver-side
bridge tracking structures.

Signed-off-by: Daniel Golle <daniel@xxxxxxxxxxxxxx>
---
v6: new patch

include/net/dsa.h | 1 +
1 file changed, 1 insertion(+)

diff --git a/include/net/dsa.h b/include/net/dsa.h
index 6c17446f3dcc2..1c6f6c3b88e86 100644
--- a/include/net/dsa.h
+++ b/include/net/dsa.h
@@ -234,6 +234,7 @@ struct dsa_bridge {
unsigned int num;
bool tx_fwd_offload;
refcount_t refcount;
+ void *priv;
};

struct dsa_port {
--
2.53.0