diff options
author | Vladimir Oltean <vladimir.oltean@nxp.com> | 2021-07-19 15:51:38 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-07-20 16:04:27 +0200 |
commit | c6451cda100d4ebbc3f6819e1161ce0e38ce7746 (patch) | |
tree | 70e29f32a10094a1bf3ae8b07f8c4e117a1b7809 /net/dsa | |
parent | net: phy: add Maxlinear GPY115/21x/24x driver (diff) | |
download | linux-c6451cda100d4ebbc3f6819e1161ce0e38ce7746.tar.xz linux-c6451cda100d4ebbc3f6819e1161ce0e38ce7746.zip |
net: switchdev: introduce helper for checking dynamically learned FDB entries
It is a bit difficult to understand what DSA checks when it tries to
avoid installing dynamically learned addresses on foreign interfaces as
local host addresses, so create a generic switchdev helper that can be
reused and is generally more readable.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa')
-rw-r--r-- | net/dsa/slave.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/dsa/slave.c b/net/dsa/slave.c index ffbba1e71551..feb64f58faed 100644 --- a/net/dsa/slave.c +++ b/net/dsa/slave.c @@ -2438,7 +2438,7 @@ static int dsa_slave_switchdev_event(struct notifier_block *unused, * On the other hand, FDB entries for local termination * should always be installed. */ - if (!fdb_info->added_by_user && !fdb_info->is_local && + if (switchdev_fdb_is_dynamically_learned(fdb_info) && !dp->ds->assisted_learning_on_cpu_port) return NOTIFY_DONE; |