aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/dsa.h
diff options
context:
space:
mode:
authorVladimir Oltean <vladimir.oltean@nxp.com>2021-06-29 17:06:52 +0300
committerDavid S. Miller <davem@davemloft.net>2021-06-29 10:46:23 -0700
commit3f6e32f92a027e91f001070ec324dd3b534d948c (patch)
tree7a7af9971a1c263d0939722e2f60485aa29e7d86 /include/net/dsa.h
parentnet: dsa: introduce a separate cross-chip notifier type for host FDBs (diff)
downloadlinux-dev-3f6e32f92a027e91f001070ec324dd3b534d948c.tar.xz
linux-dev-3f6e32f92a027e91f001070ec324dd3b534d948c.zip
net: dsa: reference count the FDB addresses at the cross-chip notifier level
The same concerns expressed for host MDB entries are valid for host FDBs just as well: - in the case of multiple bridges spanning the same switch chip, deleting a host FDB entry that belongs to one bridge will result in breakage to the other bridge - not deleting FDB entries across DSA links means that the switch's hardware tables will eventually run out, given enough wear&tear So do the same thing and introduce reference counting for CPU ports and DSA links using the same data structures as we have for MDB entries. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/dsa.h')
-rw-r--r--include/net/dsa.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/dsa.h b/include/net/dsa.h
index 2c50546f9667..33f40c1ec379 100644
--- a/include/net/dsa.h
+++ b/include/net/dsa.h
@@ -288,6 +288,7 @@ struct dsa_port {
/* List of MAC addresses that must be forwarded on this port.
* These are only valid on CPU ports and DSA links.
*/
+ struct list_head fdbs;
struct list_head mdbs;
bool setup;