svn commit: r232030 - head/sys/net

Andrew Thompson thompsa at FreeBSD.org
Thu Feb 23 06:26:16 UTC 2012


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);
 	}
 


More information about the svn-src-head mailing list