[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111117192353.GD2051622@jupiter.n2.diac24.net>
Date: Thu, 17 Nov 2011 20:23:53 +0100
From: David Lamparter <equinox@...c24.net>
To: David Miller <davem@...emloft.net>
Cc: Wolfgang.Fritz@...mile.com, holger.brunck@...mile.com,
netdev@...r.kernel.org, shemminger@...ux-foundation.org,
bridge@...ts.linux-foundation.org
Subject: Re: [PATCH] net, bridge: print log message after state changed
On Mon, Nov 14, 2011 at 02:07:49AM -0500, David Miller wrote:
> >> The message is therefore appropriately timed as far as I'm concerned.
> >>
> >
> > It's not.
> >
> > Please test: create a bridge with STP disabled, add an interface to the
> > bridge and set that interface down. You get the message "... entering
> > forwarding state". That's wrong because it's "about to enter" disabled
> > state some lines later.
> >
> > All other (4) calls to br_log_state are located after the state change,
> > see for example br_stp_enable_port() just some lines above the patch.
>
> I would never expect an "entering" message to print out after the event
> happens, and in fact I'd _always_ want to see it beforehand so that if
> the state change caused a crash or similar it'd be that much easier
> to pinpoint the proper location.
There seems to be a misunderstanding here. The patch effectively does:
- br_log_state(p);
p->state = BR_STATE_DISABLED;
+ br_log_state(p);
and the issue it is trying to fix is not the timing but rather the code
printing the wrong (old, now-left) state.
I do agree that the log message should be printed before anything
happens, so, Holger, can you brew a patch that does that?
-David
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists