pub fn try_enable_notification(&mut self, mem: &GuestMemoryMmap) -> bool {
        // If the device doesn't use notification suppression, we'll continue to get notifications
        // no matter what.
        if !self.uses_notif_suppression {
            return true;
        }

        if self.len(mem) != 0 {
            return false;
        }

        // Set the next expected avail_idx as avail_event.
        self.set_avail_event(self.next_avail.0, mem);

        // Make sure all subsequent reads are performed after `set_avail_event`.
        fence(Ordering::SeqCst);

        // If the actual avail_idx is different than next_avail one or more descriptors can still
        // be consumed from the available ring.
        self.next_avail.0 == self.avail_idx(mem).0
    }
/// Try to enable notification events from the guest driver. Returns true if notifications were
/// successfully enabled. Otherwise it means that one or more descriptors can still be consumed
/// from the available ring and we can't guarantee that there will be a notification. In this
/// case the caller might want to consume the mentioned descriptors and call this method again.
Try to enable notification events from the guest driver. Returns true if notifications were
successfully enabled. Otherwise it means that one or more descriptors can still be consumed
from the available ring and we can't guarantee that there will be a notification. In this
case the caller might want to consume the mentioned descriptors and call this method again.
Try to enable notification events from the guest driver . Returns true if notifications were successfully enabled . Otherwise it means that one or more descriptors can still be consumed from the available ring and we can ' t guarantee that there will be a notification . In this case the caller might want to consume the mentioned descriptors and call this method again .
pub fn try_enable_notification(&mut self, mem: &GuestMemoryMmap) -> bool {
        // If the device doesn't use notification suppression, we'll continue to get notifications
        // no matter what.
        if !self.uses_notif_suppression {
            return true;
        }
        if self.len(mem) != 0 {
            return false;
        }
        // Set the next expected avail_idx as avail_event.
        self.set_avail_event(self.next_avail.0, mem);
        // Make sure all subsequent reads are performed after `set_avail_event`.
        fence(Ordering::SeqCst);
        // If the actual avail_idx is different than next_avail one or more descriptors can still
        // be consumed from the available ring.
        self.next_avail.0 == self.avail_idx(mem).0
    }
pub fn try_enable_notification ( & mut self , mem : & GuestMemoryMmap ) -> bool { // If the device doesn't use notification suppression, we'll continue to get notifications // no matter what. if ! self . uses_notif_suppression { return true ; } if self . len ( mem ) != 0 { return false ; } // Set the next expected avail_idx as avail_event. self . set_avail_event ( self . next_avail . 0 , mem ) ; // Make sure all subsequent reads are performed after `set_avail_event`. fence ( Ordering :: SeqCst ) ; // If the actual avail_idx is different than next_avail one or more descriptors can still // be consumed from the available ring. self . next_avail . 0 == self . avail_idx ( mem ) . 0 }
Try to enable notification events from the guest driver.
Try to enable notification events from the guest driver .
&mut self
mem
&GuestMemoryMmap
&mut self
mem
&GuestMemoryMmap