mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vhost_user_net: Use NetQueuePair from vm-virtio
The logic for handling the networking queues can now be shared between the version running in vhost-user-net and vm-virtio. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
committed by
Sebastien Boeuf
parent
fcc62efc41
commit
cc51fdb8a7
@@ -310,6 +310,12 @@ pub struct VringWorker {
|
||||
epoll_file: File,
|
||||
}
|
||||
|
||||
impl AsRawFd for VringWorker {
|
||||
fn as_raw_fd(&self) -> RawFd {
|
||||
self.epoll_file.as_raw_fd()
|
||||
}
|
||||
}
|
||||
|
||||
impl VringWorker {
|
||||
fn run<S: VhostUserBackend>(&self, handler: VringEpollHandler<S>) -> VringWorkerResult<()> {
|
||||
const EPOLL_EVENTS_LEN: usize = 100;
|
||||
|
||||
Reference in New Issue
Block a user