All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, bridge@linux-foundation.org
Subject: [Bridge] [PATCH 2/2] bridge: fix initial packet flood if !STP
Date: Fri, 15 May 2009 09:11:58 -0700	[thread overview]
Message-ID: <20090515091158.55090cd0@nehalam> (raw)
In-Reply-To: <20090515091013.44b624d7@nehalam>

If bridge is configured with no STP and forwarding delay of 0 (which
is typical for virtualization) then when link starts it will flood all
packets for the first 20 seconds. 

This bug was introduced by a combination of earlier changes:
  * forwarding database uses hold time of zero to indicate 
    user wants to always flood packets
  * optimzation of the case of forwarding delay of 0 avoids the initial
    timer tick

The fix is to just skip all the topology change detection code if
kernel STP is not being used.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

--- a/net/bridge/br_stp.c	2009-05-14 13:34:49.965908836 -0700
+++ b/net/bridge/br_stp.c	2009-05-14 14:15:11.370903917 -0700
@@ -297,6 +297,9 @@ void br_topology_change_detection(struct
 {
 	int isroot = br_is_root_bridge(br);
 
+	if (br->stp_enabled != BR_KERNEL_STP)
+		return;
+
 	pr_info("%s: topology change detected, %s\n", br->dev->name,
 		isroot ? "propagating" : "sending tcn bpdu");
 

WARNING: multiple messages have this Message-ID (diff)
From: Stephen Hemminger <shemminger@vyatta.com>
To: David Miller <davem@davemloft.net>
Cc: bridge@linux-foundation.org, netdev@vger.kernel.org
Subject: [PATCH 2/2] bridge: fix initial packet flood if !STP
Date: Fri, 15 May 2009 09:11:58 -0700	[thread overview]
Message-ID: <20090515091158.55090cd0@nehalam> (raw)
In-Reply-To: <20090515091013.44b624d7@nehalam>

If bridge is configured with no STP and forwarding delay of 0 (which
is typical for virtualization) then when link starts it will flood all
packets for the first 20 seconds. 

This bug was introduced by a combination of earlier changes:
  * forwarding database uses hold time of zero to indicate 
    user wants to always flood packets
  * optimzation of the case of forwarding delay of 0 avoids the initial
    timer tick

The fix is to just skip all the topology change detection code if
kernel STP is not being used.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

--- a/net/bridge/br_stp.c	2009-05-14 13:34:49.965908836 -0700
+++ b/net/bridge/br_stp.c	2009-05-14 14:15:11.370903917 -0700
@@ -297,6 +297,9 @@ void br_topology_change_detection(struct
 {
 	int isroot = br_is_root_bridge(br);
 
+	if (br->stp_enabled != BR_KERNEL_STP)
+		return;
+
 	pr_info("%s: topology change detected, %s\n", br->dev->name,
 		isroot ? "propagating" : "sending tcn bpdu");
 

  reply	other threads:[~2009-05-15 16:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-15 16:10 [Bridge] [PATCH 1/2] bridge: relay bridge multicast pkgs if !STP Stephen Hemminger
2009-05-15 16:10 ` Stephen Hemminger
2009-05-15 16:11 ` Stephen Hemminger [this message]
2009-05-15 16:11   ` [PATCH 2/2] bridge: fix initial packet flood " Stephen Hemminger
2009-05-18  4:13   ` [Bridge] " David Miller
2009-05-18  4:13     ` David Miller
2009-05-18  4:13 ` [Bridge] [PATCH 1/2] bridge: relay bridge multicast pkgs " David Miller
2009-05-18  4:13   ` 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=20090515091158.55090cd0@nehalam \
    --to=shemminger@vyatta.com \
    --cc=bridge@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.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.