pub fn check_rx_deferred_frame(&mut self, frame_len: usize) -> Vec<u8> {
            self.net().mocks.set_read_tap(ReadTapMock::TapFrame);
            let used_idx = self.rxq.used.idx.get();

            // Inject frame to tap and run epoll.
            let frame = inject_tap_tx_frame(&self.net(), frame_len);
            check_metric_after_block!(
                METRICS.net.rx_packets_count,
                0,
                self.event_manager.run_with_timeout(100).unwrap()
            );
            // Check that the frame has been deferred.
            assert!(self.net().rx_deferred_frame);
            // Check that the descriptor chain has been discarded.
            assert_eq!(self.rxq.used.idx.get(), used_idx + 1);
            assert!(&self.net().irq_trigger.has_pending_irq(IrqType::Vring));

            frame
        }
/// Generate a tap frame of `frame_len` and check that it is deferred
Generate a tap frame of `frame_len` and check that it is deferred
Generate a tap frame of ` frame_len ` and check that it is deferred
pub fn check_rx_deferred_frame(&mut self, frame_len: usize) -> Vec<u8> {
            self.net().mocks.set_read_tap(ReadTapMock::TapFrame);
            let used_idx = self.rxq.used.idx.get();
            // Inject frame to tap and run epoll.
            let frame = inject_tap_tx_frame(&self.net(), frame_len);
            check_metric_after_block!(
                METRICS.net.rx_packets_count,
                0,
                self.event_manager.run_with_timeout(100).unwrap()
            );
            // Check that the frame has been deferred.
            assert!(self.net().rx_deferred_frame);
            // Check that the descriptor chain has been discarded.
            assert_eq!(self.rxq.used.idx.get(), used_idx + 1);
            assert!(&self.net().irq_trigger.has_pending_irq(IrqType::Vring));
            frame
        }
pub fn check_rx_deferred_frame ( & mut self , frame_len : usize ) -> Vec < u8 > { self . net ( ) . mocks . set_read_tap ( ReadTapMock :: TapFrame ) ; let used_idx = self . rxq . used . idx . get ( ) ; // Inject frame to tap and run epoll. let frame = inject_tap_tx_frame ( & self . net ( ) , frame_len ) ; check_metric_after_block ! ( METRICS net rx_packets_count 0 self event_manager run_with_timeout ( 100 ) unwrap ( ) ) ; // Check that the frame has been deferred. assert ! ( self net ( ) rx_deferred_frame ) ; // Check that the descriptor chain has been discarded. assert_eq ! ( self rxq used idx get ( ) used_idx 1 ) ; assert ! ( self net ( ) irq_trigger has_pending_irq ( IrqType Vring ) ) ; frame }
Generate a tap frame of `frame_len` and check that it is deferred
Generate a tap frame of ` frame_len ` and check that it is deferred
&mut self
frame_len
usize
&mut self
frame_len
usize