FreeNAS: Bug #1850

#30 works Ok -> Realtek 8111F fails at high traffic ‘re0 Watchdog Timeout Error’

[root@freenas] ~# uname -a
FreeBSD freenas.local 10.3-STABLE FreeBSD 10.3-STABLE #0 41eb257(9.10.2-STABLE): Mon Mar  6 17:03:14 UTC 2017     root@gauntlet:/freenas-9.10-releng/_BE/objs/freenas-9.10-releng/_BE/os/sys/FreeNAS.amd64  amd64
[root@freenas] ~# cat /var/log/messages
[...]
Mar 17 18:27:05 freenas re0: watchdog timeout
Mar 17 18:27:05 freenas kernel: re0: link state changed to DOWN
Mar 17 18:27:05 freenas kernel: re0: link state changed to DOWN
Mar 17 18:27:07 freenas kernel: re0: link state changed to UP
Mar 17 18:27:07 freenas kernel: re0: link state changed to UP
Mar 17 18:27:24 freenas re0: watchdog timeout
Mar 17 18:27:24 freenas kernel: re0: link state changed to DOWN
Mar 17 18:27:24 freenas kernel: re0: link state changed to DOWN
Mar 17 18:27:27 freenas kernel: re0: link state changed to UP
Mar 17 18:27:27 freenas kernel: re0: link state changed to UP
Mar 17 18:27:54 freenas re0: watchdog timeout
Mar 17 18:27:54 freenas kernel: re0: link state changed to DOWN
Mar 17 18:27:54 freenas kernel: re0: link state changed to DOWN
Mar 17 18:27:57 freenas kernel: re0: link state changed to UP
Mar 17 18:27:57 freenas kernel: re0: link state changed to UP
Mar 17 18:28:10 freenas re0: watchdog timeout

 [root@freenas] /tmp/realtek# jls
   JID  IP Address      Hostname                      Path
     1  -               service                       /mnt/sandisk16gb/jails/service
[root@freenas] /tmp/realtek# jailme 1 /bin/csh
root@service:/ # ls
.cshrc        COPYRIGHT    boot        etc        libexec        mnt        rescue        sbin        tmp        var
.profile    bin        dev        lib        media        proc        root        sys        usr
root@service:/ # curl -o /tmp/rtlv192.tgz http://12244.wpc.azureedge.net/8012244/drivers/rtdrivers/cn/nic/0005-rtl_bsd_drv_v192.tgz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 95514  100 95514    0     0   620k      0 --:--:-- --:--:-- --:--:--  621k
root@service:/ # cd tmp
root@service:/tmp # ls
.ICE-unix    .X11-unix    .XIM-unix    .font-unix    rtlv192.tgz
root@service:/tmp # tar -xf /tmp/rtlv192.tgz -C /tmp/
root@service:/tmp # cp /tmp/rtl_bsd_drv_v192/if_re* /usr/src/sys/dev/re/
root@service:/tmp # cp /tmp/rtl_bsd_drv_v192/Makefile /usr/src/sys/modules/re/
root@service:/tmp # cd /usr/src/sys/modules/re/
root@service:/usr/src/sys/modules/re # make
Warning: Object directory not changed from original /usr/src/sys/modules/re
@ -> /usr/src/sys
machine -> /usr/src/sys/amd64/include
x86 -> /usr/src/sys/x86/include
:> opt_bdg.h
awk -f @/tools/makeobjops.awk @/kern/device_if.m -h
awk -f @/tools/makeobjops.awk @/kern/bus_if.m -h
awk -f @/tools/makeobjops.awk @/dev/pci/pci_if.m -h
cc -O2 -pipe  -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc   -I. -I@ -I@/contrib/altq -fno-common  -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer  -mno-aes -mno-avx -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -Qunused-arguments  -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions  -Wmissing-include-dirs -fdiagnostics-show-option  -Wno-error-tautological-compare -Wno-error-empty-body  -Wno-error-parentheses-equality -Wno-error-unused-function    -c /usr/src/sys/modules/re/../../dev/re/if_re.c -o if_re.o
ld  -d -warn-common -r -d -o if_re.ko if_re.o
:> export_syms
awk -f /usr/src/sys/modules/re/../../conf/kmod_syms.awk if_re.ko  export_syms | xargs -J% objcopy % if_re.ko
objcopy --strip-debug if_re.ko
root@service:/usr/src/sys/modules/re # cp /usr/src/sys/modules/re/if_re.ko /if_re_192.ko
root@service:/usr/src/sys/modules/re # exit
exit

[root@freenas] /tmp/realtek# cp /mnt/sandisk16gb/jails/service/if_re_192.ko /boot/kernel/if_re.ko 

[root@freenas] /tmp/realtek# cat /boot/loader.conf.local
if_re_load="YES" # # Realtek driver
kernel="kernel"
module_path="/boot/kernel;/boot/modules;/usr/local/modules"
kern.cam.ctl.ha_id=0
[root@freenas] /tmp/realtek# reboot
sm0ketst@latitude-6430u:~$ ssh freenas
sm0ketst@freenas's password: 
Last login: Fri Mar 17 18:39:54 2017 from 192.168.x.xxx
FreeBSD 10.3-STABLE (FreeNAS.amd64) #0 41eb257(9.10.2-STABLE): Mon Mar  6 17:03:14 UTC 2017

    FreeNAS (c) 2009-2016, The FreeNAS Development Team
    All rights reserved.
    FreeNAS is released under the modified BSD license.

    For more information, documentation, help or support, go here:
     http://freenas.org
Welcome to FreeNAS
[sm0ketst@freenas ~]$ dmesg | grep re0
re0: <Realtek PCIe GBE Family Controller> port 0xd000-0xd0ff mem 0xd0614000-0xd0614fff,0xd0610000-0xd0613fff irq 17 at device 0.2 on pci2
re0: Using Memory Mapping!
re0: Using 1 MSI-X message
re0: ASPM disabled
re0: version:1.92
re0: Ethernet address: 80:ee:??:??:??:??
re0: Ethernet address: 80:ee:??:??:??:??
re0: link state changed to UP
re0: promiscuous mode enabled
[sm0ketst@freenas ~]$

v1.93 is already availabe @ RealTek BTW, sadly still drops under concurrent load.