vsock : start forward-listen stream polling after guest accepts - #992
Open
vatsalkeshav wants to merge 1 commit into
Open
vsock : start forward-listen stream polling after guest accepts#992vatsalkeshav wants to merge 1 commit into
vatsalkeshav wants to merge 1 commit into
Conversation
vatsalkeshav
requested review from
dorindabassey,
epilys,
stefano-garzarella,
stsquad and
vireshk
as code owners
August 23, 2026 02:29
vatsalkeshav
force-pushed
the
vsock-fix
branch
2 times, most recently
from
August 23, 2026 02:33
ae4b1aa to
287a213
Compare
vatsalkeshav
force-pushed
the
vsock-fix
branch
2 times, most recently
from
August 23, 2026 02:45
f670249 to
32a4975
Compare
poll host-initiated forward-listen stream/s after guest-side connection has completed with VSOCK_OP_RESPONSE this prevents data sent immediately after host connect from being read before the guest endpoint is ready Signed-off-by: vatsalkeshav <vatsalkeshav224@gmail.com>
vatsalkeshav
force-pushed
the
vsock-fix
branch
from
September 7, 2026 06:11
32a4975 to
463ef31
Compare
Author
|
rebased |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary of the PR
Fixes #963
This pr fixes host-initiated
forward-listenconnection so host-side data is not polled before the guest-side vsock connection is acceptedPreviously,
VhostUserVsockThread::handle_event()accepted the host socket, sent VSOCK_OP_REQUEST to the guest, immediately registered the host stream for polling, and in case the host writes before the guest replies with VSOCK_OP_RESPONSE, the backend read host bytes before the guest-side connection was ready -- and they're not forwarded to the guest which sees eof/0 bytes when eventually connected with VSOCK_OP_RESPONSENow host-initiated
forward-listenstreams are not registered forEPOLLIN | EPOLLOUTimmediately after accept -- which now sends the guest connection VSOCK_OP_REQUEST first and waits for VSOCK_OP_RESPONSE to start host stream polling invhost-device-vsock/src/vsock_conn.rsRequirements
Before submitting your PR, please make sure you addressed the following
requirements:
git commit -s), and the commit message has max 60 characters for thesummary and max 75 characters for each description line.
test -- repro requires host-to-guest forward-listen path with QEMU side, guest vsock endpoint, timing where the host writes before guest's VSOCK_OP_RESPONSE
Release" section of CHANGELOG.md (if no such section exists, please create one).
unsafecode is properly documented.