misc/56165: if_baudrate is not correct for rl, xl, dc and some other network interfaces

Pawel Malachowski pawmal-posting at freebsd.lublin.pl
Fri Aug 29 17:00:30 PDT 2003


>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:


More information about the freebsd-bugs mailing list