Project

General

Profile

Actions

Bug #13729

open

Driver issue with Realtek RTL8125

Added by r a about 1 year ago. Updated 2 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

I needed an extra network card and purchased a Realtek RTL8125 PCIe card, after adding to /etc/driver_aliases

rge "pci10ec,8125"
rge "pciex10ec,8125"

While the card works it defaults to 100M full duplex.


Files

rtl_bsd_drv_v196.04.tgz (112 KB) rtl_bsd_drv_v196.04.tgz Realtek RTRL8125 BSD driver r a, 2022-03-16 05:09 PM
Actions #1

Updated by r a 8 months ago

Using dladm to report the link properties (uname reports SunOS tesla 5.11 illumos-f3ecd6165f i86pc i386 i86pc)

dladm show-linkprop rge1
LINK         PROPERTY        PERM VALUE          DEFAULT        POSSIBLE
rge1         speed           r-   100            100            -- 
rge1         autopush        rw   --             --             -- 
rge1         zone            rw   --             --             -- 
rge1         duplex          r-   full           full           half,full 
rge1         state           r-   up             up             up,down 
rge1         adv_autoneg_cap --   --             0              1,0 
rge1         mtu             rw   1500           1500           1500 
rge1         flowctrl        --   --             no             no,tx,rx,bi 
rge1         adv_fec_cap     r-   --             r-             none,auto,rs,base-r 
rge1         en_fec_cap      --   --             --             none,auto,rs,base-r 
rge1         adv_100gfdx_cap r-   --             0              1,0 
rge1         en_100gfdx_cap  --   --             0              1,0 
rge1         adv_50gfdx_cap  r-   --             0              1,0 
rge1         en_50gfdx_cap   --   --             0              1,0 
rge1         adv_40gfdx_cap  r-   --             0              1,0 
rge1         en_40gfdx_cap   --   --             0              1,0 
rge1         adv_25gfdx_cap  r-   --             0              1,0 
rge1         en_25gfdx_cap   --   --             0              1,0 
rge1         adv_10gfdx_cap  r-   --             0              1,0 
rge1         en_10gfdx_cap   --   --             0              1,0 
rge1         adv_5000fdx_cap r-   --             0              1,0 
rge1         en_5000fdx_cap  --   --             0              1,0 
rge1         adv_2500fdx_cap r-   --             0              1,0 
rge1         en_2500fdx_cap  --   --             0              1,0 
rge1         adv_1000fdx_cap r-   --             0              1,0 
rge1         en_1000fdx_cap  --   --             0              1,0 
rge1         adv_1000hdx_cap r-   --             0              1,0 
rge1         en_1000hdx_cap  --   --             0              1,0 
rge1         adv_100fdx_cap  r-   --             0              1,0 
rge1         en_100fdx_cap   --   --             0              1,0 
rge1         adv_100hdx_cap  r-   --             0              1,0 
rge1         en_100hdx_cap   --   --             0              1,0 
rge1         adv_10fdx_cap   r-   --             0              1,0 
rge1         en_10fdx_cap    --   --             0              1,0 
rge1         adv_10hdx_cap   r-   --             0              1,0 
rge1         en_10hdx_cap    --   --             0              1,0 
rge1         maxbw           rw   --             --             -- 
rge1         cpus            rw   --             --             -- 
rge1         cpus-effective  r-   --             --             -- 
rge1         pool            rw   --             --             -- 
rge1         pool-effective  r-   --             --             -- 
rge1         priority        rw   high           high           low,medium,high 
rge1         tagmode         rw   vlanonly       vlanonly       normal,vlanonly 
rge1         forward         rw   1              1              1,0 
rge1         default_tag     rw   1              1              -- 
rge1         learn_limit     rw   1000           1000           -- 
rge1         learn_decay     rw   200            200            -- 
rge1         stp             rw   1              1              1,0 
rge1         stp_priority    rw   128            128            -- 
rge1         stp_cost        rw   auto           auto           -- 
rge1         stp_edge        rw   1              1              1,0 
rge1         stp_p2p         rw   auto           auto           true,false,auto 
rge1         stp_mcheck      rw   0              0              1,0 
rge1         protection      rw   --             --             mac-nospoof,
                                                                restricted,
                                                                ip-nospoof,
                                                                dhcp-nospoof 
