vmsilo fork of vhost rust libraries
We were explicitly calling libc::close() on fds we were replacing; but since they were stored as EventFds, which close themselves on drop, this is unnecessary. Manually closing them is useless at best; at worse, if there's a race condition and another thread opens an fd between the manual close and the normal close on drop, we could have closed someone else's fd. |
||
|---|---|---|
| .cargo | ||
| .github | ||
| rust-vmm-ci@6591890ee1 | ||
| src | ||
| .gitignore | ||
| .gitmodules | ||
| Cargo.toml | ||
| CODEOWNERS | ||
| coverage_config.json | ||
| coverage_config_x86_64.json | ||
| LICENSE | ||
| README.md | ||
vhost-user-backend
Design
This crate provides convenient abstractions for implementing vhost-user device server backends:
- A vhost-user backend trait (
VhostUserBackend) - A public API for the backend to interact with (
VhostUserDaemon) - An structure including virtio queue related elements (
Vring) - A worker for receiving queue events and forwarding them to the backend.
Usage
Users of this create are expected to implement the VhostUserBackend trait and to initialize the execution context by instantiating VhostUserDaemon and calling to its start method.