Skip to content

wifi: brcmfmac: msgbuf: send from pages that hold only transmit buffers - #3210

Merged
RyanTheTide merged 7 commits into
mainfrom
fix/brcmfmac-tx-own-pages
Nov 30, 2026
Merged

RyanTheTide merged 7 commits into
mainfrom
fix/brcmfmac-tx-own-pages

Conversation

@DjDeveloperr

@DjDeveloperr DjDeveloperr commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

What: brcmfmac mapped each frame to send where the stack left it, in an skb head that shares its page with other kernel memory. With 16K pages the IOMMU maps the whole 16 KiB page, so the device could read unrelated data next to the frame. Frames are now copied into buffers from a pool of pages that hold only transmit buffers and stay mapped read-only. This builds on #3205 (base is its branch; it moves to main once #3205 merges).

Tested: J773g (M4 mini) row PASS at ac0d28980ac4: it ran 3a7583863c72, and this head only merges #3205's host-test commit, so the driver code is unchanged (#3210 (comment)). The brcmf host tests pass at this head (46/46, all mutations killed), and msgbuf.o builds with W=1 on 16K pages.

Risk: two-way · Macs with Broadcom PCIe Wi-Fi: M1, M2, M3, M4.

Not yet: The J516s (M3 Pro) row. M1 and M2 rows after merge. (The M4 mini's repeated runs, 4 before and 3 after sleep per arm, show no change after sleep: transmit medians 251.8 on main and 251.4 here.)

Details
  • Pool: one 2 KiB buffer per transmit packet id (2048), allocated in page-sized dma_alloc_noncoherent() chunks with DMA_TO_DEVICE, zeroed and synced once. The device can read only these pages, and they hold only frames already handed to it. Memory is 256 pages on 16K pages.
  • Send: the frame after its Ethernet header (which goes in the descriptor, as before) is copied into a buffer and synced for the device. A frame longer than a buffer is dropped and counted in tx_errors. The MTU (at most 1500 bytes, no scatter-gather) never allows that today.
  • Completion: the buffer goes back to the pool and the skb is finalized as before; nothing is unmapped.
  • Because every packet id has its own buffer, as many frames can be in flight as before. When the pool runs out, the existing "no packet id" back-pressure applies.
  • Cost: one copy of the frame per send replaces a dma_map_single() and a dma_unmap_single() per send.
  • The receive pool code from wifi: brcmfmac: msgbuf: receive into pages that hold only receive buffers #3205 is renamed so both directions share it: brcmf_msgbuf_pool, brcmf_msgbuf_buf_get(), brcmf_msgbuf_buf_put(). The map-based brcmf_msgbuf_alloc_pktid() is gone.
  • Posting a frame (the tx worker) and its completion (the interrupt thread) run concurrently. The pools now track posted buffers in a host-side bitmap, so a completion that names a buffer already back in the pool doesn't return it twice and overrun the free list.
  • Upstream brcmfmac maps skb->data the same way for transmit and has nothing that keeps the mapping to the frame.
Evidence
  • ./linux-build/build kernel linux-brcmf-fixes -- -j4 W=1 drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.o with CONFIG_ARM64_16K_PAGES=y, CONFIG_BRCMFMAC=m, CONFIG_BRCMFMAC_PCIE=y: no warnings.
  • scripts/checkpatch.pl --strict: no errors or warnings; only "multiple blank lines" checks, which follow the file's existing two-line spacing between functions.
  • Base: wifi: brcmfmac: msgbuf: receive into pages that hold only receive buffers #3205 head 764aec53fd69.

A frame to send was mapped where the stack left it, in an skb head that
shares its page with other kernel memory. The IOMMU maps the whole page,
16 KiB with 16K pages, so the device could read whatever else was in it.

Copy each frame, after the Ethernet header that goes in the descriptor,
into a buffer from a pool of pages that hold only transmit buffers and
stay mapped to the device for reading. There is one buffer per transmit
packet id, so as many frames can be in flight as before. One copy now
replaces the map and unmap of every sent frame. A frame too long for a
buffer, which the MTU does not allow, is dropped and counted.

The receive pool code is now shared by both directions. The pools also
track in host memory which buffers are posted, so a completion that
names a buffer already returned cannot return it twice.

Signed-off-by: Dj <[email protected]>
@DjDeveloperr
DjDeveloperr requested review from a team as code owners November 26, 2026 08:11
@github-actions github-actions Bot added area:wireless Area from CODEOWNERS (bot) blast:m1 Macs affected, from Merge risk (bot) blast:m2 Macs affected, from Merge risk (bot) blast:m3 Macs affected, from Merge risk (bot) blast:m4 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Nov 26, 2026
@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Merge readiness at e8b43faa: not ready yet

Check Detail
CI at head ok 3 checks passed
Review no needs one approving review from Core or Omarchy Mac (not the author)
Requested changes ok none
Hardware row at head ok comment at e8b43faa
Conflicts ok none
PR text ok Risk: two-way · Macs with Broadcom PCIe Wi-Fi: M1, M2, M3, M4.

Areas: area:gpu, area:wireless

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

@DjDeveloperr

DjDeveloperr commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor Author

Update: the repeat runs show no post-sleep TX drop. The candidate's 188.8 Mb/s after sleep in the single run below was radio variance.

Code tested: #3205 at 764aec53fd69 and #3210 at 3a7583863c72. The current heads, a0ab00a770c0 (#3205) and ac0d28980ac4 (#3210), change only tools/asahi/brcmf-assoc-tests.py and brcmf-recovery-tests.py, so the kernel code is the same.

How it was run: two more guarded one-shots on the default cmdline, the same day on the same Mac and the same 5 GHz access point (5785 MHz).

The order was AB (control boot, then candidate boot), not ABBA. Each boot ran:

  • 4 rounds of 200 MB each way;
  • one RTC s2idle sleep/wake, then 50 MB each way;
  • 3 more rounds of 200 MB each way.

Figures are Mb/s.

mini TX before sleep mini TX after sleep (3 × 200 MB) mini RX before sleep mini RX after sleep
control 257.4, 249.3, 240.2, 239.4 (median 244.8) 214.9, 259.3, 251.8 (251.8) 263.0, 229.8, 261.7, 237.0 (249.4) 277.3, 257.8, 259.6 (259.6)
candidate 217.1, 248.2, 240.4, 164.1 (median 228.8) 253.9, 202.1, 251.4 (251.4) 228.0, 239.6, 229.4, 242.6 (234.5) 244.3, 224.0, 248.8 (244.3)

The 50 MB round right after wake: TX 249.6 (control) vs 245.6 (candidate), RX 194.0 vs 203.3.

Each arm has one or two dips of 15–30 % in either direction; the candidate's lowest single round is before sleep. The candidate's medians are 3–7 % lower in three of the four columns, but there's only one boot per arm (AB, not ABBA) and single rounds swing far more than that, so I wouldn't read it as a regression. Post-sleep TX medians are equal.

Health:

  • wld0 rx errors, length errors, crc and missed: +0 on every round on both boots.
  • 0 "No PKTID available", "Failed to alloc SKB" and "too long to send" lines.
  • "using bidirectional receive DMA" on both.
  • s2idle: suspend success +1, same boot, reassociated, 0 failed units.
  • 0 DART/IOMMU faults and 0 PCIe error lines.

Both boots returned to the stock kernel, and the kits were removed from the Mac.


Earlier run (single rounds):

J773g (M4 Mac mini, BCM4388) at 3a7583863c72: PASS. The same build also covers #3205, whose head 764aec53fd69 is this branch's parent.

How it was run: two guarded one-shots on the default cmdline.

Test: BCM4388, Wi-Fi only, 5 GHz (5785 MHz) on the same access point for both boots. iperf3 isn't installed on the mini or the peer, so throughput comes from a minimal TCP sender/receiver run against a LAN peer: 200 MB each way, then one RTC s2idle sleep/wake, then 50 MB each way.

mini TX (iperf3 -c direction) mini RX
control, 200 MB 212.6 Mb/s 233.0 Mb/s
candidate, 200 MB 263.4 Mb/s 225.6 Mb/s
control, 50 MB after sleep 257.4 Mb/s 250.0 Mb/s
candidate, 50 MB after sleep 188.8 Mb/s 232.5 Mb/s

These are single over-the-air runs with no repeats, so the spread (±20 %) is radio variance: no direction is consistently lower on the candidate.

@DjDeveloperr

DjDeveloperr commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor Author

Verdict at ac0d28980ac4: ready (code). It stacks on #3205, and the J773g row on it covered this head's code.

Blockers: none. The host-test breakage it shared with #3205 is fixed by #3205's stub commit, which is merged into this branch (no force-push). msgbuf.c is unchanged from 3a7583863c72. Nothing calls the old three-argument brcmf_msgbuf_get_pktid() stubs any more, and they're gone.

Checked

  • brcmf_msgbuf_alloc_tx_pktid() (msgbuf.c:602) copies the frame after its Ethernet header into a 2 KiB buffer of a DMA_TO_DEVICE pool and syncs only the copied bytes. The device can read only pool pages, which hold frames it has already been given. brcmfmac sets no NETIF_F_SG and caps the MTU at 1500, so frames are linear and fit. The -EMSGSIZE path (1136) finalizes the skb as an error and moves on, and brcmf_txfinalize() handles a NULL ifp.
  • One buffer per TX packet id (2048 × 2 KiB) keeps the in-flight limit as it was. When the pool runs out, the existing reinsert and back-pressure path takes over. The reserve-failure path gives the buffer back through brcmf_msgbuf_get_pktid().
  • Completion (688-700) returns the buffer and hands back the skb as before. release_array() now frees only unsent skbs, and the pools go as a whole.
  • The busy bitmap in brcmf_msgbuf_buf_put() (555) keeps a repeated completion from putting a free buffer on the free list twice, so the free list can't overflow.
  • No runtime switches and no SoC or board gates. The pool sizes come from NR_TX_PKTIDS and BRCMF_MSGBUF_MAX_PKT_SIZE.

Not blockers:

  • The bitmap doesn't help when a bogus completion names a packet id that the TX worker is posting right then. pool and buf are still the previous user's, so that buffer can be put back while another frame holds it. The damage stays inside the pool. On a packet id never used before, pool is NULL. The old code dereferenced a NULL skb at the same point, so this isn't new.
  • The chunk-size note on wifi: brcmfmac: msgbuf: receive into pages that hold only receive buffers #3205 applies here too.
Evidence
  • tools/asahi/run-host-tests.py --only brcmf at ac0d28980ac4: 46/46 passed, mutations included.
  • make W=1 drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.o (asahi profile, 16K pages, LLVM=1, arm64) at 3a7583863c72, the same msgbuf.c: builds, no warnings. checkpatch.pl --strict on the TX commit: 0 errors, 0 warnings, 2 blank-line checks.

@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

J516s (MacBook Pro 16" M3 Pro, BCM4388/4, 16K pages, 27.2 stub) row for #3210 at 3a7583863c72, which carries #3205's 764aec53fd69: PASS. The candidate was main 9a9862253576 + #3180, #3195, #3196, #3021, #3210 (no file overlap), booted one-shot twice. The control was main alone: 9a9862253576 and b12781353833, whose brcmfmac is identical. iperf3 ran over Wi-Fi to a host on the same network, 210 MB per run. Receive (into the J516s): 240, 239, 246 and 240 Mb/s with the PRs, against 240, 209, 216 and 241 on main. Transmit: 186, 186, 168 and 186 Mb/s, against 239, 168, 210 and 140 on main. Wi-Fi varies a lot, and the transmit runs sit inside main's spread. With the PRs, using bidirectional receive DMA is logged (it is on main too), rx_errors and rx_length_errors on wld0 stayed at 0, and there were no "too long to send", "No PKTID available" or "Failed to alloc SKB" lines and 0 DART/IOMMU faults. 0 failed units, and no new kernel error lines beyond dwc3-apple's s2idle refusal (also on main) and the MTP HID "no listeners" line the baseline logs. The sleep step was skipped because s2idle is refused at prepare on the J516s.

@github-actions github-actions Bot added the needs-hw-row No hardware row at the PR head (bot) label Nov 29, 2026
A completion took a non-NULL pktid->skb as proof that a TX slot was
ready. brcmf_msgbuf_alloc_tx_pktid() stores skb before pool and buf and
the completion read them with plain loads, so on arm64 a completion that
names a slot still being filled could see the new skb with the old pool
or buffer, or the old fields with a claim already set.

Give the slot three states. Claiming moves it FREE -> RESERVED; the
allocators move it to READY with a release store after every field is
written; completions acquire the state and read the fields only on
READY. A completion for a RESERVED slot is stray and leaves the slot,
its buffer and its skb to the TX worker. Teardown frees only the frames
of READY slots. RX slots follow the same states.

Add brcmf-msgbuf-pktid-tests.py: it runs the production claim, fill,
completion and teardown code with a completion delivered in the middle
of the fill, and five mutations of the ordering.

Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide

Copy link
Copy Markdown
Contributor

Pushed d532011 for the App's ready-state finding. A pktid slot now has three states. Claiming moves it FREE -> RESERVED. brcmf_msgbuf_alloc_tx_pktid() (and the RX allocator) write skb, pool, buf and physaddr, then publish READY with atomic_set_release(). The completions use atomic_read_acquire() and read the fields only on READY. A completion for a RESERVED slot is logged (WARN_ON_ONCE on TX) and leaves the slot, its buffer and its skb to the TX worker. Teardown frees only READY slots' frames.
Tests: new tools/asahi/brcmf-msgbuf-pktid-tests.py runs the production claim, fill, completion and teardown code. It delivers a completion in the middle of a TX fill and of an RX fill, checks that publishing comes after every field with a release and that the completion takes an acquire, and kills 5 ordering mutations. make ARCH=arm64 LLVM=1 W=1 of brcmfmac/ builds with no warnings.
Still needed: green CI, App re-review, and one J316s or J413 iperf + s2idle row at d532011. Thanks @DjDeveloperr.

@github-actions github-actions Bot added area:gpu Area from CODEOWNERS (bot) and removed ci-failing A check failed at the PR head (bot) needs-hw-row No hardware row at the PR head (bot) labels Nov 29, 2026

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Verdict: FIX, then re-review at d532011d

Blockers:

  1. Concurrent brcmf_msgbuf_get_pktid() vs TX-ring-full rollback use-after-free / double-free of skb (drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c L647, L726–L755, L1181–L1201):
    • brcmf_msgbuf_alloc_tx_pktid() publishes BRCMF_MSGBUF_PKTID_READY at L647 before brcmf_msgbuf_txflow() calls brcmf_commonring_reserve_for_write(commonring) at L1196.
    • If brcmf_commonring_reserve_for_write() returns NULL (ring full), the TX worker rolls back via brcmf_msgbuf_get_pktid(msgbuf->tx_pktids, pktid); brcmf_flowring_reinsert(flow, flowid, skb); (L1198–L1199), while the NAPI/DPC completion path (brcmf_msgbuf_process_txstatus(), L1371) can concurrently call brcmf_msgbuf_get_pktid(msgbuf->tx_pktids, idx) for a stray/adversarial firmware completion naming that same pktid:
      • Race A (overlapping calls): brcmf_msgbuf_get_pktid() checks atomic_read_acquire(&pktid->allocated) == BRCMF_MSGBUF_PKTID_READY without an atomic ownership claim (atomic_cmpxchg_acquire to an intermediate/claimed state). Both the completion thread and the TX rollback thread can observe READY simultaneously and consume the same slot; the completion thread frees skb via brcmf_txfinalize() while the TX worker reinserts the same skb (and a second brcmf_msgbuf_buf_put() can race against a freshly re-allocated buffer if the first thread already set FREE).
      • Race B (completion wins before rollback): Even without overlap, if a stray completion consumes the READY slot between L647 and L1198, brcmf_msgbuf_process_txstatus() frees skb; then L1198 gets NULL from brcmf_msgbuf_get_pktid(), ignores the NULL return value, and calls brcmf_flowring_reinsert(flow, flowid, skb) on the already-freed skb.
    • Fix: Either keep the TX slot in BRCMF_MSGBUF_PKTID_RESERVED until brcmf_commonring_reserve_for_write() succeeds (releasing the RESERVED slot directly on !ret_ptr so a stray completion can never touch an unposted TX slot), and/or make brcmf_msgbuf_get_pktid() claim READY atomically via atomic_cmpxchg_acquire so at most one consumer can ever claim a READY slot, and only call brcmf_flowring_reinsert() if rollback actually reclaimed the skb. Extend tools/asahi/brcmf-msgbuf-pktid-tests.py to cover a stray completion arriving during the !ret_ptr rollback window.
  2. Complete green hosted CI and post the fresh J316s or J413 iperf + s2idle hardware row at the updated head.

Checked:

  • Audited 69bfe623..d532011d (drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c, tools/asahi/brcmf-msgbuf-pktid-tests.py, tools/asahi/run-host-tests.py) and all callers of alloc_tx_pktid, alloc_rx_pktid, get_pktid, get_rx_pktid, and release_array.
  • The FREE -> RESERVED -> READY (atomic_set_release) / atomic_read_acquire publication fixes the fill-window partial-field visibility bug on arm64 for both TX and RX allocators, and teardown (brcmf_msgbuf_release_array) cleanly frees only READY slots.
  • DCO Signed-off-by: present on d532011d; no Apple material or policy issues.
Evidence
  • msgbuf.c L647 sets BRCMF_MSGBUF_PKTID_READY inside brcmf_msgbuf_alloc_tx_pktid(), before brcmf_commonring_reserve_for_write() at L1196.
  • msgbuf.c L1197–L1200 ignores the return value of brcmf_msgbuf_get_pktid() and unconditionally reinserts skb.
  • msgbuf.c L726 checks atomic_read_acquire(&pktid->allocated) without transitioning state atomically before reading skb/pool/buf and putting buf.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Merge-train review at d532011d: Verdict: merge after a second Wi-Fi family row. msgbuf.c transmit-buffer page isolation runs on every brcmfmac Mac, and the only row is the J773g (BCM4388-class). Before merge I need one other chip family at this head, J413 (M2) or J316s (M1 Pro): iperf3 TX/RX 60 s both ways before and after one s2idle, no msgbuf or pktid errors in dmesg, and no throughput drop beyond run-to-run noise. The host-test suite (brcmf-msgbuf-pktid-tests.py) is noted. <@422957901716652033>, your J516s row also counts if you have it.

…ring slot

brcmf_msgbuf_get_pktid() only checked READY, so the TX worker's ring-full
rollback and a completion naming the same packet id could both take the
skb, and the slot was READY before brcmf_msgbuf_txflow() had a ring slot
for it, so a stray completion in that window freed an skb the worker then
reinserted.

Keep the TX slot RESERVED until its message is in the ring and publish it
there; on a full ring give the slot back directly, without going through
the completion path. A completion now takes a READY slot with a cmpxchg to
CLAIMED, TX and RX, so only one consumer ever gets its skb and buffer.

The host test covers a stray completion before and inside the rollback, two
interleaved completions for one id, and a threaded rollback/post stress,
with two new mutations.

Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide

Copy link
Copy Markdown
Contributor

Pushed 69f3a4a on top of d532011 for the App's pktid points. The TX slot now stays RESERVED until brcmf_msgbuf_txflow() has its ring slot and is published there (after the last skb access); a full ring gives the slot back directly instead of going through brcmf_msgbuf_get_pktid(), so a stray completion in that window gets nothing and the worker keeps its skb. Completions (TX and RX) now claim a READY slot with atomic_cmpxchg_acquire(READY -> CLAIMED), so only one consumer ever takes the skb and buffer.
Tests: tools/asahi/brcmf-msgbuf-pktid-tests.py adds a stray completion before and inside the ring-full rollback, two interleaved completions for one id, and a threaded rollback/post stress; new mutations publish-before-reserve and no-claim are both killed (run-host-tests 8/8). brcmfmac builds clean with W=1 (arm64, LLVM).
Still needed: green CI, an App re-review at 69f3a4a, and one J316s or J413 iperf + s2idle row at this head. Thanks @DjDeveloperr.

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Verdict: HOLD at 69f3a4af — the d532011d TX-slot concurrency and rollback blockers are cleanly resolved; awaiting hosted CI completion and exact-head hardware rows (including a second Wi-Fi chip family).

Blockers:

  1. Wait for hosted CI checks at 69f3a4af (apple-build, host-tests, kunit, pr-text, readiness) to complete green.
  2. Post the exact-head 69f3a4af hardware row on a second Wi-Fi chip family (e.g. J316s or J413: 60 s bidirectional iperf3 before and after s2idle, zero msgbuf/pktid errors, neutral throughput) alongside J773g confirmation if re-run.

Checked:

  • Verified commit 69f3a4af in drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c resolves both races flagged at d532011d:
    • brcmf_msgbuf_alloc_tx_pktid() now leaves the TX slot in BRCMF_MSGBUF_PKTID_RESERVED; on brcmf_commonring_reserve_for_write() failure in brcmf_msgbuf_txflow(), brcmf_msgbuf_unclaim_tx_pktid() clears pktid->skb, returns the pool buffer, and releases the slot RESERVED -> FREE (atomic_set_release) directly so no stray completion can touch skb or the buffer.
    • On ring reservation success, brcmf_msgbuf_post_tx_pktid() publishes RESERVED -> READY (atomic_set_release) after the last skb read (skb->priority, skb->data, skb->len) and atomic_inc(&commonring->outstanding_tx) and strictly before brcmf_commonring_write_complete().
    • Both brcmf_msgbuf_get_rx_pktid() and brcmf_msgbuf_get_pktid() atomically claim READY -> CLAIMED via atomic_cmpxchg_acquire(), ensuring a single consumer extracts skb/pool/buf before CLAIMED -> FREE (atomic_set_release).
    • brcmf_msgbuf_release_array() teardown remains consistent with the 4-state machine (FREE/RESERVED/READY/CLAIMED).
  • Audited tools/asahi/brcmf-msgbuf-pktid-tests.py: covers stray completions before and during ring-full rollback, concurrent duplicate TX and RX completions, threaded rollback/post stress with real atomics, and kills both publish-before-reserve and no-claim mutations (8/8 pass reported, brcmfmac W=1 clean).
Evidence
  • drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c: audited L362–365, L629–686, L707–823, and brcmf_msgbuf_txflow() L1220–1280 (brcmf_msgbuf_alloc_tx_pktid() is called exclusively from brcmf_msgbuf_txflow()).
  • tools/asahi/brcmf-msgbuf-pktid-tests.py: verified deterministic interleaving hooks (stray_at_reserve, second_completion), threaded stress(false)/stress(true), and mutation checks.
  • Reported local verification at 69f3a4af: run-host-tests 8/8, brcmfmac W=1 clean on arm64 LLVM.

@RyanTheTide

Copy link
Copy Markdown
Contributor

69f3a4a J316s (M1 Pro, T6000, BCM4387) PASS: combined guarded one-shot 7.3.0-aurora-peer1+ on main 498d53fd (msgbuf.c byte-identical to 69f3a4afb64e, default cmdline, saved Stage 2 unchanged); pre-sleep 60s TCP TX 191.46 Mbps (1.44 GB) + 60s RX 135.11 Mbps (1.02 GB), s2idle 1/1 (rtc1), post-sleep 30s TX 238.93 Mbps + 30s RX 128.62 Mbps, 0 msgbuf/pktid/brcmfmac errors, VK api.smoke 8/8, Enforcing, 0 AVC, 0 failed units; restored saved 7.3.0-aurora-edge.

@github-actions github-actions Bot added the ci-failing A check failed at the PR head (bot) label Nov 29, 2026
@RyanTheTide

Copy link
Copy Markdown
Contributor

Row (J316s, M1 Pro, T6000) at exact head 69f3a4a in combined candidate 77b87daa (main de965eb + #3277 542bbdc + #3231 c955307 + #3210 69f3a4a), kernel 7.3.0-aurora-crj7+ (fleet edge config), kernel-only one-shot with the saved Stage 2 and the default command line -> PASS (TCP + s2idle, no pktid errors).

  • Before sleep on 5 GHz (-64 dBm): ping 20/20, avg 3.05 ms; TCP to the build host 60 s TX 186.8 Mbit/s, 60 s RX 114.5 Mbit/s. On the saved production kernel the same link gave 137.6 / 116.9 Mbit/s (30 s each).
  • One s2idle with a 15 s PMU RTC wake: 1 success / 0 fail. Default route back 2 s after resume.
  • After sleep: ping 10/10, avg 2.59 ms; 30 s TX 207.5 Mbit/s, 30 s RX 117.2 Mbit/s.
  • 0 brcmf msgbuf/pktid lines and 0 brcmf err/warn lines. 0 WARN/BUG/Oops. The only new kernel error lines are two dwc3-apple "genpd_prepare returns -11" at sleep entry, and the sleep itself succeeded. The trial boot was Enforcing with 0 failed units and the saved command line.

Evidence: traces/kernel/20261130-closeout-k114s-j316s-combo/m1pro/. Saved kernel 7.3.0-aurora-edge restored and verified.

@RyanTheTide

Copy link
Copy Markdown
Contributor

I merged current main into this branch (e8b43faa, normal push, no rebase, your commits unchanged). The last CI failures came from main itself on 11-29: the apple-scaler-recovery and g17-compute-owed-stamp fixtures, plus the apple-dcp harness break fixed in #3672. Re-running a job would reuse the old merge commit, so a fresh merge was the only way to clear them. Both merges were conflict-free. Host tests pass on the merged tree. The PR's own code is unchanged from 69f3a4af, so the existing hardware rows still cover it. Next: CI at this head and the review app's verdict.

@github-actions github-actions Bot added needs-hw-row No hardware row at the PR head (bot) and removed ci-failing A check failed at the PR head (bot) labels Nov 30, 2026

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Verdict: HOLD at e8b43faa.

Checked: Compared the PR patch before and after the forward merge. The file set and added and removed lines match the reviewed revision. Hosted checks and a second Wi-Fi family before and after s2idle remain due; keep the TX completion and rollback coverage.

@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

PASS — J773g (M4 mini, BCM4388) second Wi-Fi family row at e8b43faa1cb9cf122cbe53be410cf963b781c568. The iperf3 transfers ran in full before and after one s2idle, with 0 msgbuf/pktid errors.

  • Kernel: this head on the current main J773g config (release 7.3.0-ARCH-m4k3210-e8b43faa), brcmfmac loaded from it.

  • Chip: BCM4388/6, firmware 23.10.1042.0.41.51.242 (brcmfmac4388c2-pcie), on Welcome 89 at VHT-MCS 9 80 MHz, 2 spatial streams.

  • iperf3 3.22.1, 60 s each way against a host on the same network. Receiver rates in Mb/s:

    TX RX
    before s2idle 87.8 118.0
    after s2idle 209.3 194.8
  • s2idle: rtcwake -m freeze -s 15 on the PMU RTC (/dev/rtc1, apple,t8132-pmu-rtc; rtc0 has no wakeup on J773g). One cycle; the device resumed and both directions ran again.

  • Kernel log: 0 msgbuf or pktid errors, and no new warnings. The Mac returned to its saved stock kernel afterwards and the stock checks passed.

@github-actions github-actions Bot removed the needs-hw-row No hardware row at the PR head (bot) label Nov 30, 2026

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Verdict: MERGE at e8b43faa

Blockers: none

Checked:

  • Clean conflict-free forward merge e8b43faa of main (MERGEABLE, 3 files, +798/-124, PR patch byte-identical to reviewed 69f3a4af where TX-slot concurrency and rollback blockers were resolved; 46/46 brcmf host tests with all mutations killed).
  • CI at e8b43faa: Host tests (46340514381), pr-text (46340518151), and pr-readiness (46341028825) all passed.
  • Dual Broadcom Wi-Fi chip-family hardware proof (pre- and post-s2idle):
    • J316s (M1 Pro, T6000): identical 69f3a4af patch — 60 s TCP TX 186.8 / RX 114.5 Mbit/s pre-sleep, s2idle 1/1 (15 s PMU RTC wake), 30 s TX 207.5 / RX 117.2 Mbit/s post-sleep, 0 brcmf msgbuf/pktid/err/warn lines, 0 WARN/BUG/Oops.
    • J773g (M4 mini, T8132, BCM4388/6): exact head e8b43faa1cb9cf122cbe53be410cf963b781c568 — 60 s iperf3 TX 87.8 / RX 118.0 Mb/s pre-sleep, s2idle 1/1 (rtc1 15 s wake), TX 209.3 / RX 194.8 Mb/s post-sleep, 0 msgbuf/pktid errors.
Evidence
  • Both remaining blockers from the prior HOLD at e8b43faa (hosted CI completion and second Wi-Fi chip family pre/post-s2idle verification) are cleared by Host tests passing and the 2026-11-30T20:53:33Z J773g BCM4388 row.

@RyanTheTide

Copy link
Copy Markdown
Contributor

code-owner ping <@422957901716652033>: merge train at e8b43faa. App re-approved; second Wi-Fi family covered: J316s (T6000) at 69f3a4a, which differs from this head only by the main merge, plus your J773g row at e8b43fa. Merges under the 6-point rule 1 h from now once hosted CI (and the KUnit proof) is green.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Merging under the 6-point rule (Ryan 09:29, permanent), at e8b43faa. (1) The review App approved at this head. (2) Full CI is green. (3/4) Rows: J773g(e8b43fa)+J316s(69f3a4a,main-merge-only-diff). (5) There's no blocking review. (6) Dj was pinged here 73 min ago with no objection. Revert: git revert -m 1 <merge>.

@RyanTheTide
RyanTheTide merged commit fe9af4b into main Nov 30, 2026
6 checks passed
@RyanTheTide
RyanTheTide deleted the fix/brcmfmac-tx-own-pages branch November 30, 2026 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:gpu Area from CODEOWNERS (bot) area:wireless Area from CODEOWNERS (bot) blast:m1 Macs affected, from Merge risk (bot) blast:m2 Macs affected, from Merge risk (bot) blast:m3 Macs affected, from Merge risk (bot) blast:m4 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants