mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
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>
This commit is contained in:
parent
7d901a1e87
commit
c6451cda10
2 changed files with 7 additions and 1 deletions
|
@ -238,6 +238,12 @@ switchdev_notifier_info_to_extack(const struct switchdev_notifier_info *info)
|
|||
return info->extack;
|
||||
}
|
||||
|
||||
static inline bool
|
||||
switchdev_fdb_is_dynamically_learned(const struct switchdev_notifier_fdb_info *fdb_info)
|
||||
{
|
||||
return !fdb_info->added_by_user && !fdb_info->is_local;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_NET_SWITCHDEV
|
||||
|
||||
void switchdev_deferred_process(void);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue