em network issues
wpaul at FreeBSD.ORG
Fri Oct 20 23:46:36 UTC 2006
> > Another thing that might be handy is improving the watchdog timeout
> > message so that it dumps the state of the ICR and ICM registers (and
> > maybe some other interesting driver and/or device state). The timeout
> > implies no interrupts were delivered for a Long Time (tm). If the
> > ICM register indicates interrupts have been masked, then that means
> > em_intr_fast() was triggered by and interrupt and it scheduled work,
> > but that work never executed. If that really is what happened, then
> > I can understand the watchdog error occuring. If that's _not_ what
> > happened, them something else is screwed up.
> Jesse Brandeburg just did an interesting hack for the Linux driver, I
> was considering trying to code an equivalent thing up for us. We
> have evidence that on some AMD based systems there are writebacks
> that get lost, since the TX cleanup relies on the DD being set you
> are hosed when this happens. What he did was make a cleanup
> routine that ONLY uses the head and tail pointers and NOT the done
> bit. Then, in the watchdog routine, if there is evidence of this problem
> it will switch the cleanup function pointer to this alternate clean code.
Oho, I didn't realize the 8254x had producer/consumer indexes like this.
Hm. But the documentation for the Transmit Descriptor Head register
"Reading the transmit descriptor head to determine which buffers
have been used (and can be returned to the memory pool) is not reliable."
There's a similar notation for the Receive Descriptor Head register.
I wonder what's unreliable about it.
> At least one user that was having a problem has reported this solved
> it. It may be one of the issues hitting us as well.
Switching from testing the descriptor completion bits to using the
consumer indexes should be pretty straightforward. It's worth a shot
at any rate.
-Bill Paul (510) 749-2329 | Senior Engineer, Master of Unix-Fu
wpaul at windriver.com | Wind River Systems
<adamw> you're just BEGGING to face the moose
More information about the freebsd-stable