From owner-freebsd-bugs@FreeBSD.ORG Fri Aug 29 17:00:30 2003 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B0B3716A4D6 for ; Fri, 29 Aug 2003 17:00:30 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3947B43FF2 for ; Fri, 29 Aug 2003 17:00:29 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h7U00TUp081626 for ; Fri, 29 Aug 2003 17:00:29 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h7U00Tr0081625; Fri, 29 Aug 2003 17:00:29 -0700 (PDT) Resent-Date: Fri, 29 Aug 2003 17:00:29 -0700 (PDT) Resent-Message-Id: <200308300000.h7U00Tr0081625@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Pawel Malachowski Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 02E8316A4BF for ; Fri, 29 Aug 2003 16:53:46 -0700 (PDT) Received: from shellma.zin.lublin.pl (shellma.zin.lublin.pl [212.182.126.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id E906B43FDD for ; Fri, 29 Aug 2003 16:53:44 -0700 (PDT) (envelope-from pm@zin.lublin.pl) Received: by shellma.zin.lublin.pl (Postfix, from userid 1018) id C71045F103; Sat, 30 Aug 2003 02:01:46 +0200 (CEST) Message-Id: <20030830000146.C71045F103@shellma.zin.lublin.pl> Date: Sat, 30 Aug 2003 02:01:46 +0200 (CEST) From: Pawel Malachowski To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: misc/56165: if_baudrate is not correct for rl, xl, dc and some other network interfaces X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Pawel Malachowski List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Aug 2003 00:00:30 -0000 >Number: 56165 >Category: misc >Synopsis: if_baudrate is not correct for rl, xl, dc and some other network interfaces >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Aug 29 17:00:28 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Paweł Małachowski >Release: FreeBSD 4.7-RELEASE-p13 i386 >Organization: ZiN >Environment: FreeBSD 4.9-PRERELASE >Description: if_baudrate is set to 10000000 (10M) for some 100Mbit network interfaces. This inconsistency will for example result in not valid ifSpeed value in snmpd, causing not valid MaxBytes and malformed MRTG graphs: # snmpwalk -c zzz xxx interfaces.ifTable.ifEntry.ifDescr.3 interfaces.ifTable.ifEntry.ifDescr.3 = xl0 # snmpwalk -c zzz xxx interfaces.ifTable.ifEntry.ifSpeed.3 interfaces.ifTable.ifEntry.ifSpeed.3 = Gauge32: 10000000 # ifconfig xl0 | grep media media: Ethernet autoselect (100baseTX ) This problem was previously noted by me at freebsd-questions: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=2401273+0+archive/2002/freebsd-questions/20021117.freebsd-questions It looks that, for example, latest rl(4) supporting 1GigE NICs still sets 10M baudrate for them. I can see this with my rl, dc and xl network devices, seems others (like sis, ste, vr, wb) are affected, too. >How-To-Repeat: cd /usr/src/sys/pci && grep -H 'baudrate =' *.c | awk '{printf "%s\t%s\n", $1,$4}' cd /usr/src/sys/dev && grep -HR 'baudrate = ' * | awk '{printf "%s\t%s\n", $1,$4}' >Fix: Set if_baudrate=10M for 10Mbit devices, 100M for 100Mbit devices and 1000M for 1GigE devices. Take a look at /usr/src/sys/dev/my/if_my.c to see, how this could be done. ;) Workaround for snmpd purposes: override interfaces.ifTable.ifEntry.ifSpeed.3 gauge "100000000" >Release-Note: >Audit-Trail: >Unformatted: