From owner-freebsd-net@FreeBSD.ORG Tue Feb 14 10:20:28 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 048EE16A420 for ; Tue, 14 Feb 2006 10:20:28 +0000 (GMT) (envelope-from opolyakov@yahoo.com) Received: from web35305.mail.mud.yahoo.com (web35305.mail.mud.yahoo.com [66.163.179.99]) by mx1.FreeBSD.org (Postfix) with SMTP id A1CB443D5C for ; Tue, 14 Feb 2006 10:20:24 +0000 (GMT) (envelope-from opolyakov@yahoo.com) Received: (qmail 97800 invoked by uid 60001); 14 Feb 2006 10:20:24 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=bEGidy+UwHqpuoFztOTxnP5h7USXnrS2Zyl1/NL5Iv9xUmU83yn6oTTefAbDpc5fx3mSg7kPBD0HjlSoSD8oVxhgZ6LgHDSI8TYO6tZZdQLSrRVKCsl4U7gyZGXbkHrLC8iwDLUBtp8QR7cuVjogFAtnG9FJ+ioID8rPI6ak6cs= ; Message-ID: <20060214102023.97798.qmail@web35305.mail.mud.yahoo.com> Received: from [69.228.89.153] by web35305.mail.mud.yahoo.com via HTTP; Tue, 14 Feb 2006 02:20:23 PST Date: Tue, 14 Feb 2006 02:20:23 -0800 (PST) From: Oleg Polyakov To: Gleb Smirnoff , Harti Brandt In-Reply-To: <20060214092456.97708.qmail@web35309.mail.mud.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: freebsd-net@FreeBSD.org, Anders Nordby , kuriyama@FreeBSD.org, demon@FreeBSD.org 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:20:28 -0000 --- Oleg Polyakov wrote: > --- Gleb Smirnoff wrote: > > > On Tue, Feb 14, 2006 at 09:39:00AM +0100, Harti Brandt wrote: > > H> AN>I changed port to 163 cause I am actually using net-snmp snmpd on > port > > H> AN>161 still. Anyway, it seems bsnmpd insists these are 10 mbps > > interfaces? > > H> AN>Why so? > > H> > > 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 :) > > Parallel, yes ;) > Here is the attached patch written just yesterday, not tested yet. It has been tested: # snmpwalk -v 1 -c pub localhost:161 | grep Speed IF-MIB::ifSpeed.1 = Gauge32: 1000000000 IF-MIB::ifSpeed.2 = Gauge32: 1000000000 IF-MIB::ifSpeed.3 = Gauge32: 0 IF-MIB::ifSpeed.4 = Gauge32: 0 IF-MIB::ifHighSpeed.1 = Gauge32: 1000 IF-MIB::ifHighSpeed.2 = Gauge32: 1000 IF-MIB::ifHighSpeed.3 = Gauge32: 0 IF-MIB::ifHighSpeed.4 = Gauge32: 0 And adapters are: # dmesg | grep bge bge0: mem 0xd0200000-0xd020ffff irq 18 at device 0.0 on pci4 miibus0: on bge0 bge0: Ethernet address: 00:30:48:82:12:44 bge1: mem 0xd0300000-0xd030ffff irq 19 at device 0.0 on pci5 miibus1: on bge1 bge1: Ethernet address: 00:30:48:82:12:45 bge0: link state changed to UP # ifconfig -l bge0 bge1 plip0 lo0 > It takes care of different bge adapters - some of them Fast Ethernets. > > > --- > Oleg > > > Andres, pls try the attached patch. > > > > -- > > Totus tuus, Glebius. > > GLEBIUS-RIPN GLEB-RIPE > > > 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; > > > _______________________________________________ > > freebsd-net@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-net > > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > --- if_bge.c.orig Tue Feb 14 00:52:58 2006 > +++ if_bge.c Tue Feb 14 00:54:42 2006 > @@ -2183,6 +2183,12 @@ > } > ifp->if_softc = sc; > if_initname(ifp, device_get_name(dev), device_get_unit(dev)); > + if ((pci_get_vendor(dev) == BCOM_VENDORID) && > + ((pci_get_device(dev) == BCOM_DEVICEID_BCM5901) || > + (pci_get_device(dev) == BCOM_DEVICEID_BCM5901A2))) { > + ifp->if_baudrate = 100000000; > + } > + else ifp->if_baudrate = 1000000000; > ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; > ifp->if_ioctl = bge_ioctl; > ifp->if_start = bge_start; > > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com