The rge(4) driver recently landed in FreeBSD HEAD, ported from OpenBSD. I tested it with a physical RTL8125 2.5GbE NIC passed through to a QEMU/KVM virtual machine running FreeBSD 16.0-CURRENT. Here’s what works, what doesn’t, and what’s worth reporting upstream.
Background
The Realtek RTL8125 is one of the most common 2.5 Gigabit Ethernet controllers on consumer motherboards. For years, FreeBSD users had to rely on either the in-tree re(4) driver (which didn’t support the RTL8125 at all) or the third-party realtek-re-kmod port, which was Realtek’s own driver adapted for FreeBSD but suffered from stability issues and coding standard mismatches with the FreeBSD kernel.
In December 2025, Adrian Chadd imported the OpenBSD rge(4) driver into FreeBSD HEAD. This driver, originally written by Kevin Lo for OpenBSD 6.6, provides native support for the RTL8125, RTL8126, and RTL8127 families. Bernard Spil created the net/realtek-rge-kmod port for testing on stable branches. The driver is still young on FreeBSD, and the community is actively seeking testing feedback.
I have an RTL8125 on my Gigabyte motherboard (Ryzen 7950X system running Arch Linux), so I set out to test the driver using VFIO/PCI passthrough into a FreeBSD 16.0-CURRENT VM.
Test Setup: VFIO Passthrough
The test environment uses PCI passthrough to give the FreeBSD VM direct hardware access to the physical RTL8125 NIC. This is the closest you can get to bare-metal testing without installing FreeBSD directly. The host keeps its network via WiFi (RTL8852CE) while the Ethernet card is handed to the guest.
RTL8852CE (WiFi)
RTL8125
FreeBSD 16-CURRENT
Step 1: Identify the NIC and IOMMU group
host$ lspci -nn | grep -i realtek
06:00.0 Network controller: Realtek ... RTL8852CE [10ec:c852]
07:00.0 Ethernet controller: Realtek ... RTL8125 [10ec:8125] (rev 05)
$ find /sys/kernel/iommu_groups/ -type l | sort -V | grep 07:00
/sys/kernel/iommu_groups/16/devices/0000:07:00.0
The RTL8125 sits at PCI address 07:00.0 in IOMMU group 16, isolated from other devices. The RTL8852CE WiFi card at 06:00.0 stays on the host for connectivity.
Step 2: Unbind from host and bind to VFIO
host (root)# Load the VFIO PCI module
$ sudo modprobe vfio-pci
# Unbind from the r8169 host driver
$ sudo sh -c 'echo "0000:07:00.0" > /sys/bus/pci/devices/0000:07:00.0/driver/unbind'
# Bind to vfio-pci for passthrough
$ sudo sh -c 'echo "0000:07:00.0" > /sys/bus/pci/drivers/vfio-pci/bind'
# Verify
$ lspci -k -s 07:00.0
07:00.0 Ethernet controller: Realtek ... RTL8125 2.5GbE Controller (rev 05)
Kernel driver in use: vfio-pci
Step 3: Launch the FreeBSD VM
host$ sudo qemu-system-x86_64 \
-enable-kvm \
-m 4G \
-smp 4 \
-hda FreeBSD-16.0-CURRENT-amd64-ufs.qcow2 \
-device vfio-pci,host=07:00.0 \
-nographic
em0 (Intel e1000) by default, which routes through QEMU’s user-mode NAT. Since the default route points to em0, you need to switch it to use the passthrough NIC: route delete default && route add default 192.168.0.1
Driver Behavior & Results
FreeBSD detects the RTL8125 immediately on boot and attaches the rge(4) driver:
dmesgrge0: <RTL8125> port 0xc000-0xc0ff mem 0xc000000000-0xc00000ffff,
0xc000010000-0xc000013fff irq 11 at device 4.0 on pci0
rge0: Ethernet address: xx:xx:xx:xx:xx:xx
rge0: link state changed to DOWN
rge0: link state changed to UP
DHCP works, DNS resolves, and the NIC gets a LAN address. Here’s what pciconf reports:
pciconf -lvrge0@pci0:0:4:0: class=0x020000 rev=0x05 vendor=0x10ec device=0x8125
subvendor=0x1458 subdevice=0xe000
vendor = 'Realtek Semiconductor Co., Ltd.'
device = 'RTL8125 2.5GbE Controller'
class = network
subclass = ethernet
Driver Statistics
The sysctl dev.rge.0 output shows healthy operation with no concerning errors:
| Metric | Value | Status |
|---|---|---|
rge_rx_ok | 26,274 | OK |
rge_tx_ok | 13,115 | OK |
rge_tx_er | 6 | link negotiation |
intr_system_errcnt | 0 | OK |
tx_watchdog_timeout_cnt | 0 | OK |
transmit_full_cnt | 0 | OK |
rx_ether_csum_err | 0 | OK |
link_state_change_cnt | 2 | DOWN → UP |
Hardware checksum offload for IPv4, TCP, and UDP all function correctly — every csum_valid counter matches its corresponding csum_exists counter. Ping latency to external hosts averaged 14–18ms, which is reasonable for the test configuration.
Interface capabilities: rge0 vs em0
Comparing the two NICs in the VM reveals a significant gap in advertised features:
| Feature | em0 (emulated) | rge0 (passthrough) |
|---|---|---|
| RXCSUM / TXCSUM | yes | yes |
| VLAN_MTU / HWTAGGING | yes | yes |
| VLAN_HWCSUM | yes | yes |
| TSO4 | yes | no |
| LRO | yes | no |
| Jumbo frames | yes | no |
| WoL | yes | no |
| VLAN_HWTSO | yes | no |
The rge(4) driver currently exposes a basic set of offload features (options=9b). TSO, LRO, jumbo frame support, and Wake-on-LAN are not yet implemented, though the OpenBSD man page mentions WoL support.
The 2.5G Question
Here’s the most notable finding: the driver does not expose 2500baseT as a media type.
FreeBSD VMroot@freebsd:~# ifconfig rge0 media 2500baseT mediaopt full-duplex
ifconfig: unknown media subtype: 2500baseT
root@freebsd:~# ifconfig rge0
rge0: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP>
options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
The NIC negotiates at 1000baseT only. This is a known limitation — another user on the FreeBSD forums with an RTL8125BG on an ASRock TRX50 motherboard reported the exact same behavior: options=9b, 1000baseT, no 2.5G option.
rge(4) man page explicitly documents the RTL8125 as capable of 2500Mbps operation. Since the FreeBSD driver was ported from OpenBSD, the 2.5G media type support may not have been fully adapted to FreeBSD’s ifmedia framework yet, or may require additional work in the FreeBSD-specific parts of the driver.
Conclusion & Next Steps
The rge(4) driver on FreeBSD 16.0-CURRENT works well for basic Ethernet functionality with the RTL8125. The NIC attaches cleanly, DHCP and DNS work, hardware checksum offload is functional, and there are no stability issues during my testing session. For a driver that landed in HEAD just two months ago, this is a solid start.
2500baseT media type not available — The hardware is a 2.5GbE controller, but the driver only negotiates at 1G. This is the most impactful limitation for users who specifically chose RTL8125-equipped boards for the faster link speed. I’ve reported this to the FreeBSD freebsd-net mailing list.
Limited offload features — TSO, LRO, jumbo frames, and WoL are not yet exposed. For typical desktop use this is fine, but it will affect throughput in high-bandwidth scenarios.
If you have an RTL8125 and are running FreeBSD 15 or CURRENT, testing the driver and reporting your results — positive or negative — will help get it stabilized and potentially backported to stable branches. The FreeBSD forums thread and the freebsd-current mailing list thread are the best places to contribute.
Reverting passthrough on the host
After shutting down the VM, don’t forget to give the NIC back to your host:
host$ sudo sh -c 'echo "0000:07:00.0" > /sys/bus/pci/drivers/vfio-pci/unbind'
$ sudo sh -c 'echo "0000:07:00.0" > /sys/bus/pci/drivers/r8169/bind'
$ sudo dhcpcd enp7s0
Update:
ifconfig -vm rge0 confirms 2500Base-T is listed as a supported media type:
supported media:
media autoselect
media 2500Base-T mediaopt full-duplex
media 2500Base-T
media 1000baseT mediaopt full-duplex
media 1000baseT
media 100baseTX mediaopt full-duplex
media 100baseTX
media 10baseT/UTP mediaopt full-duplex
media 10baseT/UTP
My original error was using 2500baseT (lowercase) instead of 2500Base-T — the media subtype string is case-sensitive.
I also tried forcing 2500Base-T:
ifconfig rge0 media 2500Base-T mediaopt full-duplex
The link briefly dropped and came back at 1000baseT. The media line showed “Ethernet Other ” rather than the expected type. However, I then checked my router and all LAN ports are 1 Gbps only … so the fallback to 1000baseT is expected. I don’t currently have a 2.5G switch to verify actual 2.5G linking.




