bridge: fix "entering disabled state" logging
Subsystems (3)
PATCH 1/1 bridge: fix "entering disabled state" logging
Now we have:
eth0: link down
br0: port 1(eth0) entering forwarding state
State should be logged *after* it was changed, not before.
---
net/bridge/br_stp_if.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
net/bridge/br_stp_if.c +1 -2
@@ -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);
Quoted 5 lines · Paulius Zaleckas
Now we have:
eth0: link down
br0: port 1(eth0) entering forwarding stateState should be logged *after* it was changed, not before.
The funny thing is that it was introduced:
2010-05-16 stephen hemminger
bridge: change console message interface28a16c97963d3bc36a2c192859f6d8025ef2967a
and no one noticed since then :D
Stephen Hemminger
Acked-byQuoted 5 lines · On Tue, 06 Mar 2012 16:34:54 +0200 Paulius Zaleckas…
Quoted 4 lines · Paulius Zaleckas
Now we have:
eth0: link down
br0: port 1(eth0) entering forwarding state
Quoted 8 lines
Quoted 1 line
State should be logged *after* it was changed, not before.
The funny thing is that it was introduced:
2010-05-16 stephen hemminger
bridge: change console message interface28a16c97963d3bc36a2c192859f6d8025ef2967aand no one noticed since then :D
The message could be corrected to have correct verb tense. s/entering/entered/
David Miller
maintainerFrom: Paulius Zaleckas <[email protected]>
Date: Tue, 06 Mar 2012 16:34:54 +0200
Quoted 5 lines · Paulius Zaleckas
Quoted 4 lines
Now we have:
eth0: link down
br0: port 1(eth0) entering forwarding state
Quoted 8 lines
Quoted 1 line
State should be logged *after* it was changed, not before.
The funny thing is that it was introduced:
2010-05-16 stephen hemminger
bridge: change console message interface28a16c97963d3bc36a2c192859f6d8025ef2967aand no one noticed since then :D
No, someone noticed, you're not the first person to propose this patch and it was rejected just like your's will be.
David Miller
maintainerFrom: Paulius Zaleckas <[email protected]>
Date: Tue, 06 Mar 2012 16:22:19 +0200
Quoted 8 lines
Now we have:
eth0: link down
br0: port 1(eth0) entering forwarding stateState should be logged *after* it was changed, not before.
Reported-by Zilvinas Valinskas <[email protected]>Signed-off-by Paulius Zaleckas <[email protected]>
This is intentional, this was a discussion about this.
"Entering" means "about to" therefore we say it before it happens.
Quoted 7 lines · David Miller
From: Paulius Zaleckas<[email protected]>
Date: Tue, 06 Mar 2012 16:22:19 +0200Quoted 4 lines
Now we have:
eth0: link *down*
br0: port 1(eth0) entering *forwarding* state
Quoted 8 lines
Quoted 4 lines
State should be logged *after* it was changed, not before.
Reported-by Zilvinas Valinskas<[email protected]>Signed-off-by Paulius Zaleckas<[email protected]>This is intentional, this was a discussion about this.
"Entering" means "about to" therefore we say it before it happens.
You have missed the whole point here... please look at dmesg output, I have bolded what you should pay attention to. It should say "entering disabled state" instead of "entering forwarding state".
However I do agree with you and Stephen that it should say "entered" and not "entering". I will send you patch changing this.
I will also resend this patch with better description.
Quoted 13 lines · Paulius Zaleckas
Quoted 12 lines · David Miller
From: Paulius Zaleckas<[email protected]>
Date: Tue, 06 Mar 2012 16:22:19 +0200Quoted 8 lines
Now we have:
eth0: link *down*
br0: port 1(eth0) entering *forwarding* stateState should be logged *after* it was changed, not before.
Reported-by Zilvinas Valinskas<[email protected]>Signed-off-by Paulius Zaleckas<[email protected]>
Quoted 7 lines
Quoted 3 lines
This is intentional, this was a discussion about this.
"Entering" means "about to" therefore we say it before it happens.
You have missed the whole point here... please look at dmesg output, I have bolded what you should pay attention to. It should say "entering disabled state" instead of "entering forwarding state".
To make this even more clear so it's not dismissed another time:
it says "entering forwarding state" when it is actually entering disabled state. Because the print references the value before the change. Which is changed to disabled just after.
Whatever the tense of the verb, it prints the state that's just being left instead of the one being entered.
-David