i386/77541: em driver if_oerrors book keeping error
Craig Leres
leres at ee.lbl.gov
Mon Feb 14 18:00:43 PST 2005
>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:
More information about the freebsd-i386
mailing list