re0 troubles on multiple servers

Hi,

We've got a couple of Hetzner servers in our company that use the re(4) driver with realtek network cards that identify as (in different revisions):
pciconf -lv
Code:
re0@pci0:2:0:0: class=0x020000 card=0x78231462 chip=0x816810ec rev=0x0c hdr=0x00
    vendor     = 'Realtek Semiconductor Co., Ltd.'
    device     = 'RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller'
    class      = network
    subclass   = ethernet
ifconfig
Code:
re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
     options=8209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>
     [multiple ip addresses..]
     nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
     media: Ethernet autoselect (1000baseT <full-duplex,master>)
     status: active
sysctl dev.re
Code:
sysctl dev.re
dev.re.0.wake: 0
dev.re.0.int_rx_mod: 65
dev.re.0.stats: -1
dev.re.0.%parent: pci1
dev.re.0.%pnpinfo: vendor=0x10ec device=0x8168 subvendor=0x1462 subdevice=0x7823 class=0x020000
dev.re.0.%location: slot=0 function=0 dbsf=pci0:2:0:0 handle=\_SB_.PCI0.RP05.PXSX
dev.re.0.%driver: re
dev.re.0.%desc: RealTek 8168/8111 B/C/CP/D/DP/E/F/G PCIe Gigabit Ethernet
dev.re.%parent

Every once in a while one of those ~five servers just lose their network connection and has to be hard resetted. Afterwards /var/log/messages displays the following:
Code:
Apr 23 19:38:47 kernel: re0: watchdog timeout
Apr 23 19:38:47 kernel: re0: link state changed to DOWN
Apr 23 19:38:50 kernel: re0: link state changed to UP
Apr 23 19:38:56 kernel: re0: watchdog timeout
Apr 23 19:38:56 kernel: re0: link state changed to DOWN
Apr 23 19:39:00 kernel: re0: link state changed to UP
Apr 23 19:39:06 kernel: re0: watchdog timeout
Apr 23 19:39:06 kernel: re0: link state changed to DOWN
Apr 23 19:39:10 kernel: re0: link state changed to UP
..
That continues until the hard reset.

The only thing I've found googleing was this thread: http://www.bsdforen.de/threads/freebsd-10-hetzner-verliert-netzwerk-während-backup.31093/ (German) where the thread starter just gave up in the end..

All of those servers are running FreeBSD 11.0-p8 but this problem exists at least since 10.3, probably earlier.
Any ideas?
 
Last edited:
Just came here to say I get the exact same problem since FreeBSD 11.0

Log shows up/down up/down multiple times, I too have to reboot
Code:
re0: <RealTek 8168/8111 B/C/CP/D/DP/E/F/G PCIe Gigabit Ethernet> port 0xe000-0xe0ff mem 0x91304000-0x91304fff,0x91300000-0x91303fff irq 18 at device 0.0 on pci1
re0: Using 1 MSI-X message
re0: Chip rev. 0x4c000000
re0: MAC rev. 0x00000000
miibus0: <MII bus> on re0
re0: Using defaults for TSO: 65518/35/2048
 
What Hetzner server you have? I had the same problem with 2 servers from Hetzner (it didn't happen too often, maybe 1 time every 2-3 months) but it didn't have again after I upgrade to 10.3-STABLE
 
IIRC these problems are due to buggy/crappy offloading in some (all?) Realtek NICs.
Try disabling LRO and TSO on them ( ifconfig re0 -tso -lro). I don't think Realtek NICs do checksum-offloading, but you could also try to disable tx/rcsum (it returns an error if the driver/card doesn't support it).
 
Back
Top