Hangbin Liu
2021-Oct-15 02:51 UTC
[Bridge] [PATCH net-next v4 10/15] net: bridge: mcast: support for IGMPv3/MLDv2 ALLOW_NEW_SOURCES report
On Mon, Sep 07, 2020 at 12:56:14PM +0300, Nikolay Aleksandrov wrote:> This patch adds handling for the ALLOW_NEW_SOURCES IGMPv3/MLDv2 report > types and limits them only when multicast_igmp_version == 3 or > multicast_mld_version == 2 respectively. Now that IGMPv3/MLDv2 handling > functions will be managing timers we need to delay their activation, thus > a new argument is added which controls if the timer should be updated. > We also disable host IGMPv3/MLDv2 handling as it's not yet implemented and > could cause inconsistent group state, the host can only join a group as > EXCLUDE {} or leave it. > > v4: rename update_timer to igmpv2_mldv1 and use the passed value from > br_multicast_add_group's callers > v3: Add IPv6/MLDv2 support > > Signed-off-by: Nikolay Aleksandrov <nikolay at cumulusnetworks.com> > --- > net/bridge/br_multicast.c | 152 ++++++++++++++++++++++++++++++++------ > net/bridge/br_private.h | 7 ++ > 2 files changed, 137 insertions(+), 22 deletions(-) > > diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c > index ba2ce875a80e..98600a08114e 100644 > --- a/net/bridge/br_multicast.c > +++ b/net/bridge/br_multicast.c > @@ -787,7 +787,8 @@ static int br_multicast_add_group(struct net_bridge *br, > struct net_bridge_port *port, > struct br_ip *group, > const unsigned char *src, > - u8 filter_mode) > + u8 filter_mode, > + bool igmpv2_mldv1) > { > struct net_bridge_port_group __rcu **pp; > struct net_bridge_port_group *p; > @@ -826,7 +827,8 @@ static int br_multicast_add_group(struct net_bridge *br, > br_mdb_notify(br->dev, mp, p, RTM_NEWMDB); > > found: > - mod_timer(&p->timer, now + br->multicast_membership_interval); > + if (igmpv2_mldv1) > + mod_timer(&p->timer, now + br->multicast_membership_interval);Hi Nikolay, Our engineer found that the multicast_membership_interval will not work with IGMPv3. Is it intend as you said "IGMPv3/MLDv2 handling is not yet implemented" ? Thanks Hangbin
Hangbin Liu
2021-Oct-15 06:36 UTC
[Bridge] [PATCH net-next v4 10/15] net: bridge: mcast: support for IGMPv3/MLDv2 ALLOW_NEW_SOURCES report
On Fri, Oct 15, 2021 at 10:52:00AM +0800, Hangbin Liu wrote:> > - mod_timer(&p->timer, now + br->multicast_membership_interval); > > + if (igmpv2_mldv1) > > + mod_timer(&p->timer, now + br->multicast_membership_interval); > > Hi Nikolay, > > Our engineer found that the multicast_membership_interval will not work with > IGMPv3. Is it intend as you said "IGMPv3/MLDv2 handling is not yet > implemented" ?Ah, I saw in br_multicast_group_expired() it wait for mp->ports be freed before delete the mdb entry. And in br_multicast_port_group_expired() it wait for src entry freed first. But when mod group src timer, we use __grp_src_mod_timer(ent, now + br_multicast_gmi(brmctx)); instead of user configured multicast_membership_interval. I think we should fix it. WDYT? Thanks Hangbin