mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC net-next 0/5] r8169: RSS for the RTL8125B
@ 2026-11-11 22:01 Vlad Banea
  2026-11-11 22:01 ` [RFC net-next 1/5] r8169: recheck the TX descriptor after a vector-map interrupt Vlad Banea
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Vlad Banea @ 2026-11-11 22:01 UTC (permalink / raw)
  To: netdev
  Cc: hkallweit1, javen_xu, nic_swsd, andrew+netdev, davem, edumazet,
	kuba, pabeni, linux-kernel

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
-- 
2.53.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-11-11 22:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-11 22:01 [RFC net-next 0/5] r8169: RSS for the RTL8125B Vlad Banea
2026-11-11 22:01 ` [RFC net-next 1/5] r8169: recheck the TX descriptor after a vector-map interrupt Vlad Banea
2026-11-11 22:01 ` [RFC net-next 2/5] r8169: describe the vector-map interrupt layout per chip Vlad Banea
2026-11-11 22:01 ` [RFC net-next 3/5] r8169: make the RSS hash types and descriptor type " Vlad Banea
2026-11-11 22:01 ` [RFC net-next 4/5] r8169: add the type 3 RX descriptor Vlad Banea
2026-11-11 22:01 ` [RFC net-next 5/5] r8169: enable RSS on the RTL8125B Vlad Banea

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®