Skip to contentSkip to conversation

Allow VLANs with no nics

Qemu-devel andrzej zaborowski 1 participant 1 message Jul 17, 2008

lore
Share & tools
lore
#0 lore raw

Hi,
I added the usb-net patch, and it's the only NIC that is
hot-pluggable. The current command line switch to enable it has suboptimal syntax requiring you to know the index of the nic in nb_table[]. Instead -usbdevice net:... could automatically add the nic in nb_table[] when needed (see below). This requires allowing empty vlans on start, so the patch makes the "vlan (N) with no nics" message non-fatal. Do you have suggestions?

Cheers

qemu-doc.texi +2 -2
index 78ba587..62eda1c 100644
@@ -567,7 +567,7 @@ available devices.
 Braille device.  This will use BrlAPI to display the braille output on a real
 or fake device.
 
-@item net:nic_num
+@item net:options
 Network adapter that supports CDC ethernet and RNDIS protocols.
 
 @end table
@@ -587,7 +587,7 @@ Qemu can emulate several different models of network card.
 Valid values for @var{type} are
 @code{i82551}, @code{i82557b}, @code{i82559er},
 @code{ne2k_pci}, @code{ne2k_isa}, @code{pcnet}, @code{rtl8139},
-@code{e1000}, @code{smc91c111}, @code{lance}, @code{mcf_fec} and @code{usb}.
+@code{e1000}, @code{smc91c111}, @code{lance} and @code{mcf_fec}.
 Not all devices are supported on all targets.  Use -net nic,model=?
 for a list of available devices for your target.
 
@@ -1710,14 +1710,12 @@ serial converter, faking a Matrix Orbital LCD

Display (USB ID 0403:FA00).
@item braille
Braille device. This will use BrlAPI to display the braille output on a real or fake device.
-@item net:@var{nic_num}
-Network adapter that supports CDC ethernet and RNDIS protocols. This must be -used together with the @code{-net nic,model=usb,...} option (see description), -where @var{nic_num} specifies the index of the @code{-net nic,...} option -describing the interface (zero-based).
-For instance, user-mode networking can be used by specifying -@example
-qemu -net user,vlan=1 -net nic,model=usb,vlan=1 -usbdevice net:0 [...OPTIONS...]
+@item net:@var{options}
+Network adapter that supports CDC ethernet and RNDIS protocols. @var{options} +specifies NIC options as with @code{-net nic,}@var{options} (see description). +For instance, user-mode networking can be used with
+@example
+qemu [...OPTIONS...] -net user,vlan=0 -usbdevice net:vlan=0
@end example
Currently this cannot be used in machines that support PCI NICs. @end table

vl.c +31 -26

97 lines not on this page · raw message