Date: Fri, 31 Jan 2003 23:08:27 +0000 (UTC) From: Paul Vixie <paul@vix.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: kern/47773: "em" network device does not update packet counters smoothly Message-ID: <20030131230827.23D39125426@piquet.isc.org>
next in thread | raw e-mail | index | archive | help
>Number: 47773 >Category: kern >Synopsis: "em" network device does not update packet counters smoothly >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Jan 31 15:10:16 PST 2003 >Closed-Date: >Last-Modified: >Originator: Paul Vixie >Release: FreeBSD 5.0-RELEASE i386 >Organization: ISC >Environment: System: FreeBSD piquet.isc.org 5.0-RELEASE FreeBSD 5.0-RELEASE #0: Fri Jan 17 07:53:27 UTC 2003 root@piquet.isc.org:/usr/src/sys/i386/compile/ISC_FBSD_5_SMP i386 >Description: "em" network device packet counters only update every other second >How-To-Repeat: # netstat 1 input (Total) output packets errs bytes packets errs bytes colls 0 0 49411 0 0 99551 0 1113 0 47959 1159 0 90625 0 0 0 43280 0 0 85302 0 971 0 46905 1008 0 92500 0 2 0 47095 2 0 92107 0 1070 0 47132 1123 0 91538 0 0 0 47209 0 0 89947 0 1088 0 49646 1138 0 96308 0 ^C >Fix: --- sys/dev/em/if_em.h.orig Fri Jan 31 22:31:33 2003 +++ sys/dev/em/if_em.h Fri Jan 31 22:33:58 2003 @@ -192,6 +192,13 @@ */ #define WAIT_FOR_AUTO_NEG_DEFAULT 1 +/* + * This parameter controls the time between calls to the local + * maintainance function, which among other things fetches counters + * from the device and updates the interface statistics. + * measured in ticks + */ +#define MAINT_TIMER_INTERVAL (hz) /* Tunables -- End */ --- sys/dev/em/if_em.c.orig Fri Jan 31 22:19:18 2003 +++ sys/dev/em/if_em.c Fri Jan 31 22:33:58 2003 @@ -680,7 +680,7 @@ ifp->if_hwassist = 0; } - adapter->timer_handle = timeout(em_local_timer, adapter, 2*hz); + adapter->timer_handle = timeout(em_local_timer, adapter, MAINT_TIMER_INTERVAL); em_clear_hw_cntrs(&adapter->hw); #ifdef DEVICE_POLLING /* @@ -719,7 +719,7 @@ em_check_for_link(&adapter->hw); em_print_link_status(adapter); adapter->timer_handle = timeout(em_local_timer, - adapter, 2*hz); + adapter, MAINT_TIMER_INTERVAL); } } if (ifp->if_flags & IFF_RUNNING) { @@ -770,7 +770,7 @@ em_check_for_link(&adapter->hw); em_print_link_status(adapter); adapter->timer_handle = - timeout(em_local_timer, adapter, 2*hz); + timeout(em_local_timer, adapter, MAINT_TIMER_INTERVAL); } if (ifp->if_flags & IFF_RUNNING) { @@ -1160,7 +1160,8 @@ if (em_display_debug_stats && ifp->if_flags & IFF_RUNNING) { em_print_hw_stats(adapter); } - adapter->timer_handle = timeout(em_local_timer, adapter, 2*hz); + adapter->timer_handle = timeout(em_local_timer, adapter, + MAINT_TIMER_INTERVAL); splx(s); return; >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030131230827.23D39125426>