Unix Technical Forum

em(4) watchdog bug

This is a discussion on em(4) watchdog bug within the mailing.openbsd.tech forums, part of the OpenBSD category; --> re the timer is only reset if number of empty tx buffers grows to /8 of the total which ...


Go Back   Unix Technical Forum > Unix Operating Systems > OpenBSD > mailing.openbsd.tech

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-18-2008, 09:34 AM
mickey
 
Posts: n/a
Default em(4) watchdog bug

re
the timer is only reset if number of empty tx buffers
grows to /8 of the total which may lead to false
watchdog timeouts (due to link renegotiations and stuff)
and tx ring resets worsening the situtation even more.
thus move the timer setting outside of the flow control
if() that has nothing to do w/ the timeout.
cu

--
paranoic mickey (my employers have changed but, the name has remained)

Index: if_em.c
================================================== =================
RCS file: /cvs/src/sys/dev/pci/if_em.c,v
retrieving revision 1.174
diff -u -r1.174 if_em.c
--- if_em.c 21 Oct 2007 03:49:54 -0000 1.174
+++ if_em.c 27 Nov 2007 12:57:59 -0000
@@ -2196,15 +2196,15 @@
* If there are no pending descriptors, clear the timeout. Otherwise,
* if some descriptors have been freed, restart the timeout.
*/
- if (num_avail > EM_TX_CLEANUP_THRESHOLD) {
+ if (num_avail > EM_TX_CLEANUP_THRESHOLD)
ifp->if_flags &= ~IFF_OACTIVE;
- /* All clean, turn off the timer */
- if (num_avail == sc->num_tx_desc)
- ifp->if_timer = 0;
- /* Some cleaned, reset the timer */
- else if (num_avail != sc->num_tx_desc_avail)
- ifp->if_timer = EM_TX_TIMEOUT;
- }
+
+ /* All clean, turn off the timer */
+ if (num_avail == sc->num_tx_desc)
+ ifp->if_timer = 0;
+ /* Some cleaned, reset the timer */
+ else if (num_avail != sc->num_tx_desc_avail)
+ ifp->if_timer = EM_TX_TIMEOUT;
sc->num_tx_desc_avail = num_avail;
}

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 03:50 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com