Re: [PATCH net v2] r8169: recheck the TX descriptor after a vector-map interrupt
From: Vlad Banea
Date: Mon Nov 30 2026 - 11:01:47 EST
> - [Medium] The fix may not close the TX stall it targets.
You're right that the read is not guaranteed by PCIe ordering alone, and
I cheecked: with the burst test that shows the stall (19 TX timeouts
in 31 bursts without the fix):
register read (IMR_CLEAR, ISR_VEC_MAP_REG or ChipCmd): 0 in 217 bursts
udelay(5) instead of the read: 1 in 155 bursts
So the effect is probably timing, and the read has not failed in testing,
but the numbers do not actually prove that it orders the write-back.
A fallback that keeps NAPI polling while the descriptor looks owned does
not work well: at line rate the second look finds a descriptor still in
flight in most TX polls, so it would busy-poll under load.
The robust fix is to stop relying on the write-back. The RTL8125 has a
"TX no-close" mode (TxConfig bit 6) in which the chip reports completion
through a hardware pointer register (HW_CLO_PTR0, 0x2802) and the driver
never checks DescOwn. An experimental patch for the RTL8125B gave 0 TX
timeouts in 93 bursts and passes my other tests. Since vector-map mode is
only enabled on the RTL8125B by my RSS series, I would propose no-close
for net-next together with it, and keep this patch as the minimal fix
for net.
Javen, does the RTL8127A support the same mode in vector-map operation,
and would Realtek prefer it there too? I have no RTL8127A to test.
Vlad