fn used_ring_need_event(&mut self, sys_mem: &Arc<AddressSpace>) -> bool {
        let old = self.last_signal_used;
        let new = match self.get_used_idx(sys_mem) {
            Ok(used_idx) => Wrapping(used_idx),
            Err(ref e) => {
                error!(
                    "Failed to get the status for notifying used vring  {}",
                    error_chain::ChainedError::display_chain(e)
                );
                return false;
            }
        };

        let used_event_idx = match self.get_used_event(sys_mem) {
            Ok(idx) => Wrapping(idx),
            Err(ref e) => {
                error!(
                    "Failed to get the status for notifying used vring  {}",
                    error_chain::ChainedError::display_chain(e)
                );
                return false;
            }
        };

        self.last_signal_used = new;
        (new - used_event_idx - Wrapping(1)) < (new - old)
    }
/// Return true if it's required to trigger interrupt for the used vring.
Return true if it's required to trigger interrupt for the used vring.
Return true if it ' s required to trigger interrupt for the used vring .
fn used_ring_need_event(&mut self, sys_mem: &Arc<AddressSpace>) -> bool {
        let old = self.last_signal_used;
        let new = match self.get_used_idx(sys_mem) {
            Ok(used_idx) => Wrapping(used_idx),
            Err(ref e) => {
                error!(
                    "Failed to get the status for notifying used vring  {}",
                    error_chain::ChainedError::display_chain(e)
                );
                return false;
            }
        };
        let used_event_idx = match self.get_used_event(sys_mem) {
            Ok(idx) => Wrapping(idx),
            Err(ref e) => {
                error!(
                    "Failed to get the status for notifying used vring  {}",
                    error_chain::ChainedError::display_chain(e)
                );
                return false;
            }
        };
        self.last_signal_used = new;
        (new - used_event_idx - Wrapping(1)) < (new - old)
    }
fn used_ring_need_event ( & mut self , sys_mem : & Arc < AddressSpace > ) -> bool { let old = self . last_signal_used ; let new = match self . get_used_idx ( sys_mem ) { Ok ( used_idx ) => Wrapping ( used_idx ) , Err ( ref e ) => { error ! ( " " error_chain ChainedError display_chain ( e ) ) ; return false ; } } ; let used_event_idx = match self . get_used_event ( sys_mem ) { Ok ( idx ) => Wrapping ( idx ) , Err ( ref e ) => { error ! ( " " error_chain ChainedError display_chain ( e ) ) ; return false ; } } ; self . last_signal_used = new ; ( new - used_event_idx - Wrapping ( 1 ) ) < ( new - old ) }
Return true if it's required to trigger interrupt for the used vring.
Return true if it ' s required to trigger interrupt for the used vring .
&mut self
sys_mem
&Arc<AddressSpace>
&mut self
sys_mem
&Arc<AddressSpace>