From owner-freebsd-bugs Thu Nov 14 21:40:03 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id VAA16316 for bugs-outgoing; Thu, 14 Nov 1996 21:40:03 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id VAA16301; Thu, 14 Nov 1996 21:40:02 -0800 (PST) Resent-Date: Thu, 14 Nov 1996 21:40:02 -0800 (PST) Resent-Message-Id: <199611150540.VAA16301@freefall.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, seki@sysrap.cs.fujitsu.co.jp Received: from fgwmail.fujitsu.co.jp (fgwmail.fujitsu.co.jp [164.71.1.133]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id VAA16005 for ; Thu, 14 Nov 1996 21:34:13 -0800 (PST) Received: from fdmmail.fujitsu.co.jp by fgwmail.fujitsu.co.jp (8.7.6+2.6Wbeta7/3.3W5-MX961019-Fujitsu Mail Gateway) id OAA08205; Fri, 15 Nov 1996 14:34:11 +0900 (JST) Received: from fuzz.sysrap.cs.fujitsu.co.jp by fdmmail.fujitsu.co.jp (8.6.12+2.5Wb4/3.3W9-MX961111-Fujitsu Domain Mail Master) id OAA16177; Fri, 15 Nov 1996 14:33:39 +0900 Received: (from root@localhost) by fuzz.sysrap.cs.fujitsu.co.jp (8.8.2/8.8.2) id OAA00358; Fri, 15 Nov 1996 14:30:01 +0900 (JST) Message-Id: <199611150530.OAA00358@fuzz.sysrap.cs.fujitsu.co.jp> Date: Fri, 15 Nov 1996 14:30:01 +0900 (JST) From: seki@sysrap.cs.fujitsu.co.jp Reply-To: seki@sysrap.cs.fujitsu.co.jp To: FreeBSD-gnats-submit@freebsd.org Cc: seki@sysrap.cs.fujitsu.co.jp X-Send-Pr-Version: 3.2 Subject: i386/2011: Wrong stats (SNMP Dot3 MIBs) in ed driver Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >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: