Re: [PATCH 0/3 v4] macvtap driver
From: Ed Swierk <hidden>
Date: 2010-02-11 00:42:07
On Wed, Feb 10, 2010 at 6:50 AM, Arnd Bergmann [off-list ref] wrote:
I think we also need to ensure the device doesn't go away, which was one of the reasons for the rcu_read_lock_bh() earlier.
This may be veering far off into the weeds, but I'm wondering if you considered making macvtap devices behave more like tap devices. Specifically, the application would open /dev/net/macvtap and send it an ioctl with the name of the macvtap interface, the name of the lower interface to attach to, the MAC address, etc; this would cause the macvtap interface to spring into existence. The macvtap interface would go away when the application exits or closes the file. The tricky part here would be noticing when the lower interface goes away, and (ideally) reattaching when an interface with the same name reappears. I think the advantage of this approach is that it better fits the way applications like qemu and libvirt use tap interfaces. Unlike the current approach, however, this wouldn't allow creating a macvtap interface and keep it around independently of the application using it. Is it desirable to support this use case? --Ed