All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Cong Wang <amwang@redhat.com>
Cc: netdev@vger.kernel.org, Herbert Xu <herbert@gondor.hengli.com.au>,
	Stephen Hemminger <stephen@networkplumber.org>,
	"David S. Miller" <davem@davemloft.net>,
	Adam Baker <linux@baker-net.org.uk>
Subject: Re: [Patch net-next v2] bridge: do not expire mdb entry as long as bridge still uses it
Date: Thu, 25 Apr 2013 16:30:37 +0400	[thread overview]
Message-ID: <517921ED.6090701@cogentembedded.com> (raw)
In-Reply-To: <1366878083-22797-1-git-send-email-amwang@redhat.com>

Hello.

On 25-04-2013 12:21, Cong Wang wrote:

> This bug can be observed in virt environment, when a KVM guest
> communicates with the host via multicast. After some time (should
> be 260 sec, I didn't measure), the multicast traffic suddenly
> terminates.

> This is due to the mdb entry for bridge itself expires automatically,
> it should not expire as long as the bridge still generates multicast
> traffic. It should expire when the bridge leaves the multicast group,
> OR when there is no multicast traffic on this bridge.

> I fix this by adding another bool which is set when there is
> multicast traffic goes to the bridge, cleared in the expire timer and
> when IGMP leave is received. I ran omping for 15 minutes, everything
> looks good now.

> This might not be the best fix, but might be the simplest fix.

> (Adam, this problem is probably different with your problem,
> at least this problem can _not_ be workarounded by setting
> querier to 1.)

> 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: rename ->busy to ->for_br

> diff --git a/net/bridge/br_input.c b/net/bridge/br_input.c
> index 828e2bc..4f0e50f 100644
> --- a/net/bridge/br_input.c
> +++ b/net/bridge/br_input.c
> @@ -99,9 +99,12 @@ int br_handle_frame_finish(struct sk_buff *skb)
>   	else if (is_multicast_ether_addr(dest)) {
>   		mdst = br_mdb_get(br, skb, vid);
>   		if (mdst || BR_INPUT_SKB_CB_MROUTERS_ONLY(skb)) {
> -			if ((mdst && mdst->mglist) ||
> -			    br_multicast_is_router(br))
> +			bool to_br = mdst && mdst->mglist;

    Emoty line after declaration wouldn't hurt.

> +			if (to_br || br_multicast_is_router(br))
>   				skb2 = skb;

WBR, Sergei

      parent reply	other threads:[~2013-04-25 12:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-25  8:21 [Patch net-next v2] bridge: do not expire mdb entry as long as bridge still uses it Cong Wang
2013-04-25  8:37 ` Herbert Xu
2013-04-25 10:07   ` Cong Wang
2013-04-26 12:50     ` Herbert Xu
2013-04-27 15:40       ` Cong Wang
2013-04-25 12:30 ` Sergei Shtylyov [this message]

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=517921ED.6090701@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=amwang@redhat.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.hengli.com.au \
    --cc=linux@baker-net.org.uk \
    --cc=netdev@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.