From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, roopa@cumulusnetworks.com,
stephen@networkplumber.org, bridge@lists.linux-foundation.org,
Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Subject: [PATCH net-next 2/3] bridge: mcast: do nothing if port's multicast_router is set to the same val
Date: Fri, 26 Feb 2016 19:59:25 +0100 [thread overview]
Message-ID: <1456513166-20159-3-git-send-email-nikolay@cumulusnetworks.com> (raw)
In-Reply-To: <1456513166-20159-1-git-send-email-nikolay@cumulusnetworks.com>
This is needed for the upcoming temporary port router. There's no point
to go through the logic if the value is the same.
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
---
net/bridge/br_multicast.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index 015c47dd1364..496f808f9aa1 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -1853,7 +1853,10 @@ int br_multicast_set_port_router(struct net_bridge_port *p, unsigned long val)
int err = -EINVAL;
spin_lock(&br->multicast_lock);
-
+ if (p->multicast_router == val) {
+ err = 0;
+ goto unlock;
+ }
switch (val) {
case MDB_RTR_TYPE_DISABLED:
__del_port_router(p);
--
2.4.3
next prev parent reply other threads:[~2016-02-26 18:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-26 18:59 [PATCH net-next 0/3] bridge: mcast: add support for temp router port Nikolay Aleksandrov
2016-02-26 18:59 ` [PATCH net-next 1/3] bridge: mcast: use names for the different multicast_router types Nikolay Aleksandrov
2016-02-26 18:59 ` Nikolay Aleksandrov [this message]
2016-02-26 18:59 ` [PATCH net-next 3/3] bridge: mcast: add support for temporary port router Nikolay Aleksandrov
2016-02-26 19:51 ` [PATCH net-next 0/3] bridge: mcast: add support for temp router port Nikolay Aleksandrov
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=1456513166-20159-3-git-send-email-nikolay@cumulusnetworks.com \
--to=nikolay@cumulusnetworks.com \
--cc=bridge@lists.linux-foundation.org \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=roopa@cumulusnetworks.com \
--cc=stephen@networkplumber.org \
/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).