netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
To: netdev@vger.kernel.org
Cc: roopa@nvidia.com, bridge@lists.linux-foundation.org,
	davem@davemloft.net,
	Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Subject: [PATCH net-next v2 14/15] net: bridge: mcast: improve v3 query processing
Date: Wed,  2 Sep 2020 14:25:28 +0300	[thread overview]
Message-ID: <20200902112529.1570040-15-nikolay@cumulusnetworks.com> (raw)
In-Reply-To: <20200902112529.1570040-1-nikolay@cumulusnetworks.com>

When an IGMPv3 query is received and we're operating in v3 mode then we
need to avoid updating group timers if the suppress flag is set. Also we
should update only timers for groups in exclude mode.

Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
---
 net/bridge/br_multicast.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index 7df192e9ec50..db4b2621631c 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -2034,7 +2034,8 @@ static void br_ip4_multicast_query(struct net_bridge *br,
 		}
 	} else if (transport_len >= sizeof(*ih3)) {
 		ih3 = igmpv3_query_hdr(skb);
-		if (ih3->nsrcs)
+		if (ih3->nsrcs ||
+		    (br->multicast_igmp_version == 3 && group && ih3->suppress))
 			goto out;
 
 		max_delay = ih3->code ?
@@ -2069,7 +2070,9 @@ static void br_ip4_multicast_query(struct net_bridge *br,
 	     pp = &p->next) {
 		if (timer_pending(&p->timer) ?
 		    time_after(p->timer.expires, now + max_delay) :
-		    try_to_del_timer_sync(&p->timer) >= 0)
+		    try_to_del_timer_sync(&p->timer) >= 0 &&
+		    (br->multicast_igmp_version == 2 ||
+		     p->filter_mode == MCAST_EXCLUDE))
 			mod_timer(&p->timer, now + max_delay);
 	}
 
-- 
2.25.4


  parent reply	other threads:[~2020-09-02 11:31 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-02 11:25 [PATCH net-next v2 00/15] net: bridge: mcast: initial IGMPv3 support (part 1) Nikolay Aleksandrov
2020-09-02 11:25 ` [PATCH net-next v2 01/15] net: bridge: mdb: arrange internal structs so fast-path fields are close Nikolay Aleksandrov
2020-09-02 11:25 ` [PATCH net-next v2 02/15] net: bridge: mcast: add support for group source list Nikolay Aleksandrov
2020-09-02 11:25 ` [PATCH net-next v2 03/15] net: bridge: mcast: add support for src list and filter mode dumping Nikolay Aleksandrov
2020-09-02 11:25 ` [PATCH net-next v2 04/15] net: bridge: mcast: add support for group-and-source specific queries Nikolay Aleksandrov
2020-09-03 12:18   ` Dan Carpenter
2020-09-03 12:40     ` Nikolay Aleksandrov
2020-09-02 11:25 ` [PATCH net-next v2 05/15] net: bridge: mcast: factor out port group del Nikolay Aleksandrov
2020-09-02 11:25 ` [PATCH net-next v2 06/15] net: bridge: mcast: add support for group query retransmit Nikolay Aleksandrov
2020-09-02 11:25 ` [PATCH net-next v2 07/15] net: bridge: mdb: push notifications in __br_mdb_add/del Nikolay Aleksandrov
2020-09-02 11:25 ` [PATCH net-next v2 08/15] net: bridge: mdb: use mdb and port entries in notifications Nikolay Aleksandrov
2020-09-02 11:25 ` [PATCH net-next v2 09/15] net: bridge: mcast: delete expired port groups without srcs Nikolay Aleksandrov
2020-09-02 11:25 ` [PATCH net-next v2 10/15] net: bridge: mcast: support for IGMPv3 IGMPV3_ALLOW_NEW_SOURCES report Nikolay Aleksandrov
2020-09-02 11:25 ` [PATCH net-next v2 11/15] net: bridge: mcast: support for IGMPV3_MODE_IS_INCLUDE/EXCLUDE report Nikolay Aleksandrov
2020-09-02 11:25 ` [PATCH net-next v2 12/15] net: bridge: mcast: support for IGMPV3_CHANGE_TO_INCLUDE/EXCLUDE report Nikolay Aleksandrov
2020-09-02 11:25 ` [PATCH net-next v2 13/15] net: bridge: mcast: support for IGMPV3_BLOCK_OLD_SOURCES report Nikolay Aleksandrov
2020-09-02 11:25 ` Nikolay Aleksandrov [this message]
2020-09-02 11:25 ` [PATCH net-next v2 15/15] net: bridge: mcast: destroy all entries via gc Nikolay Aleksandrov
2020-09-02 19:58 ` [PATCH net-next v2 00/15] net: bridge: mcast: initial IGMPv3 support (part 1) David Miller
2020-09-02 20:08   ` Nikolay Aleksandrov
2020-09-02 20:17     ` Nikolay Aleksandrov
2020-09-02 23:16       ` David Miller
2020-09-02 23:16     ` 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=20200902112529.1570040-15-nikolay@cumulusnetworks.com \
    --to=nikolay@cumulusnetworks.com \
    --cc=bridge@lists.linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=roopa@nvidia.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).