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 ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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; } |