瀏覽代碼

bridge: Let bridge not age 'externally' learnt FDB entries, they are removed when 'external' entity notifies the aging

When 'learned_sync' flag is turned on, the offloaded switch
 port syncs learned MAC addresses to bridge's FDB via switchdev notifier
 (NETDEV_SWITCH_FDB_ADD). Currently, FDB entries learnt via this mechanism are
 wrongly being deleted by bridge aging logic. This patch ensures that FDB
 entries synced from offloaded switch ports are not deleted by bridging logic.
 Such entries can only be deleted via switchdev notifier
 (NETDEV_SWITCH_FDB_DEL).

Signed-off-by: Siva Mannem <siva.mannem.lnx@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Siva Mannem 10 年之前
父節點
當前提交
9a05dde59a
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      net/bridge/br_fdb.c

+ 1 - 1
net/bridge/br_fdb.c

@@ -280,7 +280,7 @@ void br_fdb_cleanup(unsigned long _data)
 
 
 		hlist_for_each_entry_safe(f, n, &br->hash[i], hlist) {
 		hlist_for_each_entry_safe(f, n, &br->hash[i], hlist) {
 			unsigned long this_timer;
 			unsigned long this_timer;
-			if (f->is_static)
+			if (f->is_static || f->added_by_external_learn)
 				continue;
 				continue;
 			this_timer = f->updated + delay;
 			this_timer = f->updated + delay;
 			if (time_before_eq(this_timer, jiffies))
 			if (time_before_eq(this_timer, jiffies))