Subject: Re: annoying "link state changed" messages on boot
To: Rui Paulo <rpaulo@fnop.net>
From: Julio M. Merino Vidal <jmmv84@gmail.com>
List: tech-kern
Date: 05/01/2006 16:19:57
On 5/1/06, Rui Paulo <rpaulo@fnop.net> wrote:
> "Julio M. Merino Vidal" <jmmv84@gmail.com> writes:
>
> > On 5/1/06, Simon Burge <simonb@wasabisystems.com> wrote:
> >> Every time on boot, I'm seeing messages like:
> >>
> >> wm0: link state changed to DOWN
> >> wm0: link state changed to UP
> >>
> >> for any interface that's used, and just a
> >>
> >> re0: link state changed to DOWN
> >>
> >> or similar for any interface that isn't used.
> >>
> >> Other than being somewhat annoying, do they serve any useful
> >> purpose? If there any problem if "#ifdef DEBUG"ing them in
> >> if_link_state_change()?
> >
> > I also find them annoying. The question is: why were they added?
>
> revision 1.46
> date: 2006/02/18 19:51:07; author: joerg; state: Exp; lines: +13 -34
> Change the link status code in MII to use if_link_state_change instead
> of calling rt_ifmsg directly. This allows other parts of the kernel
> to change the behaviour depending on the link state and is a
> prerequirement for CARP.
>
> Hide mii_phy_statusmsg, mii_phy_update should be used instead.
> Don't send routing messages for baudrate changes, if_baudrate is
> currently not exported via this interface.
This does not mention the added printed message, does it?
I agree with Steven, though. The kernel can already notify userland
about interface changes (I did not know this), so it should be up to a
userland daemon (ifwatchd) to print messages or do whatever you want
on those events. The kernel should not directly print them...
--
Julio M. Merino Vidal <jmmv84@gmail.com>
The Julipedia - http://julipedia.blogspot.com/