Skip to content

atbm606x-openipc: RX copies from kmalloc, as the other ATBM drivers since #2790 - #2791

Merged
widgetii merged 1 commit into
masterfrom
atbm606x-rx-copies-kmalloc
Nov 7, 2026
Merged

widgetii merged 1 commit into
masterfrom
atbm606x-rx-copies-kmalloc

Conversation

@widgetii

@widgetii widgetii commented Nov 7, 2026

Copy link
Copy Markdown
Member

Problem

#2455: the AltoBeam drivers copied each received frame with dev_alloc_skb(), which carves it out of a 32 KiB page-frag block. One frame left queued keeps the whole block alive, while its socket is charged a few hundred bytes. #2790 fixed this in atbm-wifi, atbm60xx and atbm603x-comb-openipc. This PR does the same for the Wi-Fi 6 drop, which the xm535d2 uses.

atbm606x-openipc moves to OpenIPC/atbm_60xx 8189706, a commit on OpenIPC/atbm_60xx#5. That is the atbm606x branch the current pin 5379d2a already comes from. The change is alloc_skb() in atbm_alloc_bh_skb() (802.11 frames) and in wsm_rx_alloc_8023_frame() (frames the chip hands over as 802.3).

Hardware tested on

Not run on a camera. qemu-bench doesn't model this Wi-Fi 6 chip, so this drop isn't measured. The same change, measured on the other drops, took an OOM within 30 s to flat (#2790).

Evidence

xm535d2_lite built with this source: atbm606x_wifi_usb.ko builds, uImage 1104/2048 KB, rootfs 2664/5120 KB. The archive at the new pin is served through openipc/atbm_60xx (HTTP 200), as the old pin is.

Scope

  • No kernel patches under general/package/all-patches/linux/ (those go to OpenIPC/linux)
  • No files specific to a single retail camera model (those go to OpenIPC/builder)
  • No probing or bring-up tooling (that goes to OpenIPC/ipctool)
  • Nothing under general/overlay/ or in a shared load_<vendor> script hardcodes a value specific to my board
  • Package sources come from an OpenIPC repository, and any version bump keeps at least the specificity of the pin it replaces (a new package should pin a full 40-character SHA)
  • No LD_PRELOAD, and no binaries that cannot be rebuilt from source
  • New code is selected by a defconfig, so CI actually builds it

…ince #2790

OpenIPC/atbm_60xx 8189706 (on #5, the atbm606x branch the current pin
already comes from): atbm_alloc_bh_skb() and wsm_rx_alloc_8023_frame()
copy received frames with alloc_skb() instead of dev_alloc_skb(), so a
frame left queued cannot pin a 32 KiB page-frag block (#2455).
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Pin atbm606x source with independent RX frame allocations

🐞 Bug fix ⚙️ Configuration changes 🕐 10-20 Minutes

Grey Divider

AI Description

• Pins the Wi-Fi 6 driver to an upstream commit that fixes RX frame allocation.
Diagram

graph TD
  P["Pinned source"] --> M["Wi-Fi module"] --> R["802.11 RX"] --> A["alloc_skb copies"] --> Q["Queued frames"]
  M --> E["802.3 RX"] --> A
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Patch the previously pinned source during packaging
  • ➕ Limits the source change to the two RX allocation sites.
  • ➖ Maintains a downstream patch for a fix already available upstream.

Recommendation: Use the upstream pin as proposed to keep the allocation fix with its source and avoid a downstream patch. Review the upstream commit for other changes, since the local diff alone does not show its contents.

Files changed (1) +1 / -1

Bug fix (1) +1 / -1
atbm606x-openipc.mkAdvance the atbm606x upstream source pin +1/-1

Advance the atbm606x upstream source pin

• Changes the full OpenIPC/atbm_60xx commit pin from 5379d2a to 8189706. The newly pinned source is reported to use alloc_skb() for both 802.11 and 802.3 RX copies, preventing queued frames from retaining a 32 KiB page-fragment block.

general/package/atbm606x-openipc/atbm606x-openipc.mk

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (1) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Action required

1. Wi-Fi driver change ships untested on a camera 📘 Rule violation ☼ Reliability
Description
ATBM606X_OPENIPC_VERSION is bumped to a driver commit that changes RX buffer allocation in
atbm_alloc_bh_skb() and wsm_rx_alloc_8023_frame(), but the PR states it was "Not run on a
camera" and offers only a build result. Every xm535d2 image that selects this package picks up the
new receive path, and the OOM measurements cited come from other ATBM drivers, so the fix is
unproven for this chip.
Code

general/package/atbm606x-openipc/atbm606x-openipc.mk[10]

+ATBM606X_OPENIPC_VERSION = 81897066d589a3e3e00db07c2bb0f3e58aae192e
Evidence
The diff changes the pinned Wi-Fi driver version, which alters receive-path behaviour on a camera.
The PR description says the change was not run on a camera and gives only a build result, which is
the failure case for the hardware-evidence gate.

Rule 3: Hardware evidence is present and honest
general/package/atbm606x-openipc/atbm606x-openipc.mk[10-10]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The PR bumps `ATBM606X_OPENIPC_VERSION` to `81897066d589a3e3e00db07c2bb0f3e58aae192e`, which changes the RX allocation path of the atbm606x Wi-Fi driver. The PR description says it was not run on a camera and gives only a build result, so the effect on camera behaviour is unverified.
## Fix Focus Areas
- general/package/atbm606x-openipc/atbm606x-openipc.mk[10-10]
## Recommended Fix
Run an xm535d2 (or another board using this driver) with the new pin. Capture the symptom it addresses, for example RX memory growth or OOM under sustained Wi-Fi receive, before and after the bump, with dmesg and memory counters over a sustained run. Put that output in the PR description, or state plainly that the change is untested on hardware and hold the merge until it is.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Tip of the day
💡 Did you know, you can hide the parts of a finding you never read, like the evidence or the agent prompt

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@widgetii
widgetii merged commit 12c1ccf into master Nov 7, 2026
34 of 35 checks passed
@widgetii
widgetii deleted the atbm606x-rx-copies-kmalloc branch November 7, 2026 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant