Bug 10180 - Realtek RTL8169 reports TOO MUCH dropped packets
Summary: Realtek RTL8169 reports TOO MUCH dropped packets
Status: RESOLVED PATCH_ALREADY_AVAILABLE
Alias: None
Product: Drivers
Classification: Unclassified
Component: Network (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Francois Romieu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-06 05:39 UTC by Hermann Gausterer
Modified: 2008-09-08 23:16 UTC (History)
0 users

See Also:
Kernel Version: 2.6.25-rc4, 2.6.24-rc5
Tree: Mainline
Regression: ---


Attachments
lspci -vvx (22.01 KB, text/plain)
2008-03-06 13:28 UTC, Hermann Gausterer
Details
dmesg (30.54 KB, text/plain)
2008-03-06 13:30 UTC, Hermann Gausterer
Details
multicast register update for the 8168 (964 bytes, text/plain)
2008-03-06 14:37 UTC, Francois Romieu
Details
Experimental 8168 update (13.95 KB, text/plain)
2008-03-06 14:39 UTC, Francois Romieu
Details
dmesg of patch 1 (39.35 KB, text/plain)
2008-03-07 11:28 UTC, Hermann Gausterer
Details
dmesg of patch 2 (38.94 KB, text/plain)
2008-03-07 11:29 UTC, Hermann Gausterer
Details
r8169: the RxMissed register exists in the 8169 only (2.03 KB, text/plain)
2008-08-20 14:53 UTC, Francois Romieu
Details
r8169: the RxMissed register exists in the 8169 only (1.71 KB, text/plain)
2008-08-26 12:38 UTC, Francois Romieu
Details
r8169: the RxMissed register exists in the 8169 only (2.33 KB, text/plain)
2008-09-03 15:24 UTC, Francois Romieu
Details

Description Hermann Gausterer 2008-03-06 05:39:47 UTC
Latest working kernel version: none
Earliest failing kernel version:
Distribution: Ubuntu 7.10
Hardware Environment: Asus P5GC, Core2 Duo
Software Environment: X86_64 Kernel
Problem Description: ifconfig shows too much dropped packets

Steps to reproduce: right after boot, the dropped packet counter
ist massivly increased:

with 2.6.25-rc4 and 2.6.24-rc5, the problem is the same;
with the default ubuntu kernel (vmlinuz-2.6.22-14-generic)
the nic is detected, but does not work (no RX/TX)

# uptime
 14:12:13 up 23:25,  4 users,  load average: 0.14, 0.24, 0.33
# while true; do /sbin/ifconfig eth0 | grep RX.*dropped ; sleep 1 ; done
          RX packets:6667843 errors:0 dropped:113020203883 overruns:0 frame:0
          RX packets:6667844 errors:0 dropped:113145883642 overruns:0 frame:0
          RX packets:6667845 errors:0 dropped:113271517406 overruns:0 frame:0
          RX packets:6667846 errors:0 dropped:113397200724 overruns:0 frame:0
          RX packets:6667847 errors:0 dropped:113523018402 overruns:0 frame:0
          RX packets:6667848 errors:0 dropped:113648603117 overruns:0 frame:0
          RX packets:6667850 errors:0 dropped:113774273261 overruns:0 frame:0
          RX packets:6667851 errors:0 dropped:113899922960 overruns:0 frame:0
          RX packets:6667852 errors:0 dropped:114025581357 overruns:0 frame:0
          RX packets:6667853 errors:0 dropped:114151376056 overruns:0 frame:0
          RX packets:6667854 errors:0 dropped:114276953881 overruns:0 frame:0
          RX packets:6667857 errors:0 dropped:114402708150 overruns:0 frame:0

but it is working as expected!

# lspci -vvvn -s 02:00.0
02:00.0 0200: 10ec:8168 (rev 02)
        Subsystem: 1043:82c6
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR-
        Latency: 0, Cache Line Size: 32 bytes
        Interrupt: pin A routed to IRQ 16
        Region 0: I/O ports at d800 [size=256]
        Region 2: Memory at deeff000 (64-bit, non-prefetchable) [size=4K]
        Region 4: Memory at dfff0000 (64-bit, prefetchable) [size=64K]
        Expansion ROM at deec0000 [disabled] [size=128K]
        Capabilities: [40] Power Management version 3
                Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA PME(D0+,D1+,D2+,D3hot+,D3cold+)
                Status: D0 PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [50] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable-
                Address: 0000000000000000  Data: 0000
        Capabilities: [70] Express Endpoint IRQ 1
                Device: Supported: MaxPayload 256 bytes, PhantFunc 0, ExtTag-
                Device: Latency L0s <512ns, L1 <8us
                Device: AtnBtn- AtnInd- PwrInd-
                Device: Errors: Correctable- Non-Fatal- Fatal- Unsupported-
                Device: RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop-
                Device: MaxPayload 128 bytes, MaxReadReq 512 bytes
                Link: Supported Speed 2.5Gb/s, Width x1, ASPM L0s L1, Port 0
                Link: Latency L0s <512ns, L1 <64us
                Link: ASPM Disabled RCB 64 bytes CommClk+ ExtSynch-
                Link: Speed 2.5Gb/s, Width x1
        Capabilities: [b0] MSI-X: Enable- Mask- TabSize=2
                Vector table: BAR=4 offset=00000000
                PBA: BAR=4 offset=00000800
        Capabilities: [d0] Vital Product Data

please request any additional information!
Comment 1 Francois Romieu 2008-03-06 11:56:21 UTC
Can you send a complete dmesg and lspci -vvx please ?

-- 
Ueimor
Comment 2 Hermann Gausterer 2008-03-06 13:28:47 UTC
Created attachment 15165 [details]
lspci -vvx
Comment 3 Hermann Gausterer 2008-03-06 13:30:08 UTC
Created attachment 15166 [details]
dmesg

this is the output of dmesg right after boot;
but it looks truncated; /var/log/syslog looks the same
Comment 4 Francois Romieu 2008-03-06 14:37:12 UTC
Created attachment 15169 [details]
multicast register update for the 8168

Can you give the patch above a try ?

Please increase your kernel log buffer (CONFIG_LOG_BUF_SHIFT).

-- 
Ueimor
Comment 5 Francois Romieu 2008-03-06 14:39:06 UTC
Created attachment 15170 [details]
Experimental 8168 update

If the previous patch makes no difference, you can try
this one. Be warned that it is still very experimental.

-- 
Ueimor
Comment 6 Hermann Gausterer 2008-03-07 11:24:18 UTC
I've tried both patches, the are not working

with the second one, the counter is even incrementing
with unbelievable speed! (again with 1 second interval)

RX packets:0 errors:0 dropped:227633266635 overruns:0 frame:0
RX packets:0 errors:0 dropped:231928233930 overruns:0 frame:0
RX packets:0 errors:0 dropped:236223201225 overruns:0 frame:0
RX packets:0 errors:0 dropped:240518168520 overruns:0 frame:0
RX packets:0 errors:0 dropped:244813135815 overruns:0 frame:0
RX packets:0 errors:0 dropped:249108103110 overruns:0 frame:0
RX packets:0 errors:0 dropped:253403070405 overruns:0 frame:0
RX packets:0 errors:0 dropped:257698037700 overruns:0 frame:0
RX packets:0 errors:0 dropped:261993004995 overruns:0 frame:0
RX packets:0 errors:0 dropped:266287972290 overruns:0 frame:0
RX packets:0 errors:0 dropped:270582939585 overruns:0 frame:0

and there are NETDEV WATCHDOG errors

dmesg of both patches attached
Comment 7 Hermann Gausterer 2008-03-07 11:28:07 UTC
Created attachment 15174 [details]
dmesg of patch 1
Comment 8 Hermann Gausterer 2008-03-07 11:29:26 UTC
Created attachment 15175 [details]
dmesg of patch 2

NETDEV WATCHDOG errors
Comment 9 Hermann Gausterer 2008-05-06 09:09:57 UTC
i tested now the new 2.6.26-rc1-00050-gf74d505 kernel.
the network is not working anymore:

# ifconfig eth0 | grep dropped
          RX packets:0 errors:0 dropped:270582939585 overruns:0 frame:0
          TX packets:0 errors:0 dropped:2346 overruns:0 carrier:0

after this, i switched back to 2.6.25-03410-g8075014, which shows the
original buggy behavior:

# ifconfig eth0 | grep dropped
          RX packets:146938 errors:0 dropped:15864611687 overruns:0 frame:0
          TX packets:121581 errors:0 dropped:0 overruns:0 carrier:0
Comment 10 Francois Romieu 2008-08-20 14:53:03 UTC
Created attachment 17345 [details]
r8169: the RxMissed register exists in the 8169 only

Hermann, can you try the attached patch against 2.6.27-rc ?

Thanks in advance.

-- 
Ueimor
Comment 11 Hermann Gausterer 2008-08-23 14:57:27 UTC
> Hermann, can you try the attached patch against 2.6.27-rc ?

yes, will try it in the next days and report the result :-)
Comment 12 Hermann Gausterer 2008-08-25 12:20:39 UTC
hi

