On Tue, Jan 26, 2021 at 11:42:23PM +0100, Manuel Bouyer wrote: > On Mon, Jan 18, 2021 at 09:36:42AM +0100, Roger Pau Monné wrote: > > [...] > > > > Note also that there are networking modes that don't use a bridge, so > > you could likely end up with nics[i].bridge == NULL? > > I couldn't cause this to happen. If no bridge is specified in the > domU's config file, qemu-ifup is called with xenbr0 as bridge name. > > I tried this: > vif = [ 'mac=00:16:3e:00:10:54, gatewaydev=wm0 type=ioemu, model=e1000' ]
Right, that's because libxl__device_nic_setdefault will set the bridge field to xenbr0 if empty. I'm not opposed to this behavior, seeing as we don't have much other option I'm afraid. I guess we could open the tap interface in libxl and pass it to QEMU, so that libxl can call the hotplug script knowing the tap interface name, but that seems non-trivial. IMO if we go that route it needs to be documented that NetBSD only supports bridged mode for emulated HVM network interfaces for the time being. Thanks, Roger.