Re: [Qemu-devel] [PATCH v2] tap: close fd conditionally when error occured

2018-02-02 Thread Jason Wang
On 2018年02月02日 11:53, Jay Zhou wrote: Hi Jason, On 2018/2/2 11:11, Jason Wang wrote: On 2018年01月26日 11:08, 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 ioc

Re: [Qemu-devel] [PATCH v2] tap: close fd conditionally when error occured

2018-02-02 Thread Jay Zhou
Hi Jason, On 2018/2/2 14:56, Jason Wang wrote: On 2018年02月02日 11:53, Jay Zhou wrote: Hi Jason, On 2018/2/2 11:11, Jason Wang wrote: On 2018年01月26日 11:08, 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=

Re: [Qemu-devel] [PATCH v2] tap: close fd conditionally when error occured

2018-02-01 Thread Jay Zhou
Hi Jason, On 2018/2/2 11:11, Jason Wang wrote: On 2018年01月26日 11:08, 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 TUNSETOF

Re: [Qemu-devel] [PATCH v2] tap: close fd conditionally when error occured

2018-02-01 Thread Jason Wang
On 2018年01月26日 11:08, 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 The

[Qemu-devel] [PATCH v2] tap: close fd conditionally when error occured

2018-01-25 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 when