tried the patch with latest git kernel (83097aca8567a0bd593534853b71fe0fa9a75d69)
and could not apply the patch:

patch --dry-run -p 1 < patch-r8169.patch
patching file drivers/net/r8169.c
Hunk #1 succeeded at 186 (offset -9 lines).
Hunk #2 FAILED at 209.
Hunk #3 succeeded at 2143 (offset -143 lines).
Hunk #4 FAILED at 2267.
Hunk #5 succeeded at 2918 (offset -269 lines).
Hunk #6 succeeded at 2941 (offset -269 lines).
Hunk #7 succeeded at 3063 (offset -269 lines).
Hunk #8 succeeded at 3088 (offset -269 lines).
2 out of 8 hunks FAILED -- saving rejects to file drivers/net/r8169.c.rej

with the versions below, it is the same:
v2.6.27-rc4
v2.6.27-rc3
v2.6.27-rc2
v2.6.27-rc1
v2.6.26
Comment 13 Francois Romieu 2008-08-26 12:38:13 UTC
Created attachment 17466 [details]
r8169: the RxMissed register exists in the 8169 only
Comment 14 Francois Romieu 2008-09-03 15:24:23 UTC
Created attachment 17604 [details]
r8169: the RxMissed register exists in the 8169 only
Comment 15 Hermann Gausterer 2008-09-07 15:27:06 UTC
(In reply to comment #14)
> Created an attachment (id=17604) [details]
> r8169: the RxMissed register exists in the 8169 only

this third patch works great! :-)

the nic works after a coldboot and there are no dropped
packets anymore.

i hope this goes upstream before 2.6.27 ;-)

thank you
 
Comment 16 Francois Romieu 2008-09-08 13:35:40 UTC
Hermann, one final question please: which kernel did you test the patch against ?

I'll try to push the patch for 2.6.27 but I can not warrant that it will be
labeled critical enough.

-- 
Ueimor
Comment 17 Hermann Gausterer 2008-09-08 23:16:50 UTC
git revision 7686ad5606f08d9dfb33a2087a36c8366366015b

uname: 2.6.27-rc5-00319-g7686ad5-dirty

Note You need to log in before you can comment on or make changes to this bug.