Re: looking for testers for if_rge - RTL8125/8126/8127 ethernet driver

From: Adrian Chadd <adrian_at_freebsd.org>
Date: Mon, 01 Dec 2025 02:42:11 UTC
hi!

Thanks! My goal is to get this into a review next week, so hopefully
this is a short lived port!


-a

On Sun, 30 Nov 2025 at 10:48, Bernard Spil <brnrd@freebsd.org> wrote:
>
> Hi,
>
> Turns out the realtek-re-kmod wasn't working out for me after all,
> machine started repeatedly crashing.
>
> Committed the port net/realtek-rge-kmod hoping to attract more testers.
> So far, works out great for me. GMKTek M5 Plus / AMD 5825U / Dual RTL8215
> FreeBSD 15.0-RC4-p1 releng/15.0-n280991-c7ccd5b3f879 GENERIC amd64
>
> Testing with 2 clients, both 100 parallel streams iperf3 bidirectional
> for 10 minutes showed negligible load.
>
> rge0@pci0:1:0:0:        class=0x020000 rev=0x05 hdr=0x00 vendor=0x10ec
> device=0x8125 subvendor=0x10ec subdevice=0x8125
>     vendor     = 'Realtek Semiconductor Co., Ltd.'
>     device     = 'RTL8125 2.5GbE Controller'
>     class      = network
>     subclass   = ethernet
> rge1@pci0:2:0:0:        class=0x020000 rev=0x05 hdr=0x00 vendor=0x10ec
> device=0x8125 subvendor=0x10ec subdevice=0x8125
>     vendor     = 'Realtek Semiconductor Co., Ltd.'
>     device     = 'RTL8125 2.5GbE Controller'
>     class      = network
>     subclass   = ethernet
>
> Cheers, Bernard.
>
> On Sun, Nov 30, 2025 at 2:51 PM Bernard Spil <brnrd@freebsd.org> wrote:
> >
> > Hi all,
> >
> > Thanks to flo for notifying me that there's an alternative to
> > net/realtek-re-kmod.
> >
> > I've had crashes running realtek-re-kmod and realtek-re-kmod198
> > before, none of the switches seemed to help.
> > After upgrading to from 14.3 to 15.0-RC4-p1, I thought I'd test again.
> > So far so good, no crashes. Generating load with iperf for 5 minutes
> > from 2 machines to the server works OK with the 1101.00 for now.
> >
> > Nice to have this if_rge in the back pocket when things don't work out
> > with 1101.00. Started porting it, find the patch at
> > https://brnrd.eu/bsd/patch-net_realtek-rge-kmod-20251129
> > Seeing that this is supposed to land in base, I'm holding back on committing it.
> >
> > Thanks all! Bernard (brnrd@)
> >
> > On Fri, Nov 28, 2025 at 5:48 PM Adrian Chadd <adrian@freebsd.org> wrote:
> > >
> > > On Thu, 27 Nov 2025 at 10:13, Florian Smeets <flo@freebsd.org> wrote:
> > > >
> > > > On 23.11.25 03:16, Adrian Chadd wrote:
> > > > > hi!
> > > > >
> > > > > i've ported Kevin Lo's openbsd driver for these realtek chipsets to FreeBSD.
> > > > > It works well enough for me to use on my laptop w/ RTL8125B / Killer E3000.
> > > > > I'm now opening it up to others who are willing to build/run a kernel
> > > > > module to test the driver out and report back.
> > > > >
> > > > This is great. Finally, an in tree driver for these very common NICs.
> > > > The 1100.00 version of the net/realtek-re-kmod was just unreliable for
> > > > me (constant hangs, no matter which options I turned off and on). I've
> > > > only done light testing with the official 1101.00 driver. I was able to
> > > > wedge it with less than a minute of iperf3, and the ifconfig down/up
> > > > dance that was able to revive the interface with 1100.00 was not able to
> > > > recover the interface.
> > > >
> > > > I ran if_rge on my NAS and did some testing. I haven't had one hang with
> > > > this driver, even after pounding the network for hours. That's a big
> > > > plus for me. Thanks.
> > > >
> > > > I was able to achieve close to 2.5Gb/s TX and close to 1Gb/s RX with
> > > > iperf3 --bidir.
> > > >
> > > > CPU usage appears to be substantially higher than with the official
> > > > Realtek driver.
> > >
> > > That's a good data point.
> > >
> > > >
> > > > [intr{irq59: rge0}] goes to around 50% of one core, and [kernel{rge0
> > > > taskq thread}] hovers between 20-25% when running the above iperf3 tests.
> > > >
> > > > With the official 1101.00 driver, the only process using > 1% CPU is
> > > > this one [kernel{re0 taskq}] and it is around 10% with the test
> > > > mentioned above.
> > >
> > > I'll go dig into that a bit. It shouldn't be taking very much CPU to process
> > > this number of packets; the bulk of the CPU should be used by the IP stack.
> > >
> > > I'll go run some profiling over the next few days and see if I can nail down
> > > what I'm doing poorly. Hopefully it's something stupid on my end. ;-)
> > >
> > >
> > >
> > > -adrian
> > >