diff options
author | Nikolay Aleksandrov <nikolay@cumulusnetworks.com> | 2017-03-23 11:27:12 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-03-24 20:30:21 +0100 |
commit | 7e26bf45e4cb4ffaa113dc4a95a3d78bcc51e4cb (patch) | |
tree | 41975fa9ec23f322a3c2718e5d9a8d0b68c400b3 /net/bridge | |
parent | mlxsw: Remove debugfs interface (diff) | |
download | linux-7e26bf45e4cb4ffaa113dc4a95a3d78bcc51e4cb.tar.xz linux-7e26bf45e4cb4ffaa113dc4a95a3d78bcc51e4cb.zip |
net: bridge: allow SW learn to take over HW fdb entries
Allow to take over an entry which was previously learned via HW when it
shows up from a SW port. This is analogous to how HW takes over SW learned
entries already.
Suggested-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge')
-rw-r--r-- | net/bridge/br_fdb.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c index 6e08b7199dd7..daebce89dba8 100644 --- a/net/bridge/br_fdb.c +++ b/net/bridge/br_fdb.c @@ -594,6 +594,9 @@ void br_fdb_update(struct net_bridge *br, struct net_bridge_port *source, fdb->updated = now; if (unlikely(added_by_user)) fdb->added_by_user = 1; + /* Take over HW learned entry */ + if (unlikely(fdb->added_by_external_learn)) + fdb->added_by_external_learn = 0; if (unlikely(fdb_modified)) fdb_notify(br, fdb, RTM_NEWNEIGH); } |