re(4) driver dropping packets when reading NFS files
Rick Macklem
rmacklem at uoguelph.ca
Fri Nov 5 01:31:32 UTC 2010
>
> If the counter was not wrapped, it seem you lost more than 10% out of
> total RX frames. This is a lot loss and there should be a way to
> mitigate it.
>
I've attached a patch (to the if_re.c in head, not your patched variant)
that works a lot better (about 5Mbytes/sec read rate). To get that, I
had to disable msi and not clear the RL_IMR register in re_intr(). I
suspect that a packet would be received between when the bits in RL_IMR
were cleared and when they were set at the end of re_int_task() and those
were getting lost.
This patch doesn't completely fix the problem. (I added your stats collecting
stuff to the if_re.c in head and attached the result, which still shows some lost packets. One
thought is clearing the bits in RL_ISR in re_intr() instead of re_int_task(),
but then I can't see a good way to pass the old value of the status reg.
through to re_int_task()?
The patch doesn't help when msi is enabled and when I played with your
patched variant, I got it to hang when RL_IMR wasn't cleared.
I've attached the patch and stats.
I might play around with it some more tomorrow, rick
ps: If you have hardware to test re with, you want to do an NFS mount
and then read a large file when nothing else is happening on the
machine, to see if you can reproduce the problem.
pss: All tests done with a kernel that does not have option DEVICE_POLLING.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: if_re.c.patch
Type: text/x-patch
Size: 618 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20101105/50cf8e42/if_re.c.bin
-------------- next part --------------
re0 statistics:
Transmit good frames : 83320
Receive good frames : 136158
Tx errors : 0
Rx errors : 0
Rx missed frames : 2666
Rx frame alignment errs : 0
Tx single collisions : 0
Tx multiple collisions : 0
Rx unicast frames : 136157
Rx broadcast frames : 0
Rx multicast frames : 1
Tx aborts : 0
Tx underruns : 0
More information about the freebsd-current
mailing list