Replace our VsockPacket with the new one implemented in the virtio-vsock crate. Based on Alex Bennée and Laura Loghin commit: https://github.com/stsquad/vhost-device/commit/6752266608dd To achieve this the following changes where made: - deleted the internal packet.rs - convert the send_pkt/recv_pkt helpers to be BitmapSlice aware - update push from LocalTxBuf - tweak a few API calls due to minor diffs Fixed tests and moved some helpers from the removed vsock/src/packet.rs file. Co-developed-by: Laura Loghin <lauralg@amazon.com> Co-developed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> |
||
|---|---|---|
| .cargo | ||
| .github | ||
| gpio | ||
| i2c | ||
| rng | ||
| rust-vmm-ci@5f36cc9604 | ||
| vsock | ||
| .gitignore | ||
| .gitmodules | ||
| Cargo.lock | ||
| Cargo.toml | ||
| CODEOWNERS | ||
| coverage_config_x86_64.json | ||
| LICENSE-APACHE | ||
| README.md | ||
vhost-device
Design
This repository hosts various 'vhost-user' device backends in their own crates. See their individual README.md files for specific information about those crates.
Here is the list of device backends that we support:
Testing and Code Coverage
Like the wider rust-vmm project we expect new features to come with comprehensive code coverage. However as a multi-binary repository there are cases where avoiding a drop in coverage can be hard and an exception to the approach is allowable. These are:
- adding a new binary target (aim at least 60% overall coverage)
- expanding the main function (a small drop is acceptable)
However any new feature added to an existing binary should not cause a drop in coverage. The general aim should be to always improve coverage.
Separation of Concerns
The binaries built by this repository can be run with any VMM which can act as a vhost-user frontend. Typically they have been tested with QEMU although the rust-vmm project does provide a vhost-user frontend crate for rust based VMMs.
While it's possible to implement all parts of the backend inside the vhost-device workspace consideration should be given to separating the VirtQueue handling and response logic to a crate in vm-virtio devices. This way a monolithic rust-vmm VMM implementation can reuse the core logic to service the virtio requests directly in the application.