/// 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 {
            mem: None,
            vring_worker: None,
            kill_evt: EventFd::new(EFD_NONBLOCK).map_err(Error::CreateKillEventFd)?,
            tap,
            rx: RxVirtio::new(),
            tx: TxVirtio::new(),
            rx_tap_listening: false,
        })
    }
fn new ( tap : Tap ) -> Result < Self > { Ok ( VhostUserNetThread { mem : None , vring_worker : None , kill_evt : EventFd :: new ( EFD_NONBLOCK ) . map_err ( Error :: CreateKillEventFd ) ? , tap , rx : RxVirtio :: new ( ) , tx : TxVirtio :: new ( ) , rx_tap_listening : false , } ) }
Create a new virtio network device with the given TAP interface.
Create a new virtio network device with the given TAP interface .
tap
Tap