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

2018-02-06 Thread Zhoujian (jay)
Hi Jason, > -Original Message- > From: Jason Wang [mailto:jasow...@redhat.com] > Sent: Tuesday, February 06, 2018 5:29 PM > To: Zhoujian (jay) ; qemu-devel@nongnu.org > Cc: m...@redhat.com; imamm...@redhat.com; Huangweidong (C) > ; wangxin (U) ; Gonglei > (Arei) > Subject: Re: [PATCH v3]

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

2018-02-06 Thread Jason Wang
On 2018年02月02日 17:50, 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 T

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

2018-02-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 wh