Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Aug 2003 02:01:46 +0200 (CEST)
From:      Pawel Malachowski <pawmal-posting@freebsd.lublin.pl>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   misc/56165: if_baudrate is not correct for rl, xl, dc and some other network interfaces
Message-ID:  <20030830000146.C71045F103@shellma.zin.lublin.pl>
Resent-Message-ID: <200308300000.h7U00Tr0081625@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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 <full-duplex>)

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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030830000146.C71045F103>