Subject: Re: r8169 tx problem (1s pause with ping)

From: David Gundersen <[email-masked]>
Date: Fri, 15 Jun 2007 01:33:14 +1000

Francois Romieu wrote:
> Benjamin LaHaise <[email-masked]> :
> [...]
>> I'm seeing something odd with r8169 on FC7: doing a ping -s 1600 alternates 
>> between a 1s latency and sub 1ms.  Has anyone else seen anything like this?  
>> The system in question is an Asus M2A-VM with an onboard RTL8111 (I think).  
>> NAPI doesn't seem to make a difference.  The kernel in question is currently 
>> a vanilla 2.6.21.5.  Sub-mtu sized packets behave normally.
> 
> Same thing here for my 8168 rev 01 (asrock 945G dvi LOM) with 2.6.22-rc4
> and 2.6.22-rc3 + r816x patchkit.
> 
> Wonderful.
> 

I've got a modified version of the latest realtek (r8168) driver running 
here that doesn't seem to exhibit those symptoms.

The trouble I have is that I've been playing with multiple sections of 
the code and I'm not 100% sure what part(s) might impact that particular 
test.  The bits I know I've messed with are the bits that set the 
First/Last fragment flags and the NPQ flagging section (as described in 
my previous emails).

I know it's not particularly scientific of me to be changing multiple 
sections of the driver at once and I'm sorry about that but it's fairly 
late here and I really should get some sleep :).  I might do some more 
thorough testing on the weekend to find out what the minimal changes 
required are to get things working.

In the mean-time I'll attach my patch for the r8168-8.001.00 realtek 
driver here in case anybody else wants to have a play with it and see if 
it helps them out.

Also, It might be a silly question, but have you tried taking packet 
captures from the perspective of the box with the realtek chipset & 
another box during the pinging and comparing the two?

Regards,
Dave.