netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] bridge: Let bridge not age 'externally' learnt FDB entries, they are removed when 'external' entity notifies the aging
@ 2015-02-02 17:21 Siva Mannem
  2015-02-03 15:11 ` roopa
  2015-02-04 21:51 ` David Miller
  0 siblings, 2 replies; 15+ messages in thread
From: Siva Mannem @ 2015-02-02 17:21 UTC (permalink / raw)
  To: netdev; +Cc: Siva Mannem

 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>
---
 net/bridge/br_fdb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c
index 08bf04b..6eb94b5 100644
--- a/net/bridge/br_fdb.c
+++ b/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) {
 			unsigned long this_timer;
-			if (f->is_static)
+			if (f->is_static || f->added_by_external_learn)
 				continue;
 			this_timer = f->updated + delay;
 			if (time_before_eq(this_timer, jiffies))
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2015-02-07  5:53 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-02 17:21 [PATCH net-next] bridge: Let bridge not age 'externally' learnt FDB entries, they are removed when 'external' entity notifies the aging Siva Mannem
2015-02-03 15:11 ` roopa
2015-02-04  8:02   ` Siva Mannem
2015-02-04 16:19     ` roopa
2015-02-05  7:13       ` Scott Feldman
2015-02-05  7:53         ` David Miller
2015-02-05 10:26           ` Siva Mannem
2015-02-05 11:05             ` B Viswanath
2015-02-05 17:10               ` Scott Feldman
2015-02-05 17:55                 ` Scott Feldman
2015-02-05 18:31                   ` B Viswanath
2015-02-06  1:45                     ` Scott Feldman
2015-02-06  3:27                       ` Siva Mannem
2015-02-07  5:53                         ` Scott Feldman
2015-02-04 21:51 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).