@@ -29,13 +29,13 @@ use vhost::vhost_user::message::{
29
29
} ;
30
30
use vhost:: vhost_user:: Backend ;
31
31
use vm_memory:: bitmap:: Bitmap ;
32
- use vmm_sys_util:: epoll:: EventSet ;
33
32
use vmm_sys_util:: event:: { EventConsumer , EventNotifier } ;
34
33
35
- use vhost:: vhost_user:: GpuBackend ;
36
-
37
34
use super :: vring:: VringT ;
38
35
use super :: GM ;
36
+ use vhost:: vhost_user:: GpuBackend ;
37
+
38
+ use crate :: EventSet ;
39
39
40
40
/// Trait with interior mutability for vhost user backend servers to implement concrete services.
41
41
///
@@ -144,7 +144,7 @@ pub trait VhostUserBackend: Send + Sync {
144
144
/// do with events happening on custom listeners.
145
145
fn handle_event (
146
146
& self ,
147
- device_event : u16 ,
147
+ device_event : usize ,
148
148
evset : EventSet ,
149
149
vrings : & [ Self :: Vring ] ,
150
150
thread_id : usize ,
@@ -288,7 +288,7 @@ pub trait VhostUserBackendMut: Send + Sync {
288
288
/// do with events happening on custom listeners.
289
289
fn handle_event (
290
290
& mut self ,
291
- device_event : u16 ,
291
+ device_event : usize ,
292
292
evset : EventSet ,
293
293
vrings : & [ Self :: Vring ] ,
294
294
thread_id : usize ,
@@ -390,7 +390,7 @@ impl<T: VhostUserBackend> VhostUserBackend for Arc<T> {
390
390
391
391
fn handle_event (
392
392
& self ,
393
- device_event : u16 ,
393
+ device_event : usize ,
394
394
evset : EventSet ,
395
395
vrings : & [ Self :: Vring ] ,
396
396
thread_id : usize ,
@@ -479,7 +479,7 @@ impl<T: VhostUserBackendMut> VhostUserBackend for Mutex<T> {
479
479
480
480
fn handle_event (
481
481
& self ,
482
- device_event : u16 ,
482
+ device_event : usize ,
483
483
evset : EventSet ,
484
484
vrings : & [ Self :: Vring ] ,
485
485
thread_id : usize ,
@@ -571,7 +571,7 @@ impl<T: VhostUserBackendMut> VhostUserBackend for RwLock<T> {
571
571
572
572
fn handle_event (
573
573
& self ,
574
- device_event : u16 ,
574
+ device_event : usize ,
575
575
evset : EventSet ,
576
576
vrings : & [ Self :: Vring ] ,
577
577
thread_id : usize ,
@@ -711,7 +711,7 @@ pub mod tests {
711
711
712
712
fn handle_event (
713
713
& mut self ,
714
- _device_event : u16 ,
714
+ _device_event : usize ,
715
715
_evset : EventSet ,
716
716
_vrings : & [ VringRwLock ] ,
717
717
_thread_id : usize ,
@@ -798,7 +798,7 @@ pub mod tests {
798
798
799
799
let vring = VringRwLock :: new ( mem, 0x1000 ) . unwrap ( ) ;
800
800
backend
801
- . handle_event ( 0x1 , EventSet :: IN , & [ vring] , 0 )
801
+ . handle_event ( 0x1 , EventSet :: Readable , & [ vring] , 0 )
802
802
. unwrap ( ) ;
803
803
804
804
backend. reset_device ( ) ;
0 commit comments