Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
Describe the bug
The RTL8125 vendor driver (if_re.ko, packaged by os-realtek-re) unconditionally advertises flow control (pause frames) during auto-negotiation. When connected to a switch that also advertises pause, the link negotiates flow control and the switch can issue pause frames under buffer pressure. This causes TX ring stalls and net_drop_out increments.
There is no userspace workaround: ifconfig re0 -mediaopt rxpause,txpause is silently ignored because the driver never reads media options before programming the PHY.
To Reproduce
- Install os-realtek-re plugin (if_re.ko) with an RTL8125 NIC
- Run
ifconfig re0 -mediaopt rxpause,txpause
ifconfig re0 still shows <full-duplex,rxpause,txpause>
Pause advertisement cannot be removed via mediaopt regardless of what is passed.
Expected behavior
ifconfig re0 -mediaopt rxpause,txpause should clear the pause advertisement bits so the link negotiates without flow control.
Relevant log files
In if_re.c, re_ifmedia_upd_8125() at line 9271:
MP_WritePhyUshort(sc, MII_ANAR, anar | 0x0800 | ANAR_FC);
always ORs ANAR_FC (symmetric pause) and 0x0800 (asymmetric pause) into the MII ANAR register. It never checks IFM_ETH_RXPAUSE or IFM_ETH_TXPAUSE from the requested media options.
The same unconditional ANAR_FC at line 8942 is gated by !RL_PHY_STATUS_FULL_DUP and only for older MACFG types (56/57/61/62), so RTL8125 is entirely uncovered.
Suggested fix
Conditionally include ANAR_FC based on IFM_ETH_RXPAUSE / IFM_ETH_TXPAUSE from media options, consistent with other FreeBSD network drivers.
Environment
OPNsense 26.1, FreeBSD 14.3-RELEASE-p14
Realtek RTL8125 2.5GbE Controller (rev 0x05)
os-realtek-re 1.0
Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
Describe the bug
The RTL8125 vendor driver (if_re.ko, packaged by os-realtek-re) unconditionally advertises flow control (pause frames) during auto-negotiation. When connected to a switch that also advertises pause, the link negotiates flow control and the switch can issue pause frames under buffer pressure. This causes TX ring stalls and
net_drop_outincrements.There is no userspace workaround:
ifconfig re0 -mediaopt rxpause,txpauseis silently ignored because the driver never reads media options before programming the PHY.To Reproduce
ifconfig re0 -mediaopt rxpause,txpauseifconfig re0still shows<full-duplex,rxpause,txpause>Pause advertisement cannot be removed via
mediaoptregardless of what is passed.Expected behavior
ifconfig re0 -mediaopt rxpause,txpauseshould clear the pause advertisement bits so the link negotiates without flow control.Relevant log files
In
if_re.c,re_ifmedia_upd_8125()at line 9271:always ORs
ANAR_FC(symmetric pause) and0x0800(asymmetric pause) into the MII ANAR register. It never checksIFM_ETH_RXPAUSEorIFM_ETH_TXPAUSEfrom the requested media options.The same unconditional
ANAR_FCat line 8942 is gated by!RL_PHY_STATUS_FULL_DUPand only for older MACFG types (56/57/61/62), so RTL8125 is entirely uncovered.Suggested fix
Conditionally include
ANAR_FCbased onIFM_ETH_RXPAUSE/IFM_ETH_TXPAUSEfrom media options, consistent with other FreeBSD network drivers.Environment
OPNsense 26.1, FreeBSD 14.3-RELEASE-p14
Realtek RTL8125 2.5GbE Controller (rev 0x05)
os-realtek-re 1.0