diff mbox

[net-next,v2,3/3] bridge: send query as soon as leave is received

Message ID 1367293270-26256-3-git-send-email-amwang@redhat.com
State Superseded, archived
Delegated to: David Miller
Headers show

Commit Message

Amerigo Wang April 30, 2013, 3:41 a.m. UTC
From: Cong Wang <amwang@redhat.com>

Continue sending queries when leave is received if the user marks
it as a querier.

Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Stephen Hemminger <stephen@networkplumber.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Adam Baker <linux@baker-net.org.uk>
Signed-off-by: Cong Wang <amwang@redhat.com>
---
v2: only send query to the port received leave

 net/bridge/br_multicast.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

Comments

Herbert Xu April 30, 2013, 3:45 a.m. UTC | #1
On Tue, Apr 30, 2013 at 11:41:10AM +0800, Cong Wang wrote:
> From: Cong Wang <amwang@redhat.com>
> 
> Continue sending queries when leave is received if the user marks
> it as a querier.
> 
> Cc: Herbert Xu <herbert@gondor.apana.org.au>
> Cc: Stephen Hemminger <stephen@networkplumber.org>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Adam Baker <linux@baker-net.org.uk>
> Signed-off-by: Cong Wang <amwang@redhat.com>
> ---
> v2: only send query to the port received leave
> 
>  net/bridge/br_multicast.c |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)
> 
> diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
> index bab3d5a..b1879c8 100644
> --- a/net/bridge/br_multicast.c
> +++ b/net/bridge/br_multicast.c
> @@ -1250,6 +1250,13 @@ static void br_multicast_leave_group(struct net_bridge *br,
>  	if (!mp)
>  		goto out;
>  
> +	if (br->multicast_querier) {
> +		if (port)
> +			__br_multicast_enable_port(port);
> +		else
> +			mod_timer(&br->multicast_query_timer, jiffies);
> +	}

AFAICS this is still sending a general query as opposed to a
group-specific query, no?

Thanks,
Amerigo Wang April 30, 2013, 4:05 a.m. UTC | #2
On Tue, 2013-04-30 at 11:45 +0800, Herbert Xu wrote:
> On Tue, Apr 30, 2013 at 11:41:10AM +0800, Cong Wang wrote:
> > From: Cong Wang <amwang@redhat.com>
> > 
> > Continue sending queries when leave is received if the user marks
> > it as a querier.
> > 
> > Cc: Herbert Xu <herbert@gondor.apana.org.au>
> > Cc: Stephen Hemminger <stephen@networkplumber.org>
> > Cc: "David S. Miller" <davem@davemloft.net>
> > Cc: Adam Baker <linux@baker-net.org.uk>
> > Signed-off-by: Cong Wang <amwang@redhat.com>
> > ---
> > v2: only send query to the port received leave
> > 
> >  net/bridge/br_multicast.c |    7 +++++++
> >  1 files changed, 7 insertions(+), 0 deletions(-)
> > 
> > diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
> > index bab3d5a..b1879c8 100644
> > --- a/net/bridge/br_multicast.c
> > +++ b/net/bridge/br_multicast.c
> > @@ -1250,6 +1250,13 @@ static void br_multicast_leave_group(struct net_bridge *br,
> >  	if (!mp)
> >  		goto out;
> >  
> > +	if (br->multicast_querier) {
> > +		if (port)
> > +			__br_multicast_enable_port(port);
> > +		else
> > +			mod_timer(&br->multicast_query_timer, jiffies);
> > +	}
> 
> AFAICS this is still sending a general query as opposed to a
> group-specific query, no?
> 

When port is NULL, the query should only be sent to bridge itself, so I
think this is what we expect, right? Since we receive leave from bridge
itself.


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Herbert Xu April 30, 2013, 4:07 a.m. UTC | #3
On Tue, Apr 30, 2013 at 12:05:17PM +0800, Cong Wang wrote:
>
> When port is NULL, the query should only be sent to bridge itself, so I
> think this is what we expect, right? Since we receive leave from bridge
> itself.

No I'm not talking about which port it's being sent to (which
obviously should only be the port where the leave arrived on),
but what is in the query message.

A general query queries every single group out there, for a leave
we need to specifically query for the group that is being left.

Cheers,
diff mbox

Patch

diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index bab3d5a..b1879c8 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -1250,6 +1250,13 @@  static void br_multicast_leave_group(struct net_bridge *br,
 	if (!mp)
 		goto out;
 
+	if (br->multicast_querier) {
+		if (port)
+			__br_multicast_enable_port(port);
+		else
+			mod_timer(&br->multicast_query_timer, jiffies);
+	}
+
 	if (port && (port->flags & BR_MULTICAST_FAST_LEAVE)) {
 		struct net_bridge_port_group __rcu **pp;