Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VSock Connection Handshake #1472

Merged
merged 1 commit into from
Dec 18, 2019

Conversation

dhrgit
Copy link
Contributor

@dhrgit dhrgit commented Dec 17, 2019

Reason for This PR

#1432 #1253 #1443

Description of Changes

Changed the host-initiated vsock connection protocol to include a trivial handshake.

The new protocol looks like this:

  • [host] CONNECT <port><LF>
  • [guest/success] OK <assigned_host_port><LF>

On connection failure, the host connection is reset without any accompanying message, as before.

This allows host software to more easily detect connection failures, for instance when attempting to connect to a guest server that may have not yet started listening for client connections.

License Acceptance

By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license.

PR Checklist

[Author TODO: Meet these criteria. Where there are two options, keep one.]
[Reviewer TODO: Verify that these criteria are met. Request changes if not]

  • All commits in this PR are signed (git commit -s).
  • Either this PR is linked to an issue, or, the reason for this PR is
    clearly provided.
  • The description of changes is clear and encompassing.
  • Either no docs need to be updated as part of this PR, or, the required
    doc changes are included in this PR. Docs in scope are all *.md files
    located either in the repository root, or in the docs/ directory.
  • Either no code has been touched, or, code-level documentation for touched
    code is included in this PR.
  • Either no API changes are included in this PR, or, the API changes are
    reflected in firecracker/swagger.yaml.
  • Either the changes in this PR have no user impact, or, the changes in
    this PR have user impact and have been added to the CHANGELOG.md file.
  • Either no new unsafe code has been added, or, the newly added unsafe
    code is unavoidable and properly documented.

@dhrgit dhrgit self-assigned this Dec 17, 2019
acatangiu
acatangiu previously approved these changes Dec 18, 2019
CHANGELOG.md Outdated
### Changed

- Vsock host-initiated connections now implement a trivial handshake protocol.
See the [vsock doc](docs/vsock.md#host-initiated-connections) for details.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: maybe reference the github issues fixed here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

alxiord
alxiord previously approved these changes Dec 18, 2019
src/devices/src/virtio/vsock/unix/muxer.rs Outdated Show resolved Hide resolved
@dhrgit dhrgit dismissed stale reviews from alxiord and acatangiu via 6854aca December 18, 2019 12:58
acatangiu
acatangiu previously approved these changes Dec 18, 2019
Changed the host-initiated vsock connection protocol to include a
trivial handshake.

The new protocol looks like this:
- [host] CONNECT <port><LF>
- [guest/success] OK <assigned_host_port><LF>

On connection failure, the host host connection is reset without any
accompanying message, as before.

This allows host software to more easily detect connection failures, for
instance when attempting to connect to a guest server that may have not
yet started listening for client connections.

Signed-off-by: Dan Horobeanu <dhr@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants