fn is_valid(&self, sys_mem: &Arc<AddressSpace>, queue_size: u16) -> bool {
        if let Err(ref e) = checked_offset_mem(&sys_mem, self.addr, u64::from(self.len)) {
            error!(
                "The memory of descriptor is invalid, {} ",
                error_chain::ChainedError::display_chain(e),
            );
            return false;
        }

        if self.has_next() && self.next >= queue_size {
            error!(
                "The next index {} exceed queue size {}",
                self.next, queue_size,
            );
            return false;
        }

        true
    }
/// Return true if the descriptor is valid.
Return true if the descriptor is valid.
Return true if the descriptor is valid .
fn is_valid(&self, sys_mem: &Arc<AddressSpace>, queue_size: u16) -> bool {
        if let Err(ref e) = checked_offset_mem(&sys_mem, self.addr, u64::from(self.len)) {
            error!(
                "The memory of descriptor is invalid, {} ",
                error_chain::ChainedError::display_chain(e),
            );
            return false;
        }
        if self.has_next() && self.next >= queue_size {
            error!(
                "The next index {} exceed queue size {}",
                self.next, queue_size,
            );
            return false;
        }
        true
    }
fn is_valid ( & self , sys_mem : & Arc < AddressSpace > , queue_size : u16 ) -> bool { if let Err ( ref e ) = checked_offset_mem ( & sys_mem , self . addr , u64 :: from ( self . len ) ) { error ! ( " " error_chain ChainedError display_chain ( e ) ) ; return false ; } if self . has_next ( ) && self . next >= queue_size { error ! ( " " self next queue_size ) ; return false ; } true }
Return true if the descriptor is valid.
Return true if the descriptor is valid .
&self
sys_mem
&Arc<AddressSpace>
queue_size
u16
&self
sys_mem
&Arc<AddressSpace>
queue_size
u16