From owner-freebsd-net@FreeBSD.ORG Tue Dec 16 18:46:20 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6DBD10656A3; Tue, 16 Dec 2008 18:46:20 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from pele.citylink.co.nz (pele.citylink.co.nz [202.8.44.226]) by mx1.freebsd.org (Postfix) with ESMTP id 769D38FC21; Tue, 16 Dec 2008 18:46:20 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from localhost (localhost [127.0.0.1]) by pele.citylink.co.nz (Postfix) with ESMTP id 09F6BFEF4; Wed, 17 Dec 2008 07:27:54 +1300 (NZDT) X-Virus-Scanned: Debian amavisd-new at citylink.co.nz Received: from pele.citylink.co.nz ([127.0.0.1]) by localhost (pele.citylink.co.nz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GXhLTA3u72RY; Wed, 17 Dec 2008 07:27:50 +1300 (NZDT) Received: from citylink.fud.org.nz (unknown [202.8.44.45]) by pele.citylink.co.nz (Postfix) with ESMTP; Wed, 17 Dec 2008 07:27:50 +1300 (NZDT) Received: by citylink.fud.org.nz (Postfix, from userid 1001) id A727B11479; Wed, 17 Dec 2008 07:27:49 +1300 (NZDT) Date: Tue, 16 Dec 2008 10:27:49 -0800 From: Andrew Thompson To: Harti Brandt Message-ID: <20081216182749.GE3082@citylink.fud.org.nz> References: <4947D7A9.2050407@FreeBSD.org> <20081216181850.O74416@beagle.kn.op.dlr.de> <4947EE0B.9050902@FreeBSD.org> <20081216190932.I74416@beagle.kn.op.dlr.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="SUOF0GtieIMvvwua" Content-Disposition: inline In-Reply-To: <20081216190932.I74416@beagle.kn.op.dlr.de> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: freebsd-net@freebsd.org, Sergey Matveychuk Subject: Re: bsnmpd & 64bits counters problem X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Dec 2008 18:46:20 -0000 --SUOF0GtieIMvvwua Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Dec 16, 2008 at 07:12:24PM +0100, Harti Brandt wrote: > On Tue, 16 Dec 2008, Sergey Matveychuk wrote: > SM>> > SM>> The highspeed counters are only there if this is a high-speed interface. > SM>> High speed means that the baudrate in the interface MIB (the one in the > SM>> kernel) must be larger than 20Mbaud. > SM> > SM>Well, these is lagg interfaces: > SM>lagg0: flags=8843 metric 0 mtu 9000 > SM> options=19b > SM> ether 00:30:48:67:d4:68 > SM> media: Ethernet autoselect > SM> status: active > SM> laggproto lacp > SM> laggport: em2 flags=1c > SM> laggport: em0 flags=1c > SM> > SM>There is no baudrate on them. But they are really high-speed however. > > All interfaces have a baudrate. Its in net/if.h ifi_baudrate. We had the > problem in the past with other interface types. 'virtual' interfaces must > take care to somehow propagate the rate of the underlying physical > interfaces up to the virtual one. This patch should fix it for the lacp case. What is the correct value to use for a collection of interfaces with possibly different speeds? highest/lowest? Andrew --SUOF0GtieIMvvwua Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="ieee8023ad_lacp.diff" Index: ieee8023ad_lacp.c =================================================================== --- ieee8023ad_lacp.c (revision 186188) +++ ieee8023ad_lacp.c (working copy) @@ -901,6 +901,7 @@ lacp_aggregator_bandwidth(struct lacp_aggregator * static void lacp_select_active_aggregator(struct lacp_softc *lsc) { + struct lagg_softc *sc = lsc->lsc_softc; struct lacp_aggregator *la; struct lacp_aggregator *best_la = NULL; uint64_t best_speed = 0; @@ -956,6 +957,7 @@ lacp_select_active_aggregator(struct lacp_softc *l #endif /* defined(LACP_DEBUG) */ if (lsc->lsc_active_aggregator != best_la) { + sc->sc_ifp->if_baudrate = speed; lsc->lsc_active_aggregator = best_la; lacp_update_portmap(lsc); if (best_la) { --SUOF0GtieIMvvwua--