rge1         allowed-ips     rw   --             --             -- 
rge1         allowed-dhcp-cids rw --             --             -- 
rge1         rxrings         rw   --             --             -- 
rge1         rxrings-effective r- --             --             -- 
rge1         txrings         rw   --             --             -- 
rge1         txrings-effective r- --             --             -- 
rge1         txrings-available r- 0              --             -- 
rge1         rxrings-available r- 0              --             -- 
rge1         rxhwclnt-available r- 0             --             -- 
rge1         txhwclnt-available r- 0             --             -- 

Actions #2

Updated by Jim Klimov 3 months ago

Got a similar card in the Gigabyte X570S UD motherboard, so thanks for the hint about getting it recognized.

I had a bumpy ride starting it - kept identifying as 100Mbit as well, which eventually was sorted out as a faulty UTP cable (not all 8 lines worked). With another, the rge driver does identify the link as 1000Mbit/s. But unlike your report, it does not actually work :(

External systems do not see DHCP queries etc., a snoop running on the box after I ifconfig'ed an address statically does not see replies to its ARP queries when I ping stuff (and its MAC address does not appear in the ping'ed boxes' ARP tables)...

I cross-checked with PXE boot (requests DHCP and gets replies with an address, but does not progress to set one - maybe because no boot-specific options are served), and with a linux (proxmox 7.1 based on Debian 11, supports ZFS) which worked. So at least the chip is not broken as I worried initially.

I see the driver source was essentially not touched for a decade, except for 32-bit kernel deprecation half a year ago. Wonder if that is the critical difference... will try a binary from older OI rootfs.

UPDATE1: Drivers from April 2021 and Feb 2022 differed in size from that of OI 2021.10 ISO but neither worked to get bits on the wire.

UPDATE2: Currently pouring data from another system (a VirtualBox with bridged 1GbE connection due to practical implementation constraints - but I can see many ways how that can add invisible limits) into the box with RTL8125 currently running Proxmox 7.1 with Linux r8169 driver for the network, and curiously the data transfer tops out at 10MB/s. Again, there are too many things in this setup that can be a limit, and the NIC (or how drivers talk to it), even if it claims "1000 speed", can be among the factors. On a side note, kudos to OpenZFS and ZoL collaboration, and to the feature flags idea I saw birthed long ago, the actual pools involved in that rig are quite usable whether I boot the box into Linux or OI Hipster, with local I/O speeds expected from hardware (an NVMe and a HDD pool).

Actions #3

Updated by r a 2 months ago

On the off chance I searched for Realtek RTL8125 linux driver but on the Realtek site I found a BSD driver for the RTL8125. The attached package does contain if_re.c source and if_rereg.h files, not sure if the information contained in the files would enable and update to the illumos rge driver to support

* Various supported device vendors/types and their names.
 */
static struct re_type re_devs[] = {
        {
                RT_VENDORID, RT_DEVICEID_8169,
                "Realtek PCI GbE Family Controller" 
        },
        {
                RT_VENDORID, RT_DEVICEID_8169SC,
                "Realtek PCI GbE Family Controller" 
        },
        {
                RT_VENDORID, RT_DEVICEID_8168,
                "Realtek PCIe GbE Family Controller" 
        },
        {
                RT_VENDORID, RT_DEVICEID_8161,
                "Realtek PCIe GbE Family Controller" 
        },
        {
                RT_VENDORID, RT_DEVICEID_8136,
                "Realtek PCIe FE Family Controller" 
        },
        {
                DLINK_VENDORID, 0x4300,
                "Realtek PCI GbE Family Controller" 
        },
        {
                RT_VENDORID, RT_DEVICEID_8125,
                "Realtek PCIe 2.5GbE Family Controller" 
        },
        { 0, 0, NULL }
};
Actions

Also available in: Atom PDF