Skip to contentSkip to conversation

bridge: fix message_age_timer calculation

PATCH In review Chris Healy 4 participants 4 messages Sep 9, 2013 – Sep 11, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bridge: fix message_age_timer calculation

This changes the message_age_timer calculation to use the BPDU's max age as opposed to the local bridge's max age. This is in accordance with section 8.6.2.3.2 Step 2 of the 802.1D-1998 sprecification.

With the current implementation, when running with very large bridge diameters, convergance will not always occur even if a root bridge is configured to have a longer max age.

Tested successfully on bridge diameters of ~200.

---
 net/bridge/br_stp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/bridge/br_stp.c +1 -1
index 1c0a50f..f1887ba 100644
@@ -209,7 +209,7 @@ static void br_record_config_information(struct net_bridge_port *p,
 	p->designated_age = jiffies - bpdu->message_age;
 
 	mod_timer(&p->message_age_timer, jiffies
-		  + (p->br->max_age - bpdu->message_age));
+		  + (bpdu->max_age - bpdu->message_age));
 }
 
 /* called under bridge lock */
Signature · 1 line
1.8.1.2
Acked-by on v1 1/1
#1 lore raw
Quoted 16 lines · On Mon, 9 Sep 2013 09:56:08 -0700 Chris Healy <[email protected]> wrote:

This changes the message_age_timer calculation to use the BPDU's max age as opposed to the local bridge's max age. This is in accordance with section 8.6.2.3.2 Step 2 of the 802.1D-1998 sprecification.

With the current implementation, when running with very large bridge diameters, convergance will not always occur even if a root bridge is configured to have a longer max age.

Tested successfully on bridge diameters of ~200.

---
 net/bridge/br_stp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/bridge/br_stp.c +0 -0
index 1c0a50f..f1887ba 100644

net/bridge/br_stp.c static void br_record_config_information(struct net_bridge_port *p, · line 215

Quoted 8 lines
net/bridge/br_stp.c +1 -1
@@ -209,7 +209,7 @@ static void br_record_config_information(struct net_bridge_port *p,
 	p->designated_age = jiffies - bpdu->message_age;
 
 	mod_timer(&p->message_age_timer, jiffies
-		  + (p->br->max_age - bpdu->message_age));
+		  + (bpdu->max_age - bpdu->message_age));
 }
 
 /* called under bridge lock */

This makes sense.

#2 lore raw
In reply to Chris Healy

Hello.

Quoted 1 line · Chris Healy

This changes the message_age_timer calculation to use the BPDU's max age as opposed to the local bridge's max age. This is in accordance with section 8.6.2.3.2 Step 2 of the 802.1D-1998 sprecification.

You should wrap your changelog lines at 80 chars at most, preferably less.

Quoted 5 lines

With the current implementation, when running with very large bridge diameters, convergance will not always occur even if a root bridge is configured to have a longer max age.

Tested successfully on bridge diameters of ~200.

WBR, Sergei

maintainer
#3 lore raw

From: Sergei Shtylyov <[email protected]>
Date: Wed, 11 Sep 2013 22:40:59 +0400

Quoted 10 lines

Hello.

Quoted 3 lines · Chris Healy

This changes the message_age_timer calculation to use the BPDU's max age as opposed to the local bridge's max age. This is in accordance with section 8.6.2.3.2 Step 2 of the 802.1D-1998 sprecification.

You should wrap your changelog lines at 80 chars at most, preferably less.

Yes, please fix this and resubmit.