Skip to contentSkip to conversation

bridge: br_log_state() s/entering/entered/

PATCH Applied Paulius Zaleckas 2 participants 4 messages Mar 7, 2012 – Mar 8, 2012

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

PATCH 1/2 bridge: br_log_state() s/entering/entered/

When br_log_state() is reporting state it should say "entered" istead of "entering" since state at this point is already changed.

---

 net/bridge/br_stp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/bridge/br_stp.c +1 -1
index 6751ed4..8c836d9 100644
@@ -31,7 +31,7 @@ static const char *const br_port_state_names[] = {
 
 void br_log_state(const struct net_bridge_port *p)
 {
-	br_info(p->br, "port %u(%s) entering %s state\n",
+	br_info(p->br, "port %u(%s) entered %s state\n",
 		(unsigned) p->port_no, p->dev->name,
 		br_port_state_names[p->state]);
 }
#1 lore raw

PATCH 2/2 bridge: fix state reporting when port is disabled

Now we have:
eth0: link *down*
br0: port 1(eth0) entered *forwarding* state

br_log_state(p) should be called *after* p->state is set to BR_STATE_DISABLED.

---

 net/bridge/br_stp_if.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
net/bridge/br_stp_if.c +1 -2
index 19308e3..f494496 100644
@@ -98,14 +98,13 @@ void br_stp_disable_port(struct net_bridge_port *p)
 	struct net_bridge *br = p->br;
 	int wasroot;
 
-	br_log_state(p);
-
 	wasroot = br_is_root_bridge(br);
 	br_become_designated_port(p);
 	p->state = BR_STATE_DISABLED;
 	p->topology_change_ack = 0;
 	p->config_pending = 0;
 
+	br_log_state(p);
 	br_ifinfo_notify(RTM_NEWLINK, p);
 
 	del_timer(&p->message_age_timer);
maintainer Applied
#2 lore raw

Re: [PATCH 2/2] bridge: fix state reporting when port is disabled

From: Paulius Zaleckas <[email protected]>
Date: Wed, 07 Mar 2012 10:25:22 +0200

Quoted 10 lines

Now we have:
eth0: link *down*
br0: port 1(eth0) entered *forwarding* state

br_log_state(p) should be called *after* p->state is set to BR_STATE_DISABLED.

Applied.