Date: Fri, 15 Nov 1996 14:30:01 +0900 (JST) From: seki@sysrap.cs.fujitsu.co.jp To: FreeBSD-gnats-submit@freebsd.org Cc: seki@sysrap.cs.fujitsu.co.jp Subject: i386/2011: Wrong stats (SNMP Dot3 MIBs) in ed driver Message-ID: <199611150530.OAA00358@fuzz.sysrap.cs.fujitsu.co.jp> Resent-Message-ID: <199611150540.VAA16301@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 2011 >Category: i386 >Synopsis: Ed driver puts wrong value in some of its SNMP Dot3 MIBs. >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Nov 14 21:40:01 PST 1996 >Last-Modified: >Originator: Masahiro Sekiguchi >Organization: Fujitsu Limited >Release: FreeBSD 2.2-ALPHA i386 >Environment: 2.2 ALPHA with any of ed compatible Ethernet cards. >Description: Ed driver counts some collision-related events in SNMP Dot3 MIBs wrong way. RFC 1650 specifies that dot3StatsDeferredTRansmissions, dot3StatsSingleCollisionFrames, dot3StatsMultipleCollisionFrames, and dot3StatsExcessiveCollisions are exclusive; i.e., a frame may cause one of the above MIBs be incremented, but cannot cause two or more of the above. Ed driver in 2.2 ALPHA, however, increments two or more for a frame. It conflicts with RFC 1650. For example, the definition of dot3StatsDeferredTransmissions in RFC 1650 says: "The count represented by an instance of this object does not include frames involved in collisions." However, Ed in 2.2 ALPHA increments both DeferredTransmissions and SimgleCollisionsFrames for one single-collided frame. One more related note. RFC 1650 also says that error conditions are also exclusive. Currently, ed driver tests for some bits in a hardware register, and update error-related MIBs independently. *If* two or more error bits in the register can be set for a frame, it causes another wrong stat. I'm not sure it can be happen, or never happen due to the hardware specification. >How-To-Repeat: Transmit an Ethernet frame through an ed compatible card, and make it collide. >Fix: The following is a suggested patch to sys/i386/isa/if_ed.c. This patch fixes bugs on collision-related stats. Handling of error related MIBs are not touched. --- cut here --- --- if_ed.c.orig Thu Oct 17 22:42:13 1996 +++ if_ed.c Fri Nov 15 13:58:29 1996 @@ -2410,7 +2410,6 @@ * TSR_ABT is set. */ collisions = 16; - sc->mibdata.dot3StatsMultipleCollisionFrames++; sc->mibdata.dot3StatsExcessiveCollisions++; sc->mibdata.dot3StatsCollFrequencies[15]++; } @@ -2458,12 +2457,10 @@ break; case 1: sc->mibdata.dot3StatsSingleCollisionFrames++; - sc->mibdata.dot3StatsDeferredTransmissions++; sc->mibdata.dot3StatsCollFrequencies[0]++; break; default: sc->mibdata.dot3StatsMultipleCollisionFrames++; - sc->mibdata.dot3StatsDeferredTransmissions++; sc->mibdata. dot3StatsCollFrequencies[collisions-1] ++; MIBs >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199611150530.OAA00358>