RFC r8169: RSS for the RTL8125B
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest5 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | r8169: recheck the TX descriptor after a vector-map interruptdrivers/ | +14 | 0 replies | |
| 2/5 | r8169: describe the vector-map interrupt layout per chipdrivers/ | +48 | 0 replies | |
| 3/5 | r8169: make the RSS hash types and descriptor type per chipdrivers/ | +17 | 0 replies | |
| 4/5 | r8169: add the type 3 RX descriptordrivers/ | +136 | 0 replies | |
| 5/5 | r8169: enable RSS on the RTL8125Bdrivers/ | +26 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC net-next 0/5] r8169: RSS for the RTL8125B
Enable RSS on the RTL8125B (RTL_GIGA_MAC_VER_63) using the vector-map interrupt model and multi-queue support added for the RTL8127A.
Patch 1 fixes a race in the vector-map TX path: the TX interrupt can arrive before the descriptor write-back is visible, so the end of a burst stays unreaped until BQL stops the queue and the watchdog fires. The fix copies Realtek's driver: read a register and look at the descriptor again. I don't know whether the register read is needed or a short delay would do; I followed the vendor. The vendor driver does the same on the RX path, but I could not reproduce a stranded RX descriptor, so I left RX out.
I found the race on the RTL8125B with this series and have no RTL8127A to test. Javen, is the RTL8127A affected? If so, I will send patch 1 to net separately.
Patches 2-3 make the vector layout, the RSS hash types and the RX descriptor type per chip, with no functional change. Patch 4 adds the 32-byte "type 3" RX descriptor that the RTL8125B needs for RSS. Patch 5 enables four RSS queues on the RTL8125B.
Thanks to Javen Xu for confirming the RTL8125B's vector layout and descriptor requirements.
Tested with two RTL8125B on x86_64 (KVM, VFIO passthrough) and RISC-V (SpacemiT K1): traffic spreads over four RX queues and link changes arrive on vector 21; x86_64 runs at line rate both ways. Confirmed that without patch 1, we get TX timeouts with bursty TCP traffic, and no timeouts with the patch.
Open question: the RTL8125B can stop receiving when its RX ring runs dry, until RxOverflow is cleared in IntrStatus ("r8169: enable the RxOverflow interrupt again"). The vector-map handler never touches IntrStatus. I could not run the ring dry in testing; does this mode need the same handling?
Vlad Banea (5):
r8169: recheck the TX descriptor after a vector-map interrupt
r8169: describe the vector-map interrupt layout per chip
r8169: make the RSS hash types and descriptor type per chip
r8169: add the type 3 RX descriptor
r8169: enable RSS on the RTL8125B
drivers/net/ethernet/realtek/r8169_main.c | 309 +++++++++++++++++----- 1 file changed, 241 insertions(+), 68 deletions(-)
base-commit: 368fbf5d82da9ebce309449c74fc0b128f7d0219
Signature · 1 line
2.53.0