Skip to content

ngtcp2: use stream in userdata - #23267

Closed
icing wants to merge 3 commits into
curl:masterfrom
icing:ngtcp2-stream-userdata-change
Closed

icing wants to merge 3 commits into
curl:masterfrom
icing:ngtcp2-stream-userdata-change

Conversation

@icing

@icing icing commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Change ngtcp2 stream userdata from the transfer to the h3_stream_ctx and lookup the transfer at the multi's table. This replaces hash lookups with table lookups which are faster.

icing added 2 commits October 5, 2026 12:36
Change ngtcp2 stream userdata from the transfer to the h3_stream_ctx and lookup the transfer at the multi's table. This replaces hash lookups with table lookups which are faster.
@github-actions github-actions Bot added the HTTP/3 h3 or quic related label Oct 5, 2026
@icing
icing requested a review from bagder October 5, 2026 11:57

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Callback error propagation and NULL handling contain two correctness regressions.

Review effort: Balanced
Findings: 1 High severity · 1 Medium severity

Open (2)
What changed in this PR

Optimizes ngtcp2 stream-to-transfer resolution by storing stream contexts as userdata and using the multi transfer table.

Changes:

  • Adds transfer identifiers to HTTP/3 stream contexts.
  • Introduces table-based transfer lookup for callbacks.
  • Passes stream contexts through ngtcp2/nghttp3 userdata.
File Description
lib/​vquic/​cf-ngtcp2.c Updates HTTP/3 callbacks and userdata.
lib/​vquic/​cf-ngtcp2-proxy.c Passes stream context for proxy requests.
lib/​vquic/​cf-ngtcp2-cmn.h Extends stream state and helper APIs.
lib/​vquic/​cf-ngtcp2-cmn.c Implements transfer lookup and callback integration.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread lib/vquic/cf-ngtcp2-cmn.c Resolved
Comment thread lib/vquic/cf-ngtcp2-cmn.c Resolved
- guard data use
- process result independent of data
@bagder bagder closed this in 1cd2671 Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

HTTP/3 h3 or quic related

Development

Successfully merging this pull request may close these issues.

3 participants