Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Feb 2012 06:26:16 +0000 (UTC)
From:      Andrew Thompson <thompsa@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r232030 - head/sys/net
Message-ID:  <201202230626.q1N6QGAX087604@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: thompsa
Date: Thu Feb 23 06:26:16 2012
New Revision: 232030
URL: http://svn.freebsd.org/changeset/base/232030

Log:
  Now that network interfaces advertise if they support linkstate notifications
  we do not need to perform a media ioctl every 15 seconds.

Modified:
  head/sys/net/bridgestp.c

Modified: head/sys/net/bridgestp.c
==============================================================================
--- head/sys/net/bridgestp.c	Thu Feb 23 06:13:12 2012	(r232029)
+++ head/sys/net/bridgestp.c	Thu Feb 23 06:26:16 2012	(r232030)
@@ -1861,10 +1861,12 @@ bstp_tick(void *arg)
 
 	CURVNET_SET(bs->bs_vnet);
 
-	/* slow timer to catch missed link events */
+	/* poll link events on interfaces that do not support linkstate */
 	if (bstp_timer_expired(&bs->bs_link_timer)) {
-		LIST_FOREACH(bp, &bs->bs_bplist, bp_next)
-			bstp_ifupdstatus(bs, bp);
+		LIST_FOREACH(bp, &bs->bs_bplist, bp_next) {
+			if (!(bp->bp_ifp->if_capabilities & IFCAP_LINKSTATE))
+				bstp_ifupdstatus(bs, bp);
+		}
 		bstp_timer_start(&bs->bs_link_timer, BSTP_LINK_TIMER);
 	}
 



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