From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 06:26:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD8511065670; Thu, 23 Feb 2012 06:26:16 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 992B98FC08; Thu, 23 Feb 2012 06:26:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1N6QGpM087606; Thu, 23 Feb 2012 06:26:16 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1N6QGAX087604; Thu, 23 Feb 2012 06:26:16 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201202230626.q1N6QGAX087604@svn.freebsd.org> From: Andrew Thompson Date: Thu, 23 Feb 2012 06:26:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232030 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 06:26:16 -0000 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); }