Skip to content

h2: RFC 9218 incremental flag unused in priority scheduling #1217

@FlorentinDUBOIS

Description

@FlorentinDUBOIS

Summary

The Prioriser struct in lib/src/protocol/mux/h2.rs stores per-stream (urgency, incremental) tuples per RFC 9218, but the incremental flag is discarded during stream scheduling in write_streams():

priorities.sort_by(|a, b| {
    let (ua, _) = self.prioriser.get(a);  // incremental ignored
    let (ub, _) = self.prioriser.get(b);
    ua.cmp(&ub).then_with(|| a.cmp(b))
});

Per RFC 9218 §4, incremental=true streams within the same urgency level should use round-robin scheduling, while incremental=false streams should be served sequentially (complete one before starting the next).

Current behavior

All streams within the same urgency level are served in stream-ID order (FIFO), regardless of the incremental flag.

Expected behavior

  • incremental=false (default): serve streams sequentially within urgency level
  • incremental=true: interleave DATA frames across streams within urgency level

Priority

Low — urgency-based ordering already provides meaningful prioritization for the common case.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions