# Realtek RTL8168 dropping huge number of packets

## nuff

Hi,

I got a problem with the integrated network card on my asus p5gc-vm pro mainborad.

lspci shows this information:

02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 02)

The probelm is that I got a huge number of dropped packets.

ifconfig shows this:

eth0      Link encap:Ethernet  HWaddr 00:1E:8C:09:BC:69

          inet addr:192.168.0.35  Bcast:192.168.0.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:275 errors:0 dropped:27059849896 overruns:0 frame:0

          TX packets:231 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:36811 (35.9 Kb)  TX bytes:104109 (101.6 Kb)

          Interrupt:253 Base address:0x6000

It doesn't matter whatever a cable are conncted or not, the number rises at the same speed. I've just to ensure myself even tested with 3 different cables and two different switches.

I haven't seen any significant performance change compared other integrated gigabit adapters. My concern are if this may cause corrupted files or anything like that. Tried with a few packets and all have passed hash check until now.

I use the r8169 module with gentoo-sources 2.6.25-gentoo-r2

Do I have anything to worry about or will this only be an ugly entery in the monitoring software?

----------

## potatoface

why do you use a driver for a 8169 card although you have a 8168 card?

regards,

potatoface

----------

## energyman76b

 *potatoface wrote:*   

> why do you use a driver for a 8169 card although you have a 8168 card?
> 
> regards,
> 
> potatoface

 

because it is the same driver for all the gigabit realteks.

But:

 ifconfig

eth0      Protokoll:Ethernet  Hardware Adresse 00:19:66:47:f3:cb

          inet Adresse:139.174.197.94  Bcast:139.174.197.255  Maske:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:131009 errors:0 dropped:0 overruns:0 frame:0

          TX packets:71388 errors:0 dropped:0 overruns:0 carrier:0

          Kollisionen:0 Sendewarteschlangenlänge:1000

          RX bytes:160283970 (152.8 MiB)  TX bytes:6777132 (6.4 MiB)

          Interrupt:19

01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 01)

[   40.430589] r8169: eth0: link up

[   40.430589] r8169: eth0: link up

maybe its not your cables, but the wall socket - or something else in your network?

----------

## nuff

 *energyman76b wrote:*   

> 
> 
> But:
> 
>  ifconfig
> ...

 

The strange thing is that it still dropping the same amount of packets even when a cable is not connected to the NIC.

----------

## energyman76b

maybe you should try a different kernel? and do you have any strange config options enabled? rt? napi? vlan? stuff like that?

----------

## nuff

Yes, I've enabled the napi option on the r8169 driver when I compiled the kernel, otherwise the card doesn't work at all.

----------

## energyman76b

<M>   Realtek 8169 gigabit ethernet support                                                             │ │

  │ │                                 [ ]     Use Rx Polling (NAPI) (EXPERIMENTAL)                                                            │ │

  │ │                                 [*]     VLAN support                            

amd works here very fine.

----------

## nuff

I tried compile both the kernel I run now without the napi option, a  both with and without the napi option 2.6.24 kernel and a 2.6.26-rc1 kernel. All kernels find the network card but none was able to request an ip-address from my dhcp without the napi option, static configuration doesn't work either.

The only difference i could see between our cards was that mine are a rev 02 and you got a rev 01.

----------

## ferg

Hi,

Since I upgraded my kernel to 2.6.25 I've seen similar issues with this driver.

I get a lot of error messages similar to:

```
r8169: eth0: link up

r8169: eth0: link down

r8169: eth0: link up

r8169: eth0: link down

r8169: eth0: link up

r8169: eth0: link down

```

I started looking at this problem as I've been having a lot of NFS disconnects recently.  I sortof solved these by switching to the unstable version of NFS-Utils, but I'm fairly sure that it's the card that is at fault:

https://forums.gentoo.org/viewtopic-t-691073-highlight-ferg.html

Not sure what to aim for to fix it.

Cheers

Ferg

----------

## energyman76b

and you tried kernel.org sources, not gentoo sources?

if yes, IMHO its time to go to lkml with your problem.

----------

## ferg

Hi,

I've just used Gentoo-Sources for this.

Never thought about trying out the non-patched one.  I'll give it a go.

Is using Vanilla-sources sufficiently unpatched do you reckon?

Cheers

Ferg

----------

## energyman76b

vanilla sources are vanilla - no patches  :Wink: 

----------

## ferg

a bit obvious really!

I've not taken my daily medication yet  :Smile: 

Cheers

Ferg

----------

## bju

I had the same problem. After adding "noapic nomsi" to the kernel boot command line all works without errors.

----------

## ferg

Thanks.  I'll give that a try!

Cheers

Ferg

----------

## !equilibrium

 *bju wrote:*   

> I had the same problem. After adding "noapic nomsi" to the kernel boot command line all works without errors.

 

the problem is due to an issue from the in kernel MSI support that block all the PCI-e buses.

recompile the kernel without MSI support o add "nomsi" to the kernel boot command line (noacpi is not mandatary).

----------

## concord

nomsi is enough.

----------

## xgregx

I was having a similar problem with that gig-E card built into my mobo. 

I went into the bios and disabled powersave for the PCI-e bus.  It seems like it's trying to put the card to sleep when it's active.  Wreaks havoc on my mythtv setup.  

I haven't seen any "Link up" messages in dmesg in a while - before I was getting dozens a day.  

Greg

----------

