This repository was archived by the owner on Feb 16, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 396
http2: Move all socket operations to the session thread #4368
Open
dridi
wants to merge
39
commits into
varnishcache:master
Choose a base branch
from
dridi:h2_sess_rw
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
a9e1667
vtc: White space cleanup in t02027
dridi 6e33056
vtc: Stabilize r2387
dridi 541ecb1
vefd: Thin emulation layer over eventfd
dridi 4c0b6f5
build: Detect eventfd() at configure time
dridi 845dfc5
vefd: Use eventfd() when available
dridi bd12dce
http2_session: Always pass a req to h2_init_sess()
mbgrydeland 04fbc50
http2_proto: Take immediate ownership of req in h2_req
mbgrydeland e37c41a
http2_session: Remove misleading return value
mbgrydeland b0c75fd
http2_session: Rename h2_ou_rel() to h2_ou_rel_req()
mbgrydeland 433106d
http2_session: Take ownership of req in h2_ou_rel_req()
mbgrydeland b19d4e7
http2_proto: Make h2_del_req() take the struct h2_req
mbgrydeland 950a578
http2_session: Directly return the h2_req set up
mbgrydeland a1ba004
http2_session: Await PRISM req just after 101 resp
mbgrydeland b7a2fe6
http2_proto: Expose h2_tx_goaway()
mbgrydeland 24277a7
http2_proto: Release WS in h2_rxframe() on early return
mbgrydeland 8d02710
http2_session: Process OU req after sending settings
mbgrydeland ce499f9
http2: Consolidate frame flags
mbgrydeland dd79a62
http2_proto: Drain stale comment
mbgrydeland eec922f
viov: New VIOV_prune() function
mbgrydeland 7b68db3
http2_send: Adopt VIOV_prune()
mbgrydeland a758f8d
http2_deliver: Rename VDP callbacks to h2_vdp_*()
mbgrydeland cc63579
http2_deliver: Prepare response flags upfront
mbgrydeland 4b7150d
http2_deliver: Prepare minimal response flags upfront
mbgrydeland d015983
http2_reqbody: Manage req body in its own file
mbgrydeland 25eb677
http2: Rename h2_req::[rt]_window fields
mbgrydeland 01e82b7
http2: Rename ASSERT_RXTHR() to ASSERT_H2_SESS()
mbgrydeland 2610bc0
http2_send: Move h2_errcheck() to cache_http2_proto.c
mbgrydeland 319c043
http2_session: Associate an eventfd to each h2_sess
mbgrydeland 8373853
http2: Rework HTTP/2 to be using non-blocking sockets
mbgrydeland fffe00d
http2_proto: Enforce preface SETTINGS frame
mbgrydeland 1553eca
http2_proto: Centralize stream state changes
mbgrydeland d9823ba
H2: Turn session send shutdown into a two stage operation
mbgrydeland 78b0d0b
H2: Fix a bad assertion being made
mbgrydeland f809988
H2: Set connection error if we kill the req holding the hpack lock
mbgrydeland f766328
H2: Don't call h2_kill_req() from within h2_rx_rst_stream()
mbgrydeland 359ee11
H2: Clear the h2_req magic value when freeing the req
mbgrydeland d1187c7
H2: Don't refund connection window on updates on closed streams
mbgrydeland d9691fc
H2: Don't lock when adding a new req
mbgrydeland 022025f
H2: Hold session lock while checking the req scheduled status
mbgrydeland File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,6 +37,8 @@ | |
|
|
||
| #include "cache_varnishd.h" | ||
|
|
||
| uintptr_t const ws_pipeline_rollback = (uintptr_t)&ws_pipeline_rollback; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't this be
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tripped on not-quite-constant symbols in this form: // .h
extern const char *sentinel_value;
// .c
const char *sentinel_value = "literal";So to avoid this, I took the habit of adding the See 0cfb214 for a recent example. |
||
|
|
||
| void | ||
| WS_Id(const struct ws *ws, char *id) | ||
| { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a hard time groking the logic wrt to the
pipeline_snapusage. Wouldn't it be cleaner to add asnapshotargument toHTC_RxInit(), and have each call site give the right argument. This argument looks to me like it could be done unconditionally on each of the call sites, making the code easier to follow and cleaner IMO.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough, and that would avoid increasing the size of
struct http_conn.