AdapterCaps declares no maximum frame size — the limit is per-backend, unannounced, and fails silently on at least one
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- c
- Lĩnh vực
- backend, networking
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- C
- Star
- 56
- Fork
- 29
- Merge trung bình
- 3 giờ 43 phút
- Pull request đã merge (30 ngày)
- 75
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của OpenIPC/devourer
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Follow-ups left open by the 8822B fast bandwidth toggle fix (#584)Có thể đã có người làm @josephnef đã nhận hôm nay. Đang mởenhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 12/100
OpenIPC/devourer#579 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 12/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 8/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của OpenIPC/devourer
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Needs-Triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 2 ngày
-
issue: bug report
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 2 ngày
-
cross-platform fix-now
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
feature:index kind:crash status:confirmed triaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
clice-io/clice#1123 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày