vmsilo fork of vhost rust libraries
Refine the way to manage epoll event id and simplify interfaces: - Change VhostUserBackend::exit_event() to return Option<EventFd> instead of Option<(EventFd, u16)>. - Delete VringEpollHandler::exit_event_id. - Add VringEpollHandler::register_event/unregister_event for internal use. - Make VringEpollHandler::register_listener/unregister_listener() for external users only, and 'data` range [0..backend.num_queues()] is reserved for queues and exit event. Signed-off-by: Liu Jiang <gerry@linux.alibaba.com> |
||
|---|---|---|
| .cargo | ||
| .github | ||
| rust-vmm-ci@1311bfa03f | ||
| src | ||
| .gitignore | ||
| .gitmodules | ||
| Cargo.toml | ||
| CODEOWNERS | ||
| 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.