From owner-freebsd-net@FreeBSD.ORG Tue Feb 14 10:37:25 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D5DA916A420; Tue, 14 Feb 2006 10:37:25 +0000 (GMT) (envelope-from anders@FreeBSD.org) Received: from totem.fix.no (totem.fix.no [80.91.36.20]) by mx1.FreeBSD.org (Postfix) with ESMTP id 662B043D45; Tue, 14 Feb 2006 10:37:25 +0000 (GMT) (envelope-from anders@FreeBSD.org) Received: by totem.fix.no (Postfix, from userid 1000) id 72E5C8DB14A; Tue, 14 Feb 2006 11:37:23 +0100 (CET) Date: Tue, 14 Feb 2006 11:37:23 +0100 From: Anders Nordby To: Gleb Smirnoff , Harti Brandt , freebsd-net@freebsd.org Message-ID: <20060214103723.GA45138@totem.fix.no> References: <20060206092443.GA61116@totem.fix.no> <20060207141131.GU877@FreeBSD.org> <20060213173008.GA14643@totem.fix.no> <20060214090531.X5083@beagle.kn.op.dlr.de> <20060214083010.GB41864@totem.fix.no> <20060214093513.F5083@beagle.kn.op.dlr.de> <20060214084459.GL86448@cell.sick.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060214084459.GL86448@cell.sick.ru> X-PGP-Key: http://anders.fix.no/pgp/ X-PGP-Key-FingerPrint: 1E0F C53C D8DF 6A8F EAAD 19C5 D12A BC9F 0083 5956 User-Agent: Mutt/1.5.11 Cc: Subject: Re: 64-bit SNMP counters for FreeBSD && graphing bandwidth usage 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, 14 Feb 2006 10:37:26 -0000 Hi, On Tue, Feb 14, 2006 at 11:44:59AM +0300, Gleb Smirnoff wrote: > H> The driver reports a speed of 10Mbits/sec. ifHighSpeed is ifi_baudrate > H> divided by 10^6 (and rounded). This is the default set by ether_ifattach() > H> if the driver did not set another value. It seems that bge never sets that > H> value so you end up with the default. This looks like a bug. > > Harti, we are thinking in parallel :) > > Andres, pls try the attached patch. > > Index: if_bge.c > =================================================================== > RCS file: /home/ncvs/src/sys/dev/bge/if_bge.c,v > retrieving revision 1.118 > diff -u -r1.118 if_bge.c > --- if_bge.c 30 Jan 2006 13:45:55 -0000 1.118 > +++ if_bge.c 14 Feb 2006 08:43:24 -0000 > @@ -2192,6 +2192,7 @@ > ifp->if_snd.ifq_drv_maxlen = BGE_TX_RING_CNT - 1; > IFQ_SET_MAXLEN(&ifp->if_snd, ifp->if_snd.ifq_drv_maxlen); > IFQ_SET_READY(&ifp->if_snd); > + ifp->if_baudrate = IF_Gbps(1); > ifp->if_hwassist = BGE_CSUM_FEATURES; > ifp->if_capabilities = IFCAP_HWCSUM | IFCAP_VLAN_HWTAGGING | > IFCAP_VLAN_MTU | IFCAP_VLAN_HWCSUM; The patches gives me ifHighSpeed = 1000 on bge interfaces, also where the interface is forced to 100baseTX. In any case I get ifHCOutOctets and ifHCInOctets, which was what I was originally looking for. Making bsnmpd report actual speed seems sensible, yes. I should make a list of "what bsnmpd needs" to be more usable, in case Harti is interested. ;-P Mvh, -- Anders.