diff options
| author | David S. Miller <davem@davemloft.net> | 2022-03-09 14:12:10 +0300 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2022-03-09 14:12:10 +0300 |
| commit | 1163319993f0abf8092d5f18fdff98096f7a3a73 (patch) | |
| tree | c7ff3a0357f2e5c86f7fff793fc18240649bbbbb /include | |
| parent | ce7ec1b8ec784c7fe0f6180a82725ca577d12aa8 (diff) | |
| parent | 7e580490ac9819dd55a36be2a9b3380d1391f91b (diff) | |
| download | linux-1163319993f0abf8092d5f18fdff98096f7a3a73.tar.xz | |
Merge branch 'dsa-next-fixups'
Vladimir Oltean says:
====================
Incremental fixups for DSA unicast filtering
There are some bugs I've discovered in the recently merged "DSA unicast
filtering" series:
https://patchwork.kernel.org/project/netdevbpf/cover/20220302191417.1288145-1-vladimir.oltean@nxp.com/
First bug is the dereference of an uninitialized list (dp->fdbs) when
the "initial" tag protocol is placed in the device tree for the Felix
switch driver. This is a scenario I hadn't tested. It is handled by
patches 1-3.
Second bug is actually a sum of bugs that canceled each other out during
my previous testing. The MAC address change of a DSA slave interface
breaks termination for the other slave interfaces. But this actually
does not happen if the slave interface whose address is changing is
down. And even when up, traffic termination is still not broken because
we fail to properly disable host flooding. Patches 4-6 handle this for
the Felix driver (the only one benefiting from unicast filtering so far).
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/dsa.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/net/dsa.h b/include/net/dsa.h index 759479fe8573..9d16505fc0e2 100644 --- a/include/net/dsa.h +++ b/include/net/dsa.h @@ -1227,6 +1227,12 @@ typedef int dsa_fdb_walk_cb_t(struct dsa_switch *ds, int port, int dsa_port_walk_fdbs(struct dsa_switch *ds, int port, dsa_fdb_walk_cb_t cb); int dsa_port_walk_mdbs(struct dsa_switch *ds, int port, dsa_fdb_walk_cb_t cb); +bool dsa_fdb_present_in_other_db(struct dsa_switch *ds, int port, + const unsigned char *addr, u16 vid, + struct dsa_db db); +bool dsa_mdb_present_in_other_db(struct dsa_switch *ds, int port, + const struct switchdev_obj_port_mdb *mdb, + struct dsa_db db); /* Keep inline for faster access in hot path */ static inline bool netdev_uses_dsa(const struct net_device *dev) |
