@@ -29,13 +29,13 @@ use vhost::vhost_user::message::{
2929} ;
3030use vhost:: vhost_user:: Backend ;
3131use vm_memory:: bitmap:: Bitmap ;
32- use vmm_sys_util:: epoll:: EventSet ;
3332use vmm_sys_util:: event:: { EventConsumer , EventNotifier } ;
3433
35- use vhost:: vhost_user:: GpuBackend ;
36-
3734use super :: vring:: VringT ;
3835use super :: GM ;
36+ use vhost:: vhost_user:: GpuBackend ;
37+
38+ use crate :: EventSet ;
3939
4040/// Trait with interior mutability for vhost user backend servers to implement concrete services.
4141///
@@ -144,7 +144,7 @@ pub trait VhostUserBackend: Send + Sync {
144144 /// do with events happening on custom listeners.
145145 fn handle_event (
146146 & self ,
147- device_event : u16 ,
147+ device_event : usize ,
148148 evset : EventSet ,
149149 vrings : & [ Self :: Vring ] ,
150150 thread_id : usize ,
@@ -288,7 +288,7 @@ pub trait VhostUserBackendMut: Send + Sync {
288288 /// do with events happening on custom listeners.
289289 fn handle_event (
290290 & mut self ,
291- device_event : u16 ,
291+ device_event : usize ,
292292 evset : EventSet ,
293293 vrings : & [ Self :: Vring ] ,
294294 thread_id : usize ,
@@ -390,7 +390,7 @@ impl<T: VhostUserBackend> VhostUserBackend for Arc<T> {
390390
391391 fn handle_event (
392392 & self ,
393- device_event : u16 ,
393+ device_event : usize ,
394394 evset : EventSet ,
395395 vrings : & [ Self :: Vring ] ,
396396 thread_id : usize ,
@@ -479,7 +479,7 @@ impl<T: VhostUserBackendMut> VhostUserBackend for Mutex<T> {
479479
480480 fn handle_event (
481481 & self ,
482- device_event : u16 ,
482+ device_event : usize ,
483483 evset : EventSet ,
484484 vrings : & [ Self :: Vring ] ,
485485 thread_id : usize ,
@@ -571,7 +571,7 @@ impl<T: VhostUserBackendMut> VhostUserBackend for RwLock<T> {
571571
572572 fn handle_event (
573573 & self ,
574- device_event : u16 ,
574+ device_event : usize ,
575575 evset : EventSet ,
576576 vrings : & [ Self :: Vring ] ,
577577 thread_id : usize ,
@@ -711,7 +711,7 @@ pub mod tests {
711711
712712 fn handle_event (
713713 & mut self ,
714- _device_event : u16 ,
714+ _device_event : usize ,
715715 _evset : EventSet ,
716716 _vrings : & [ VringRwLock ] ,
717717 _thread_id : usize ,
@@ -798,7 +798,7 @@ pub mod tests {
798798
799799 let vring = VringRwLock :: new ( mem, 0x1000 ) . unwrap ( ) ;
800800 backend
801- . handle_event ( 0x1 , EventSet :: IN , & [ vring] , 0 )
801+ . handle_event ( 0x1 , EventSet :: Readable , & [ vring] , 0 )
802802 . unwrap ( ) ;
803803
804804 backend. reset_device ( ) ;
0 commit comments