Re: [Qemu-devel] [PATCH v5] tap: setting error appropriately when calling net_init_tap_one()

2018-03-02 Thread Jason Wang
On 2018年03月02日 17:04, Jay Zhou wrote: If netdev_add tap,id=net0,...,vhost=on failed in net_init_tap_one(), the followed up device_add virtio-net-pci,netdev=net0 will fail too, prints: TUNSETOFFLOAD ioctl() failed: Bad file descriptor TUNSETOFFLOAD ioctl() failed: Bad file descriptor

[Qemu-devel] [PATCH v5] tap: setting error appropriately when calling net_init_tap_one()

2018-03-02 Thread Jay Zhou
If netdev_add tap,id=net0,...,vhost=on failed in net_init_tap_one(), the followed up device_add virtio-net-pci,netdev=net0 will fail too, prints: TUNSETOFFLOAD ioctl() failed: Bad file descriptor TUNSETOFFLOAD ioctl() failed: Bad file descriptor The reason is that the fd of tap is closed