Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Aug 2008 19:18:31 +0900
From:      Pyun YongHyeon <pyunyh@gmail.com>
To:        Pete French <petefrench@ticketswitch.com>
Cc:        stable@freebsd.org
Subject:   Re: should looking at an interface with 'ifconfig' trigger a change ?
Message-ID:  <20080808101831.GD38118@cdnetworks.co.kr>
In-Reply-To: <E1KR8LB-000KtI-02@dilbert.ticketswitch.com>
References:  <E1KR8LB-000KtI-02@dilbert.ticketswitch.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--+QahgC5+KEYLbs62
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Thu, Aug 07, 2008 at 05:27:53PM +0100, Pete French wrote:
 > I have a very odd problem here - two interfaces bundled using lagg
 > in 'failover' mode, so one interface is active and the other not being
 > used. if the carrier drops on the active one I expect it to
 > failover, but it doesnt.
 > 
 > ...until I type 'ifconfig bce0' to look at the status of the interface
 > which has gone down. At which point it fails over properly!
 > 
 > This is most odd - how can simply looking at the config of an
 > interface trigger the failover ? It wont fail over otherwise either - you
 > can leave it as long as you like and lagg wont realise that the active
 > has gone down.
 > 
 > The interfaces here are 'bce' by the way, if that make a difference....
 > 

Try attached patch and check whether bce(4) correctly reports link
state changes.

After seeing 'link state changed to UP' message, unplug the cable
and see whether it reports link DOWN. The message should be printed
in a second. Also try replugging cable and you should see link UP
message within several seconds. Since auto-negotation takes more
time you may have to wait for a while.

-- 
Regards,
Pyun YongHyeon

--+QahgC5+KEYLbs62
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="brgphy.diff"

--- sys/dev/mii/brgphy.c.orig	2008-01-22 10:23:10.000000000 +0900
+++ sys/dev/mii/brgphy.c	2008-01-22 12:32:41.000000000 +0900
@@ -364,16 +364,13 @@
 			break;
 		}
 
-#if 0
-		/* Todo: Is this correct? */
 		/* Announce link loss right after it happens. */
 		if (sc->mii_ticks++ == 0)
 			break;
-#endif
 
 		/* Only retry autonegotiation every mii_anegticks seconds. */
 		if (sc->mii_ticks <= sc->mii_anegticks)
-			goto brgphy_service_exit;
+			break;
 
 
 		/* Retry autonegotiation */

--+QahgC5+KEYLbs62--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080808101831.GD38118>