Official Realtek Driver Binary 1.95 For 2.4.4 Release



  • @breakaway upper case is fine, it is the left/backwards/upside down quotation mark that if copy pasted makes the loader throw a syntax error and not load the driver.



  • Could you post a guide on how to compile the driver? Would be nice to know what is needed from pfsense sources etc and if any configs is needed.



  • @penetal

    Here's a link of the guide. The files are a little bit old so use the newer version (Realtek driver v1.95 and FreeBSD 11.2), but the process is still the same.

    https://gist.github.com/jovimon/524e116471f249626fd2ccd141f3fe05



  • Also, is there any way to “slipstream” the driver and the modification to the loader.conf so that it will automatically include this driver when installing from media?



  • would it be possible to put driver into a pfS package?



  • @love-it-again thanks a ton


  • Netgate Administrator

    It's very unlikely this could ever be added as an official package. Is it even using a license that would allow it?

    The correct way to resolve this would be to fix the upstream FreeBSD driver. I've never looked to see what the differences are there.

    Steve



  • Just got finished putting this driver on my Odroid H2. This SBC has been nice but the NIC's seem to drop connection about a once a day.

    Is there something I can do to track the state of the NIC's and the drivers to see what's happening when they lock up? I'd be willing to revert to the stock drivers just to find out why a daily reboot has been necessary.


  • Netgate Administrator

    Not easily. You'd probably need to add debug messages to the driver for example. Maybe recompile it.

    Are you (were you) seeing the watchdog timeouts?

    Steve



  • @stephenw10 I hadn't been seeing the watchdog timeouts but I hadn't been looking for them either. What's the best way to look for them?


  • Netgate Administrator

    They would be in the system log if you are hitting that issue.

    Steve



  • Also, at least in my experience using the driver built in to FreeBSD, the watchdog timeout is pretty easy to provoke by running iperf tests against the LAN interface. I see that the Odroid H2 has dual RTL8111Gs whereas I, and I believe most others using the official Realtek driver, have been running Zotac machines that I believe have RTL8111Es. Both of those use the same driver, but I think it's fair to say that the RTL8111G is less "battle tested" with this driver. Have you also confirmed that the driver is indeed being loaded and used by looking for it in the output of ldstat?



  • I have made FreeBSD 12 package.
    https://drive.google.com/file/d/1Ch4Z_w7gpbrpavQ4KhPUXUzYhRyzqnye/view?usp=sharing
    I dont consider it my work - I have just packed it in one archive. It is stable for me on 12.0 p3 more than
    "sed -i -e 's/TAILQ_FOREACH/CK_STAILQ_FOREACH/g' if_re.c"



  • Will pfSense 2.5.0 / FreeBSD 12.0-RELEASE-p3 improve the built-in Realtek drivers situation at all?


  • Netgate Administrator

    I would guess no. Not much activity in the FreeBSD repo:
    https://github.com/pfsense/FreeBSD-src/commits/RELENG_2_5/sys/dev/re



  • I've installed precomplied version of this driver for Nettop Gigabyte GB-BACE-3000 - working good with PFSence 2.4.4-RELEASE-p1. Uptime 31 days.
    Thanks for the driver @TheNarc!



  • I am currently using a Gigabyte GA-C1007UN-D
    It has two realtek NICS either RTL8111E or RTL811F (online reviews conflict) I have never noticed this error, but would use this driver if it would increase stability. using the current 2.4.5 dev build.

    Any advice on specific iperf test that is known to kick off this problem? traffic to the rtr, from the router, do I need tons of simultaneous streams?

    I would like to see it fail before I spent the time.



  • @mervincm In my experience, I didn't need to set any exotic iperf options. Just running a few iperf tests between a host on the LAN and the LAN port of the pfSense machine was enough to reproduce the error.



  • @TheNarc I guess I am fine then as after I stood up iperf as a server on pfSense
    d5926cd9-fad7-430a-a5b6-679bbb2c9363-image.png
    I hammered it quite hard from my desktop with 5, 10, 15, 20, 25, 30, 40, 50 parallel threads under iperf2 and never managed to cause the pfSense LAN nic to freeze.
    I then shut down the iperf service and then started up iperf3 from the command line iperf3 -s
    again, I hammered it quite hard from my desktop with 5, 10, 15, 20, 25, 50, and then even 100 parallel threads a few times under iperf3 and again, never managed to cause the pfSense LAN nic to freeze.

    The iperf performance wasn't great, say about 700-900 Mbps, but it was stable.

    edit I did get 2 occurrences of the alert. I didn't notice the impact while testing, perhaps it came back up quickly?
    Mar 27 17:09:23 kernel re1: watchdog timeout
    Mar 27 16:38:39 kernel re1: watchdog timeout

    Is a few errors like this symptomatic of this bug, or would you see far more of them?

    I do see this occasionally in my logs, 35 total of them over a couple of months. I am not sure if that is expected or a problem to fix.



  • Well, I decided to try it out. I added the driver as detailed above, and confirmed it was loaded, and now I beat on it 5 times as hard and I have not been able to get a single more watchdog error. thanks for helping me find and fix a problem I didn't even know I had!



  • @TheNarc said in Official Realtek Driver Binary 1.95 For 2.4.4 Release:

    CI323

    What I experienced, using the driver built into pfsense on Cl323, is that there will be watchdog timeouts frequently; but eventually the LAN interface will quite working completely until someone reboots the box. After installing the realtek driver 1.95 as described in this thread, those issues are no more and the box is stable.

    If you are deploying pfsense on CI323, I'd strongly reccommend this driver and that stress testing the network is part of your checklist.



  • Has anyone experienced a downgrade in performance to around 100mbps? It used to operate at my connection speed 175mbps, but after I had to shutdown and replace a power bar a few days ago, it hasn't been the same.

    The dashboard reports the link is 1000mbps but that's not the actual speed when downloading a file.

    Thanks for your time.



  • @krackpot I have two systems running with this driver one on a 200mbps link one on a 300mbps, neither have trouble hitting those speeds.


  • Netgate Administrator

    That sounds more like something is actually linking at 100Mb. That NIC should pass far more than that with either driver.

    Steve



  • Have 2.4.4-RELEASE-p3 the latest driver for RTL8111G or must I manualy update the driver to latest version?

    I have problem WAN port stop working, disable the port and enable and it start working again... its happens with low load 10mbit maybe... within 1 hour or so...


  • LAYER 8

    you need to manually update https://drive.google.com/open?id=1lBg8AIRiRfGBGeXe9kgKtAAma0VjiYfC
    copy to /boot/kernel , rename to if_re.ko
    kldload if_re.ko
    or build it yourself

    to load it at boot
    edit /boot/loader.conf.local
    and paste
    if_re_load=“YES"

    personally i've lost patience with realtek and at the end i bought an intel card



  • @kiokoman said in Official Realtek Driver Binary 1.95 For 2.4.4 Release:

    you need to manually update https://drive.google.com/open?id=1lBg8AIRiRfGBGeXe9kgKtAAma0VjiYfC
    copy to /boot/kernel , rename to if_re.ko
    kldload if_re.ko
    or build it yourself

    to load it at boot
    edit /boot/loader.conf.local
    and paste
    if_re_load=“YES"

    personally i've lost patience with realtek and at the end i bought an intel card

    /root: kldstat
    Id Refs Address Size Name
    1 5 0xffffffff80200000 2ddcbe8 kernel
    2 1 0xffffffff82fde000 7d290 if_re.ko
    3 1 0xffffffff839fa000 10a0 cpuctl.ko

    Is the drive active now ?


  • LAYER 8

    yes



  • @kiokoman said in Official Realtek Driver Binary 1.95 For 2.4.4 Release:

    yes

    These should be it ?

    Now can I go to bad, and see if internett is still working tomorrow morning :)

    Thank you very much !



  • @gordon

    The problem is still present...
    Strange it is only a problem with WAN (re1) and not LAN (re0)...



  • [2.4.4-RELEASE][root@firewall.test.net]/root: grep re1 /var/run/dmesg.boot
    re1: <Realtek PCIe GBE Family Controller> port 0xd000-0xd0ff mem 0xa1104000-0xa1104fff,0xa1100000-0xa1103fff at device 0.0 on pci3
    re1: Using Memory Mapping!
    re1: Using 1 MSI-X message
    re1: ASPM disabled
    re1: version:1.95.00
    re1: Ethernet address: 00:1e:06:45:02:83
    re1: Ethernet address: 00:1e:06:45:02:83

    [2.4.4-RELEASE][root@firewall.test.net]/root: route -n
    route: usage: route [-46dnqtv] command [[modifiers] args]

    [2.4.4-RELEASE][root@firewall.test.net]/root: arp -an | grep re1
    ? (92.221.80.253) at 00:1e:06:45:02:83 on re1 permanent [ethernet]
    ? (92.221.80.1) at 00:02:00:01:00:01 on re1 expires in 97 seconds [ethernet]

    [2.4.4-RELEASE][root@firewall.test.net]/root: tcpdump -c 20 -n -i re1
    tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
    listening on re1, link-type EN10MB (Ethernet), capture size 262144 bytes
    03:49:11.244621 IP 92.221.80.253.49228 > XX.XX.XX.XX.XXX: 26302+ XXXXXXX (91)
    03:49:11.244626 IP 92.221.80.253.49228 > XX.XX.XX.XX.XXX: 26302+ XXXXXXX. (91)
    03:49:11.246135 IP 92.221.80.253.25525 > XX.XX.XX.XX.XXX: 28630+ XXXXXXX. (35)
    03:49:11.246139 IP 92.221.80.253.25525 > XX.XX.XX.XX.XXX: 28630+ XXXXXXX. (35)
    03:49:11.262982 IP 92.221.80.253.25525 > XX.XX.XX.XX.XXX: 42079+ XXXXXXX. (57)
    03:49:11.262985 IP 92.221.80.253.25525 > XX.XX.XX.XX.XXX: 42079+ XXXXXXX. (57)
    03:49:11.263013 IP 92.221.80.253.25525 > XX.XX.XX.XX.XXX: 23104+ XXXXXXX. (53)
    03:49:11.263016 IP 92.221.80.253.25525 > XX.XX.XX.XX.XXX: 23104+ XXXXXXX. (53)
    03:49:11.413788 IP 92.221.80.253.25525 > 109.247.114.4.53: 46408+ XXXXXXX. (41)
    03:49:11.413793 IP 92.221.80.253.25525 > 92.220.228.70.53: 46408+ XXXXXXX. (41)
    03:49:11.413823 IP 92.221.80.253.25525 > 109.247.114.4.53: 30408+ XXXXXXX. (41)
    03:49:11.413826 IP 92.221.80.253.25525 > 92.220.228.70.53: 30408+ XXXXXXX. (41)
    03:49:11.414619 IP 92.221.80.253.25525 > XX.XX.XX.XX.XXX: 9197+ XXXXXXX. (31)
    03:49:11.414622 IP 92.221.80.253.25525 > XX.XX.XX.XX.XXX: 9197+ XXXXXXX. (31)
    03:49:11.414695 IP 92.221.80.253.36009 > XX.XX.XX.XX.XXX: 247+ XXXXXXX. (31)
    03:49:11.414699 IP 92.221.80.253.36009 > XX.XX.XX.XX.XXX: 247+ XXXXXXX. (31)
    03:49:11.490012 IP 92.221.80.253.49228 > XX.XX.XX.XX.XXX: 26302+ XXXXXXX. (91)
    03:49:11.490015 IP 92.221.80.253.49228 > XX.XX.XX.XX.XXX: 26302+ XXXXXXX. (91)
    03:49:11.491250 IP 92.221.80.253.25525 > XX.XX.XX.XX.XXX: 28630+ XXXXXXX. (35)
    03:49:11.491253 IP 92.221.80.253.25525 > XX.XX.XX.XX.XXX: 28630+ XXXXXXX. (35)
    20 packets captured
    20 packets received by filter
    0 packets dropped by kernel



  • @kiokoman are you sure the driver has been loaded ?
    Just that I facing the same problem after also....


  • Netgate Administrator

    @gordon said in Official Realtek Driver Binary 1.95 For 2.4.4 Release:

    re1: version:1.95.00

    It shows it's loaded there. The FreeBSD in kernel driver doesn't show the version as far as I know. I only have 2.5 dev box up right now but:

    [2.5.0-DEVELOPMENT][root@apu.stevew.lan]/root: grep re1 /var/run/dmesg.boot
    re1: <RealTek 8168/8111 B/C/CP/D/DP/E/F/G PCIe Gigabit Ethernet> port 0x2000-0x20ff mem 0xf7c00000-0xf7c00fff,0xf7b00000-0xf7b03fff irq 17 at device 0.0 on pci2
    re1: Using 1 MSI-X message
    re1: ASPM disabled
    re1: Chip rev. 0x2c000000
    re1: MAC rev. 0x00200000
    miibus1: <MII bus> on re1
    re1: Using defaults for TSO: 65518/35/2048
    re1: Ethernet address: 00:0d:b9:89:3f:11
    re1: netmap queues/slots: TX 1/256, RX 1/256
    

    Try commenting out the line in loader.conf.local and rebooting.

    Steve


  • LAYER 8

    @gordon said in Official Realtek Driver Binary 1.95 For 2.4.4 Release:

    [2.4.4-RELEASE][root@firewall.test.net]/root: grep re1 /var/run/dmesg.boot
    re1: <Realtek PCIe GBE Family Controller> port 0xd000-0xd0ff mem 0xa1104000-0xa1104fff,0xa1100000-0xa1103fff at device 0.0 on pci3
    re1: Using Memory Mapping!
    re1: Using 1 MSI-X message
    re1: ASPM disabled
    > re1: version:1.95.00
    re1: Ethernet address: 00:1e:06:45:02:83
    re1: Ethernet address: 00:1e:06:45:02:83

    yes it is like stephenw10 say,
    version 1.95.00 is the official driver, the one shipped with freebsd does not output the version when it load



  • @kiokoman said in Official Realtek Driver Binary 1.95 For 2.4.4 Release:

    @gordon said in Official Realtek Driver Binary 1.95 For 2.4.4 Release:

    [2.4.4-RELEASE][root@firewall.test.net]/root: grep re1 /var/run/dmesg.boot
    re1: <Realtek PCIe GBE Family Controller> port 0xd000-0xd0ff mem 0xa1104000-0xa1104fff,0xa1100000-0xa1103fff at device 0.0 on pci3
    re1: Using Memory Mapping!
    re1: Using 1 MSI-X message
    re1: ASPM disabled
    > re1: version:1.95.00
    re1: Ethernet address: 00:1e:06:45:02:83
    re1: Ethernet address: 00:1e:06:45:02:83

    yes it is like stephenw10 say,
    version 1.95.00 is the official driver, the one shipped with freebsd does not output the version when it load

    Thank you,

    I reinstalled pfsense today and are using WAN on re0 instead of re1 and LAN on re1, so fare so fare, new record in uptime... cross my fingers....

    But I cannot understand these shall make any different ?


  • Netgate Administrator

    The driver provided by Realtek can commonly help if you're seeing watchdog timeout errors. But it sounds like that's not what you're seeing so it may not make any difference here. You have nothing to lose by trying it though.

    Steve



  • @stephenw10
    Problem is still present, card stop working and report DOWN in status under

    Remember both card is identical network card... strange it’s only WAN card who goes down.

    Have now tried disabling «Disable hardware checksum offload»

    Is it possible to make the card recycle DISABLE and then ENABLE when these happens, way around the problem until I find a fix?



  • «Disable hardware checksum
    Was not fixing the problem....

    Does anybody know how I can auto disable and enable the card when it goes down?


  • LAYER 8

    try with
    /etc/rc.d/netif restart re0



  • @kiokoman said in Official Realtek Driver Binary 1.95 For 2.4.4 Release:

    try with
    /etc/rc.d/netif restart re0

    Thank you, I need some script to detect when it shall happens also...

    I found some things to try another place on these forum, so I have added these lines to the boot config:
    net.inet.tcp.tso=0
    hw.pci.enable_msix=0
    hw.pci.enable_msi=0
    hw.re.tso_enable=0

    to the boot loader config, and for now I haven`t seen the issue again, need more hours... will report back later.


Log in to reply