Skip to content

r8169: J873g 10GbE transmit changes (NAPI deferral, RTL8125CP jumbo checksum) - #1198

Draft
Acelogic wants to merge 2 commits into
aurora-wipfrom
j873g-r8169
Draft

Acelogic wants to merge 2 commits into
aurora-wipfrom
j873g-r8169

Conversation

@Acelogic

@Acelogic Acelogic commented Nov 8, 2026

Copy link
Copy Markdown
Member

Two r8169 transmit changes from Thomas Glanzmann's J873g (Mac mini M6) 10GbE work, kept apart from the J873g platform series.

  • Tx completions count toward NAPI IRQ deferral, so a busy transmit path is not interrupted once per completion.
  • Jumbo frames keep Tx checksum offload on the RTL8125CP (RTL_GIGA_MAC_VER_65), the chip the J873g's on-board NIC identifies as (XID 0x708). TSO is still turned off above an MTU of 1500. Every other chip keeps the existing behaviour.

Thomas's original series also had a small-packet bounce-buffer patch. That patch is not included here, because it added a module parameter. It would need to become the ETHTOOL_TX_COPYBREAK tunable first.

Validation

  • r8169_main.c from this branch builds cleanly against the J873g platform series.
  • These changes have not yet run on an M6. The test kernels shipped the unmodified aurora-wip driver, and the M6 had no Ethernet cable connected.
  • Thomas's throughput measurements in the commit messages were made on his own J873g with his original series.

Draft until it has run with real 10GbE traffic.

Attribution

Thomas Glanzmann wrote both changes and measured them. Acelogic limited the jumbo checksum change to the chip that was measured, kept TSO off above an MTU of 1500 and added the porter notes.

napi_complete_done() applies napi_defer_hard_irqs only when work_done is
non-zero, and rtl8169_poll() passes the Rx count alone. A Tx-only flow
therefore never defers: on the J873 (RTL8127) UDP Tx took ~76k IRQs/s,
about three completions each. Pass at least 1 when Tx descriptors were
reclaimed; with napi_defer_hard_irqs set the IRQ rate drops to ~0.

Signed-off-by: Thomas Glanzmann <[email protected]>
[Acelogic: at runtime the J873's on-board NIC (PCI ID 10ec:8127)
identifies as RTL8125CP (XID 0x708, RTL_GIGA_MAC_VER_65); the
measurement above is from Thomas Glanzmann's original J873 series.]
Signed-off-by: Acelogic <[email protected]>
rtl8169_fix_features() drops checksum offload for every chip newer than
RTL_GIGA_MAC_VER_06 once the MTU exceeds 1500. On the RTL8127A (J873)
the hardware produces correct checksums at MTU 9000: iperf3 TCP and
UDP to an ixgbe peer showed no TCP or UDP checksum errors there. TSO
stays off, since the MSS field cannot hold a jumbo MSS. Only measured on
the RTL8127A; the gain there is small (UDP Tx 6.1 -> 6.4 Gbit/s, TCP Tx
unchanged at ~5 Gbit/s, which is bound by per-segment work without TSO).

Signed-off-by: Thomas Glanzmann <[email protected]>
[Acelogic: the J873's on-board NIC (PCI ID 10ec:8127) identifies at
runtime as RTL8125CP (XID 0x708), which r8169 maps to
RTL_GIGA_MAC_VER_65, so the exception is limited to that chip instead of
every RTL8125/RTL8127, and the subject names it. TSO is still cleared
for every MTU above 1500. The measurement above is from Thomas
Glanzmann's original J873 series.]
Signed-off-by: Acelogic <[email protected]>

@RyanTheTide RyanTheTide left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Please retarget this to integration/aurora. Both commits apply cleanly on the current integration/aurora (a45bea1), and nothing else is needed from aurora-wip.

  2. 246bef5 changes NAPI completion for every r8169 chip, not only the RTL8125CP, so it needs a run on hardware. Please add the J873g result for this head with 10GbE traffic: the Tx IRQ rate with and without napi_defer_hard_irqs, throughput, and, for e270fa3, a jumbo-MTU TCP and UDP run with no checksum errors at the peer.

@RyanTheTide

Copy link
Copy Markdown
Contributor

On integration/aurora 110861f, r8169_main.c has neither change. The only r8169 commit there since this branch's base is c5c096b (EEE off on RTL8168h). The two r8169 commits (246bef5, e270fa3) cherry-pick cleanly onto 110861f. The rest of this branch is aurora-wip history. @Acelogic, please retarget the PR to integration/aurora with only those two commits. It also still needs the J873g 10GbE row from the review: the Tx IRQ rate with and without napi_defer_hard_irqs, throughput, and a jumbo-MTU TCP and UDP run with no checksum errors at the peer.

A rebased copy is on this repository as rebase/20261123/pr-1198 (110861f plus this PR's commits, authorship unchanged, conflicts resolved as described above). It is there to save you the rebase; take it or redo it as you prefer.

Build check of 110861f plus this change (arm64, LLVM=1, Image, dtbs and every directory it touches, Fedora config plus asahi.config): builds, no warnings in the files it touches.

@RyanTheTide

Copy link
Copy Markdown
Contributor

@Acelogic checking open drafts today. To come out of draft, this still needs:

  • It is stacked on aurora-wip. Once that lands, retarget it to main.
  • Then a test run at the final head on a Mac with the hardware it touches, and mark it ready for review.

If it's no longer needed, say so here and we'll close it. Otherwise it stays open as a draft until these are done.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants