@@ -23,13 +23,13 @@ use std::io::Result;
23
23
use std:: ops:: Deref ;
24
24
use std:: sync:: { Arc , Mutex , RwLock } ;
25
25
26
+ use mio:: Interest ;
26
27
use vhost:: vhost_user:: message:: {
27
28
VhostTransferStateDirection , VhostTransferStatePhase , VhostUserProtocolFeatures ,
28
29
VhostUserSharedMsg ,
29
30
} ;
30
31
use vhost:: vhost_user:: Backend ;
31
32
use vm_memory:: bitmap:: Bitmap ;
32
- use vmm_sys_util:: epoll:: EventSet ;
33
33
use vmm_sys_util:: eventfd:: EventFd ;
34
34
35
35
use vhost:: vhost_user:: GpuBackend ;
@@ -144,7 +144,7 @@ pub trait VhostUserBackend: Send + Sync {
144
144
fn handle_event (
145
145
& self ,
146
146
device_event : u16 ,
147
- evset : EventSet ,
147
+ evset : Interest ,
148
148
vrings : & [ Self :: Vring ] ,
149
149
thread_id : usize ,
150
150
) -> Result < ( ) > ;
@@ -287,7 +287,7 @@ pub trait VhostUserBackendMut: Send + Sync {
287
287
fn handle_event (
288
288
& mut self ,
289
289
device_event : u16 ,
290
- evset : EventSet ,
290
+ evset : Interest ,
291
291
vrings : & [ Self :: Vring ] ,
292
292
thread_id : usize ,
293
293
) -> Result < ( ) > ;
@@ -389,7 +389,7 @@ impl<T: VhostUserBackend> VhostUserBackend for Arc<T> {
389
389
fn handle_event (
390
390
& self ,
391
391
device_event : u16 ,
392
- evset : EventSet ,
392
+ evset : Interest ,
393
393
vrings : & [ Self :: Vring ] ,
394
394
thread_id : usize ,
395
395
) -> Result < ( ) > {
@@ -478,7 +478,7 @@ impl<T: VhostUserBackendMut> VhostUserBackend for Mutex<T> {
478
478
fn handle_event (
479
479
& self ,
480
480
device_event : u16 ,
481
- evset : EventSet ,
481
+ evset : Interest ,
482
482
vrings : & [ Self :: Vring ] ,
483
483
thread_id : usize ,
484
484
) -> Result < ( ) > {
@@ -570,7 +570,7 @@ impl<T: VhostUserBackendMut> VhostUserBackend for RwLock<T> {
570
570
fn handle_event (
571
571
& self ,
572
572
device_event : u16 ,
573
- evset : EventSet ,
573
+ evset : Interest ,
574
574
vrings : & [ Self :: Vring ] ,
575
575
thread_id : usize ,
576
576
) -> Result < ( ) > {
@@ -600,6 +600,7 @@ pub mod tests {
600
600
use super :: * ;
601
601
use crate :: VringRwLock ;
602
602
use libc:: EFD_NONBLOCK ;
603
+ use mio:: Interest ;
603
604
use std:: sync:: Mutex ;
604
605
use uuid:: Uuid ;
605
606
use vm_memory:: { GuestAddress , GuestMemoryAtomic , GuestMemoryMmap } ;
@@ -707,7 +708,7 @@ pub mod tests {
707
708
fn handle_event (
708
709
& mut self ,
709
710
_device_event : u16 ,
710
- _evset : EventSet ,
711
+ _evset : Interest ,
711
712
_vrings : & [ VringRwLock ] ,
712
713
_thread_id : usize ,
713
714
) -> Result < ( ) > {
@@ -793,7 +794,7 @@ pub mod tests {
793
794
794
795
let vring = VringRwLock :: new ( mem, 0x1000 ) . unwrap ( ) ;
795
796
backend
796
- . handle_event ( 0x1 , EventSet :: IN , & [ vring] , 0 )
797
+ . handle_event ( 0x1 , Interest :: READABLE , & [ vring] , 0 )
797
798
. unwrap ( ) ;
798
799
799
800
backend. reset_device ( ) ;
0 commit comments