fn new(tap: Tap) -> Result<Self> {
        Ok(VhostUserNetThread {
            kill_evt: EventFd::new(EFD_NONBLOCK).map_err(Error::CreateKillEventFd)?,
            net: NetQueuePair {
                tap_for_write_epoll: tap.clone(),
                tap,
                rx: RxVirtio::new(),
                tx: TxVirtio::new(),
                rx_tap_listening: false,
                tx_tap_listening: false,
                epoll_fd: None,
                counters: NetCounters::default(),
                tap_rx_event_id: 3,
                tap_tx_event_id: 4,
                rx_desc_avail: false,
                rx_rate_limiter: None,
                tx_rate_limiter: None,
                access_platform: None,
            },
        })
    }
/// Create a new virtio network device with the given TAP interface.
Create a new virtio network device with the given TAP interface.
Create a new virtio network device with the given TAP interface .
fn new(tap: Tap) -> Result<Self> {
        Ok(VhostUserNetThread {
            kill_evt: EventFd::new(EFD_NONBLOCK).map_err(Error::CreateKillEventFd)?,
            net: NetQueuePair {
                tap_for_write_epoll: tap.clone(),
                tap,
                rx: RxVirtio::new(),
                tx: TxVirtio::new(),
                rx_tap_listening: false,
                tx_tap_listening: false,
                epoll_fd: None,
                counters: NetCounters::default(),
                tap_rx_event_id: 3,
                tap_tx_event_id: 4,
                rx_desc_avail: false,
                rx_rate_limiter: None,
                tx_rate_limiter: None,
                access_platform: None,
            },
        })
    }
fn new ( tap : Tap ) -> Result < Self > { Ok ( VhostUserNetThread { kill_evt : EventFd :: new ( EFD_NONBLOCK ) . map_err ( Error :: CreateKillEventFd ) ? , net : NetQueuePair { tap_for_write_epoll : tap . clone ( ) , tap , rx : RxVirtio :: new ( ) , tx : TxVirtio :: new ( ) , rx_tap_listening : false , tx_tap_listening : false , epoll_fd : None , counters : NetCounters :: default ( ) , tap_rx_event_id : 3 , tap_tx_event_id : 4 , rx_desc_avail : false , rx_rate_limiter : None , tx_rate_limiter : None , access_platform : None , } , } ) }
Create a new virtio network device with the given TAP interface.
Create a new virtio network device with the given TAP interface .
tap
Tap
tap
Tap