AdapterCaps declares no maximum frame size — the limit is per-backend, unannounced, and fails silently on at least one
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- c
- 領域
- backend, networking
調査の方向性
Start with src/AdapterCaps.h and the referenced send-path limits in src/PcieTransport.cpp, src/jaguar1/RtlJaguarDevice.cpp, and the MT7612U work in #412. The issue proposes separate TX/RX MPDU fields with 0 meaning unknown, then backend-specific limit discovery; begin by checking the cited constants and register information. Done means the shared API exposes honest limits without inventing defaults, with unknown backends left at 0.
索引モデルが issue の本文から書いたものです。
説明
AdapterCaps reports chains, bandwidths, bands, per-packet TX power, narrowband and fast-retune — but nothing about how large a frame the adapter will accept or return. IRtlDevice::send_packet (src/IRtlDevice.h:214) declares no length contract either, and TxCaps has no length field. A consumer sizing frames has to guess, and on at least one backend guessing wrong fails silently.
This is a cross-backend question, which is why it is an issue rather than a change: no single backend can answer it, and a wrong shared default would be worse than the current absence.
The limit exists, differs per transport, and is announced nowhere
PCIe already enforces a hard ceiling. TX_BOUNCE_SZ = 32 * 1024 (src/PcieTransport.cpp:85) and if (len < TX_PKT_DESC_SZ || len > r.bounce_len) return false; (:569). Correct, and invisible to a caller.
The Realtek USB backends have no fixed ceiling of their own. RtlJaguarDevice::send_packet builds std::vector<uint8_t> usb_frame(TXDESC_SIZE + (length - rlen), 0) (src/jaguar1/RtlJaguarDevice.cpp:752) — sized to the frame, so whatever the chip and firmware accept is what happens. That is a reasonable design, but it means the real limit is undocumented and, as far as I can tell, unmeasured. I have not measured it and am not claiming a number.
MT7612U (#412) is the one I do have numbers for, and it is the case that makes the argument:
- TX is not the constraint. Against an RTL8812AU witness the part transmitted every size tested up to 7900 bytes, 60/60 at each, zero CRC errors — far past 802.11's 2304-byte non-A-MSDU MPDU ceiling. The backend's own 2048-byte buffer was a constant nobody had checked.
- RX is the constraint, and it is the MAC's.
MT_MAX_LEN_CFG(0x1018) carries the maximum on-air length in its low 12 bits including the 4-byte FCS. At the0xf00that driver programs, that is 3840 on air, so 3836 bytes of MPDU. Measured to the byte: 3836 arrives, 3837 does not. - Above that, the loss is invisible by construction. The MAC discards the frame before it reaches USB: no transfer completes,
rx_errstays 0, and a drop counter added specifically to catch it does not move either. That was verified rather than assumed — TX ceiling temporarily raised, 60 × 6000-byte frames sent MT7612U-to-MT7612U, 0 received, every counter zero.
Caveats on those numbers, since they are one bench: one witness generation (a single RTL8812AU), and the 7900 figure is "at least", not a located ceiling — I stopped at the buffer I had, not at a refusal.
Until recently that backend also had two disagreeing ceilings behind one public API — send_packet refused above 2016 bytes while send_packets bounded only against its 16 KB aggregate buffer, so the same frame was refused by one entry point and aired by the other. That is fixed, but it is the shape of bug the absence of a declared limit invites.
Why a consumer cares
Anything choosing a frame size against a link budget — video payloads, an ARQ block size, A-MSDU or A-MPDU dimensioning — is trading per-frame overhead against loss probability. Today that choice is made blind, and portable code has to assume the smallest limit anyone might have. On MT7612U the penalty for guessing high is not an error return; it is a receiver that appears to work while dropping the large frames.
Proposed shape
Two uint16_t in AdapterCaps, alongside the existing bw_mask:
uint16_t max_mpdu_tx; /* largest MPDU this backend will submit, excl. FCS */
uint16_t max_mpdu_rx; /* largest MPDU it will hand back, excl. FCS */
Separate, because on MT7612U they genuinely differ (4064 vs 3836) and collapsing them to one number would either understate TX or overstate RX.
The trap to avoid: do not give this a plausible default. bw_mask_for_generation() (src/AdapterCaps.h:80) can have a sensible per-generation default because the widths are known for every family; frame limits are not. A default of 2304 or 4095 would be wrong somewhere and would read as authoritative — a gauge with no reference behind it. 0 should mean "not established on this backend", and a consumer should treat 0 as "assume nothing", not as "zero".
That also makes the field honest to land incrementally: MT7612U can fill it now, and each Realtek family fills it when someone measures or finds the register.
What each backend needs
| backend | TX | RX | how |
|---|---|---|---|
| MT7612U | 4064 | 3836 | done — RX read from MT_MAX_LEN_CFG at runtime, TX is the backend's buffer |
| Jaguar1/2/3, Kestrel, RTL8733B | unknown | unknown | is there a MAX_LEN-equivalent register in the vendor trees, or does it need a size sweep against a witness? |
| PCIe transport | 32 KB − descriptor | n/a | already a constant, just needs surfacing |
The Realtek row is the real work and the reason this is an issue: it is a register hunt across four vendor trees plus a bench sweep, not something to bolt onto a backend PR.
Suggested order
Land the two fields with 0 = unknown and no behaviour change → fill MT7612U (already measured) and the PCIe constant → sweep one Realtek family against a witness to establish the method → apply it to the rest. A bringup mtu-style size sweep already exists in #412 and generalises to any backend that can inject.
Happy to do any part of this; raising it here first because the field is shared and the default question is the maintainer's call, not a backend's.
- 主要言語
- C
- スター
- 56
- フォーク
- 29
- 平均マージ
- 3時間 43分
- マージ済み PR(30日)
- 75
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
OpenIPC/devourer のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
Follow-ups left open by the 8822B fast bandwidth toggle fix (#584)対応中かも @josephnef が今日担当しました。 オープンenhancement
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 12/100
OpenIPC/devourer#579 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 12/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 8/100
メンテナーはふだん 1 日以内に返信
OpenIPC/devourer の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
Needs-Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 2 日以内に返信
-
issue: bug report
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 2 日以内に返信
-
cross-platform fix-now
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
feature:index kind:crash status:confirmed triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
clice-io/clice#1123 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信