> On Thu, Nov 04, 2010 at 09:31:30PM -0400, Rick Macklem wrote:
I agree. I think all it did was create more interrupts so that re_rxeof()
got called more frequently. (see below)
Nope, it didn't make any difference.
I've added a counter of how many times re_rxeof() gets called, but then
returns without handling any received packets (I think because
RL_RDESC_STAT_OWN is set on the first entry it looks at in the rcv. ring.)
This count comes out as almost the same as the # of missed frames (see
"rxe did 0:" in the attached stats).
So, I think what is happenning about 10% of the time is that re_rxeof()
is looking at the ring descriptor before it has been "updated" and then
returns without handling the packet and then it doesn't get called again
because the RL_ISR bit has been cleared.
When "options DEVICE_POLLING" is specified, it works ok, because it calls
re_rxeof() fairly frequently and it doesn't pay any attention to the RL_ISR
bits.
Now, I don't know if this is a hardware flaw on this machine or something
that can be fixed in software? I know diddly about the current driver
setup, but I assume something like this has to happen?
- chip (or PCIe handler) forces the DMA of the descriptor change to RAM
- then posts the interrupt
- and the driver must read the up to date descriptor from RAM
--> I notice that "volatile" isn't used anywhere in the driver. Wouldn't
the descriptor ring memory have to be defined "volatile" somehow?
(I don't know how to do this correctly?)
So, if you can think of anything that will ensure that re_rxeof() reads
"up to date" descriptor ring entries, please let me know.
Otherwise, I can live with "options DEVICE_POLLING".
Thanks for your help, rick