diff mbox

[net-next] net: bridge: notify on hw fdb takeover

Message ID 1492166974-20578-1-git-send-email-nikolay@cumulusnetworks.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Nikolay Aleksandrov April 14, 2017, 10:49 a.m. UTC
Recently we added support for SW fdbs to take over HW ones, but that
results in changing a user-visible fdb flag thus we need to send a
notification, also it's consistent with how HW takes over SW entries.

Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
---
 net/bridge/br_fdb.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

David Miller April 17, 2017, 5:45 p.m. UTC | #1
From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Date: Fri, 14 Apr 2017 13:49:34 +0300

> Recently we added support for SW fdbs to take over HW ones, but that
> results in changing a user-visible fdb flag thus we need to send a
> notification, also it's consistent with how HW takes over SW entries.
> 
> Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>

Applied.
diff mbox

Patch

diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c
index 5a40a87c4f4f..de7988b0349e 100644
--- a/net/bridge/br_fdb.c
+++ b/net/bridge/br_fdb.c
@@ -595,8 +595,10 @@  void br_fdb_update(struct net_bridge *br, struct net_bridge_port *source,
 			if (unlikely(added_by_user))
 				fdb->added_by_user = 1;
 			/* Take over HW learned entry */
-			if (unlikely(fdb->added_by_external_learn))
+			if (unlikely(fdb->added_by_external_learn)) {
 				fdb->added_by_external_learn = 0;
+				fdb_modified = true;
+			}
 			if (unlikely(fdb_modified))
 				fdb_notify(br, fdb, RTM_NEWNEIGH);
 		}