netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nikolay Aleksandrov <razor@blackwall.org>
To: netdev@vger.kernel.org
Cc: roopa@nvidia.com, bridge@lists.linux-foundation.org,
	davem@davemloft.net, kuba@kernel.org,
	Nikolay Aleksandrov <nikolay@nvidia.com>,
	Hangbin Liu <liuhangbin@gmail.com>
Subject: [PATCH net] net: bridge: mcast: use multicast_membership_interval for IGMPv3
Date: Fri, 15 Oct 2021 12:05:46 +0300	[thread overview]
Message-ID: <20211015090546.19967-1-razor@blackwall.org> (raw)
In-Reply-To: <357fad9e-581e-7b71-9b32-aac77d5d13c1@nvidia.com>

From: Nikolay Aleksandrov <nikolay@nvidia.com>

When I added IGMPv3 support I decided to follow the RFC for computing
the GMI dynamically:
" 8.4. Group Membership Interval

   The Group Membership Interval is the amount of time that must pass
   before a multicast router decides there are no more members of a
   group or a particular source on a network.

   This value MUST be ((the Robustness Variable) times (the Query
   Interval)) plus (one Query Response Interval)."

But that actually is inconsistent with how the bridge used to compute it
for IGMPv2, where it was user-configurable that has a correct default value
but it is up to user-space to maintain it. This would make it consistent
with the other timer values which are also maintained correct by the user
instead of being dynamically computed. It also changes back to the previous
user-expected GMI behaviour for IGMPv3 queries which were supported before
IGMPv3 was added. Note that to properly compute it dynamically we would
need to add support for "Robustness Variable" which is currently missing.

Reported-by: Hangbin Liu <liuhangbin@gmail.com>
Fixes: 0436862e417e ("net: bridge: mcast: support for IGMPv3/MLDv2 ALLOW_NEW_SOURCES report")
Signed-off-by: Nikolay Aleksandrov <nikolay@nvidia.com>
---
 net/bridge/br_private.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h
index b4cef3a97f12..5c68052466a0 100644
--- a/net/bridge/br_private.h
+++ b/net/bridge/br_private.h
@@ -1125,9 +1125,7 @@ static inline unsigned long br_multicast_lmqt(const struct net_bridge_mcast *brm
 
 static inline unsigned long br_multicast_gmi(const struct net_bridge_mcast *brmctx)
 {
-	/* use the RFC default of 2 for QRV */
-	return 2 * brmctx->multicast_query_interval +
-	       brmctx->multicast_query_response_interval;
+	return brmctx->multicast_membership_interval;
 }
 
 static inline bool
-- 
2.31.1


  reply	other threads:[~2021-10-15  9:06 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-07  9:56 [PATCH net-next v4 00/15] net: bridge: mcast: initial IGMPv3/MLDv2 support (part 1) Nikolay Aleksandrov
2020-09-07  9:56 ` [PATCH net-next v4 01/15] net: bridge: mdb: arrange internal structs so fast-path fields are close Nikolay Aleksandrov
2020-09-07  9:56 ` [PATCH net-next v4 02/15] net: bridge: mcast: factor out port group del Nikolay Aleksandrov
2020-09-07  9:56 ` [PATCH net-next v4 03/15] net: bridge: mcast: add support for group source list Nikolay Aleksandrov
2020-09-07  9:56 ` [PATCH net-next v4 04/15] net: bridge: mcast: add support for src list and filter mode dumping Nikolay Aleksandrov
2020-09-07  9:56 ` [PATCH net-next v4 05/15] net: bridge: mcast: add support for group-and-source specific queries Nikolay Aleksandrov
2020-09-07  9:56 ` [PATCH net-next v4 06/15] net: bridge: mcast: add support for group query retransmit Nikolay Aleksandrov
2020-09-07  9:56 ` [PATCH net-next v4 07/15] net: bridge: mdb: push notifications in __br_mdb_add/del Nikolay Aleksandrov
2020-09-07  9:56 ` [PATCH net-next v4 08/15] net: bridge: mdb: use mdb and port entries in notifications Nikolay Aleksandrov
2020-09-07  9:56 ` [PATCH net-next v4 09/15] net: bridge: mcast: delete expired port groups without srcs Nikolay Aleksandrov
2020-09-07  9:56 ` [PATCH net-next v4 10/15] net: bridge: mcast: support for IGMPv3/MLDv2 ALLOW_NEW_SOURCES report Nikolay Aleksandrov
2021-10-15  2:51   ` Hangbin Liu
2021-10-15  6:36     ` Hangbin Liu
2021-10-15  8:57       ` Nikolay Aleksandrov
2021-10-15  9:05         ` Nikolay Aleksandrov [this message]
2021-10-16 14:10           ` [PATCH net] net: bridge: mcast: use multicast_membership_interval for IGMPv3 patchwork-bot+netdevbpf
2020-09-07  9:56 ` [PATCH net-next v4 11/15] net: bridge: mcast: support for IGMPV3/MLDv2 MODE_IS_INCLUDE/EXCLUDE report Nikolay Aleksandrov
2020-09-07  9:56 ` [PATCH net-next v4 12/15] net: bridge: mcast: support for IGMPV3/MLDv2 CHANGE_TO_INCLUDE/EXCLUDE report Nikolay Aleksandrov
2020-09-07  9:56 ` [PATCH net-next v4 13/15] net: bridge: mcast: support for IGMPV3/MLDv2 BLOCK_OLD_SOURCES report Nikolay Aleksandrov
2020-09-07  9:56 ` [PATCH net-next v4 14/15] net: bridge: mcast: improve IGMPv3/MLDv2 query processing Nikolay Aleksandrov
2020-09-07  9:56 ` [PATCH net-next v4 15/15] net: bridge: mcast: destroy all entries via gc Nikolay Aleksandrov
2020-09-07 20:27 ` [PATCH net-next v4 00/15] net: bridge: mcast: initial IGMPv3/MLDv2 support (part 1) Jakub Kicinski

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=20211015090546.19967-1-razor@blackwall.org \
    --to=razor@blackwall.org \
    --cc=bridge@lists.linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=liuhangbin@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@nvidia.com \
    --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).