From owner-freebsd-i386@FreeBSD.ORG Tue Feb 15 02:00:42 2005 Return-Path: Delivered-To: freebsd-i386@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DAF9416A4CE for ; Tue, 15 Feb 2005 02:00:42 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9429843D5E for ; Tue, 15 Feb 2005 02:00:42 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id j1F20gZx036680 for ; Tue, 15 Feb 2005 02:00:42 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id j1F20gtu036679; Tue, 15 Feb 2005 02:00:42 GMT (envelope-from gnats) Resent-Date: Tue, 15 Feb 2005 02:00:42 GMT Resent-Message-Id: <200502150200.j1F20gtu036679@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-i386@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Craig Leres Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D472516A4CF for ; Tue, 15 Feb 2005 01:53:26 +0000 (GMT) Received: from fun.ee.lbl.gov (fun.ee.lbl.gov [131.243.1.81]) by mx1.FreeBSD.org (Postfix) with ESMTP id A27FE43D48 for ; Tue, 15 Feb 2005 01:53:26 +0000 (GMT) (envelope-from leres@ee.lbl.gov) Received: from fun.ee.lbl.gov (localhost [127.0.0.1]) by fun.ee.lbl.gov (8.13.3/8.13.3) with ESMTP id j1F1rQtS076880 for ; Mon, 14 Feb 2005 17:53:26 -0800 (PST) Received: from fun.ee.lbl.gov (leres@localhost) by fun.ee.lbl.gov (8.13.3/8.13.3/Submit) with ESMTP id j1F1rP7F076877 for ; Mon, 14 Feb 2005 17:53:26 -0800 (PST) Message-Id: <200502150153.j1F1rP7F076877@fun.ee.lbl.gov> Date: Mon, 14 Feb 2005 17:53:25 -0800 From: Craig Leres To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: i386/77541: em driver if_oerrors book keeping error X-BeenThere: freebsd-i386@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: I386-specific issues for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Feb 2005 02:00:43 -0000 >Number: 77541 >Category: i386 >Synopsis: em driver if_oerrors book keeping error >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-i386 >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Feb 15 02:00:41 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Craig Leres >Release: FreeBSD 4.10-RELEASE i386 >Organization: Lawrence Berkeley National Laboratory >Environment: >Description: It looks like if the chip goes to sleep, em_watchdog() is invoked and if_oerrors is incremented. However, em_update_stats_counters() overwrites if_oerrors every 2 seconds with the sum of excessive and late collisions. So the output error counter for does not tally watchdog timeouts and also can be seen to decrease. >How-To-Repeat: >Fix: If it's desirable to keep track of watchdog timeouts (I believe it is) a simple fix would be to tally watch dog timeouts separately and then add them in when calculating if_oerrors in em_update_stats_counters(). An untested, partital suggested fix is appended ============================================================================== *** if_em.c.virgin Mon Feb 14 17:49:13 2005 --- if_em.c Mon Feb 14 17:52:37 2005 *************** *** 780,785 **** --- 780,786 ---- em_init(adapter); ifp->if_oerrors++; + adapter->watchdog_timeout++; return; } *************** *** 2897,2903 **** adapter->stats.mpc + adapter->stats.cexterr; /* Tx Errors */ ! ifp->if_oerrors = adapter->stats.ecol + adapter->stats.latecol; } --- 2898,2905 ---- adapter->stats.mpc + adapter->stats.cexterr; /* Tx Errors */ ! ifp->if_oerrors = adapter->watchdog_timeout + ! adapter->stats.ecol + adapter->stats.latecol; } >Release-Note: >Audit-Trail: >Unformatted: