netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bruce Cole <bacole@gmail.com>
To: gundy@iinet.net.au
Cc: netdev@vger.kernel.org, bacole@gmail.com
Subject: Re: Realtek r8168 slow outbound transfer - potential fix/workaround
Date: Tue, 14 Aug 2007 22:46:52 -0700	[thread overview]
Message-ID: <46C2934C.9060907@gmail.com> (raw)
In-Reply-To: <25536.1187071305@iinet.net.au>

gundy@iinet.net.au wrote:
> Bruce,
>
> I settled on using ndelay(10) rather than udelay(25) in the end..  
> it's probably a bit safer & less likely to cause problems with higher 
> throughputs.
Yes, I saw that you later recommended the change but opted to try it the 
way you tested first. 
>
> When I was diagnosing the problem I used 2 machines.  One machine was 
> running Samba on linux (the 'problem' machine), and one was a windows 
> XP machine.
Likewise, tho I also tested vista.
>
> I used tcpdump to capture the traffic on the Samba machine, and used 
> wireshark to capture the traffic on the windows machine.  What i found 
> was happening was that samba was attempting to send two packets to the 
> windows machine in quick succession (ie. something in the order of a 
> 1/10,000th or less of a second apart).  Although both packets showed 
> up in the tcpdump output from the linux machine, only the first packet 
> appeared to be making it to the windows machine.   Because the second 
> packet was 'lost', it had to be retried after a delay and this is what 
> was causing the abysmal performance.
>
> The reasoning behind my patch was that I figured the TxPoll register 
> wasn't being given enough time to reset itself after sending the 
> previous packet.   I may or may not have been correct with that 
> assumption, but as you noticed the delay does seem to make it behave a 
> bit better.
Disclaimer: I haven't seen the definition for that register so I'm just 
guessing here.
I suppose the danger is that your fix may just be changing the timing 
around such that the time-dependent bug does not occur as readily, yet a 
bug remains.  Does anyone have the programming spec for this chip from 
realtek, or are we all just forced to guess :)?
>
> I understand that Francios came up with a similar patch that he said 
> also worked, and that he thought was a bit more robust than my 
> method.  I'd check with him on what the status of that particular 
> patch is.
Thanks, I don't see that patch in 2.6.23-rc3 but I'll try Francios' 
recommendations first and if that doesn't work I'll test out things with 
the shorter ndelay().


       reply	other threads:[~2007-08-15  5:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <25536.1187071305@iinet.net.au>
2007-08-15  5:46 ` Bruce Cole [this message]
2007-08-13 18:53 Realtek r8168 slow outbound transfer - potential fix/workaround Bruce Cole
2007-08-14 21:19 ` Francois Romieu
2007-08-15  7:17   ` Bruce Cole
  -- strict thread matches above, loose matches on Subject: below --
2007-06-13 14:46 David Gundersen
2007-06-13 23:11 ` Francois Romieu
2007-06-14 14:57   ` David Gundersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46C2934C.9060907@gmail.com \
    --to=bacole@gmail.com \
    --cc=gundy@iinet.net.au \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).