Skip to content

Conversation

@aerosouund
Copy link
Contributor

@aerosouund aerosouund commented Dec 20, 2025

Changes

There's currently no support for seqpacket based vsock connections in firecracker.
This PR adds it by creating an enum ConnBackend that implements VsockConnectionBackend and make its variants a unix stream or a seqpacket connection.
To handle seqpacket, this leverages the uds crate for initiating seqpacket connections and them extracts the file descriptor and puts it in a wrapper type to access it in a similar fashion as the unix stream.
It adds vsock_type as an api parameter to the vsock type

Reason

Fixes: #4822

License Acceptance

By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license. For more information on following Developer
Certificate of Origin and signing off your commits, please check
CONTRIBUTING.md.

PR Checklist

  • I have read and understand CONTRIBUTING.md.
  • I have run tools/devtool checkbuild --all to verify that the PR passes
    build checks on all supported architectures.
  • I have run tools/devtool checkstyle to verify that the PR passes the
    automated style checks.
  • I have described what is done in these changes, why they are needed, and
    how they are solving the problem in a clear and encompassing way.
  • I have updated any relevant documentation (both in code and in the docs)
    in the PR.
  • I have mentioned all user-facing changes in CHANGELOG.md.
  • If a specific issue led to this PR, this PR closes the issue.
  • When making API changes, I have followed the
    Runbook for Firecracker API changes.
  • I have tested all new and changed functionalities in unit tests and/or
    integration tests.
  • I have linked an issue to every new TODO.

  • This functionality cannot be added in rust-vmm.

@aerosouund aerosouund force-pushed the vsock branch 22 times, most recently from 9cb7f64 to 4988a5e Compare December 26, 2025 18:31
@aerosouund aerosouund changed the title Vsock feat: Add Seqpacket support Dec 26, 2025
@aerosouund aerosouund marked this pull request as ready for review December 26, 2025 18:38
@JamesC1305 JamesC1305 self-assigned this Jan 8, 2026
@aerosouund
Copy link
Contributor Author

aerosouund commented Jan 8, 2026

@JamesC1305 checking the failures, will fix. they seem to be related to style checking and a missing field on a python functional test

@JamesC1305
Copy link
Contributor

Hi @aerosouund, thank you for your contribution.

Yes, the failures look to be related to your changes. To start debugging, you can look at the logs from the buildkite run , and perhaps try running the integration tests locally using tools/devtool test.

@aerosouund aerosouund force-pushed the vsock branch 3 times, most recently from c9a695b to 313cdc4 Compare January 8, 2026 15:00
@JamesC1305 JamesC1305 added the Status: Awaiting author Indicates that an issue or pull request requires author action label Jan 9, 2026
@aerosouund aerosouund force-pushed the vsock branch 3 times, most recently from 7c831d5 to beea795 Compare January 10, 2026 13:56
@aerosouund
Copy link
Contributor Author

@JamesC1305
Thanks for your guidance. I have ran the tests locally and they have passed now

integration_tests/functional/test_api.py::test_api_vsock[vmlinux-5.10.245-PCI_ON] PASSED                          [ 50%]
integration_tests/functional/test_api.py::test_api_vsock[vmlinux-5.10.245-PCI_OFF] PASSED                         [100%]

------------------------------------------------------ JSON report ------------------------------------------------------
report saved to: ../test_results/test-report.json
================================================= slowest 10 durations ==================================================
0.31s setup    integration_tests/functional/test_api.py::test_api_vsock[vmlinux-5.10.245-PCI_ON]
0.21s setup    integration_tests/functional/test_api.py::test_api_vsock[vmlinux-5.10.245-PCI_OFF]
0.05s teardown integration_tests/functional/test_api.py::test_api_vsock[vmlinux-5.10.245-PCI_OFF]
0.05s teardown integration_tests/functional/test_api.py::test_api_vsock[vmlinux-5.10.245-PCI_ON]
0.03s call     integration_tests/functional/test_api.py::test_api_vsock[vmlinux-5.10.245-PCI_OFF]
0.03s call     integration_tests/functional/test_api.py::test_api_vsock[vmlinux-5.10.245-PCI_ON]
=================================================== 2 passed in 0.73s ===================================================
[Firecracker devtool 2026-01-10T13:57:23+00:00] Finished test run ...

This is the test that was failing in the pipeline as per my memory. I cannot access the original failure logs now because it shows the workflow is pending. if there's a way for me to get the old run logs to verify if another test was failing please point me to it

@JamesC1305
Copy link
Contributor

Hi @aerosouund,

I reran the tests, and it looks like they're still failing: https://buildkite.com/firecracker/firecracker-pr/builds/15547#_. In general, if you want to look at previous runs, you can click on the branch name (e.g. aerosouund:vsock in this case) under the run title. That will show you all previous runs for this branch.

@aerosouund aerosouund force-pushed the vsock branch 5 times, most recently from 7d1402d to 1c63c1f Compare January 14, 2026 21:17
Modify the multiplexer and vsock backend to be able to
handle vsock seqpacket connections based on the passed config parameter.
This parameter needs to also be passed to the API endpoint
during vsock operations.

The implementation's idea is making VsockConnection use an enum
called ConnBackend as its backend. This enum can be a
UnixStream or a SeqpacketConn

Signed-off-by: aerosouund <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status: Awaiting author Indicates that an issue or pull request requires author action

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Add SEQPACKET socket type for vsock

2 participants