From: Nikolay Aleksandrov via Bridge <bridge@lists.linux-foundation.org>
To: netdev@vger.kernel.org
Cc: jiri@resnulli.us,
Nikolay Aleksandrov <nikolay@cumulusnetworks.com>,
roopa@cumulusnetworks.com, bridge@lists.linux-foundation.org,
idosch@mellanox.com, davem@davemloft.net
Subject: [PATCH net-next 1/2] net: bridge: allow SW learn to take over HW fdb entries
Date: Thu, 23 Mar 2017 12:27:12 +0200 [thread overview]
Message-ID: <1490264833-28867-2-git-send-email-nikolay@cumulusnetworks.com> (raw)
In-Reply-To: <1490264833-28867-1-git-send-email-nikolay@cumulusnetworks.com>
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>
---
net/bridge/br_fdb.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c
index 4f598dc2d916..e4c8adf517ea 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);
}
--
2.1.4
next prev parent reply other threads:[~2017-03-23 10:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-23 10:27 [PATCH net-next 0/2] net: bridge: allow user-space to add ext learned entries Nikolay Aleksandrov
2017-03-23 10:27 ` Nikolay Aleksandrov via Bridge [this message]
2017-03-23 19:47 ` [PATCH net-next 1/2] net: bridge: allow SW learn to take over HW fdb entries Ido Schimmel
2017-03-23 10:27 ` [PATCH net-next 2/2] net: bridge: allow to add externally learned entries from user-space Nikolay Aleksandrov
2017-03-23 19:47 ` Ido Schimmel
2017-03-23 12:48 ` [PATCH net-next 0/2] net: bridge: allow user-space to add ext learned entries Nikolay Aleksandrov via Bridge
2017-03-23 20:00 ` Ido Schimmel
2017-03-24 19:31 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1490264833-28867-2-git-send-email-nikolay@cumulusnetworks.com \
--to=bridge@lists.linux-foundation.org \
--cc=davem@davemloft.net \
--cc=idosch@mellanox.com \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--cc=nikolay@cumulusnetworks.com \
--cc=roopa@cumulusnetworks.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).