Skip to content

fix(egfx): respect client frame acknowledgement limits - #2102

Open
Piclaw (piclaw-bot) wants to merge 1 commit into
Devolutions:masterfrom
rcarmo:review/egfx-frame-ack
Open

Piclaw (piclaw-bot) wants to merge 1 commit into
Devolutions:masterfrom
rcarmo:review/egfx-frame-ack

Conversation

@piclaw-bot

Copy link
Copy Markdown
Contributor

A client advertising a one-frame ACK window can currently be sent frames using the server's larger configured window. An AVC producer also receives the same None for a full window as for a permanent submission error, which makes ordinary backpressure difficult to handle without replacing the encoder.

This PR is based directly on master and is independent of #1413. It contains no credential, binder or acceptor changes.

  • Apply the nonzero core Frame Acknowledge capability as a ceiling on the operator-configured EGFX window, including legacy graphics factories. Configured zero remains unlimited only when the client has no ceiling; resize preserves the negotiated ceiling.
  • Reject unknown/stale ACKs before they can suspend or mutate tracking. Preserve valid suspension/resumption for frames issued in the current channel generation, and clear channel-owned state on close.
  • Report client queue depth as Unavailable: our client counts frames, while the protocol field measures bytes. This is distinct from Suspend.
  • Add typed AVC420, AVC444 and AVC444v2 submission errors, including Backpressured, while retaining the existing Option methods as compatibility wrappers. Mixed-codec send APIs are unchanged.

WRDP exposed the configured-three/client-one case during desktop dragging. These changes let the producer retain its encoder and retry/recover after an ACK instead of treating backpressure as encoder failure.

Focused checks passed locally (Rust 1.96; the repository pins 1.94.1):

cargo test -p ironrdp-egfx --lib                               # 55 passed
cargo test -p ironrdp-testsuite-core --test integration_tests_core -- egfx::server  # 92 passed
cargo test -p ironrdp-server --lib --features egfx -- frame_ack # 2 passed
cargo test -p ironrdp-server --lib --features egfx -- gfx::tests # 2 passed
cargo fmt --all
git diff --check

Regressions cover window/zero semantics, activation clamps, resize, legacy factories, stale suspend/resume ACKs across close/reopen, restored tracking after valid resume, and typed rejection without queued output. A read-only review caught the legacy-factory and suspended-ACK resume paths; both are corrected and covered here.

Happy to adjust the additive error API to the project's preferred shape during review. This PR can be reviewed and merged separately from the session-binding work.

@github-actions github-actions Bot added kind/protocol Affects RDP or related protocol behavior risk/high Substantial core public API impact, or fail-closed triage; needs maintainer-level scrutiny scope/core Touches the core architectural tier scope/cross-cutting Spans multiple architectural boundaries size/L Size: up to 899 counted lines and 20 files; exceeds M in either measure labels Oct 8, 2026

This branch was successfully deployed

1 active deployment
llm-providers — 72b8bd94 Deployed Oct 8, 2026 by piclaw-bot via Classify pull request #2186
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/protocol Affects RDP or related protocol behavior risk/high Substantial core public API impact, or fail-closed triage; needs maintainer-level scrutiny scope/core Touches the core architectural tier scope/cross-cutting Spans multiple architectural boundaries size/L Size: up to 899 counted lines and 20 files; exceeds M in either measure

Development

Successfully merging this pull request may close these issues.

2 participants