On 01/03/2013 02:13 AM, Guannan Ren wrote:
The set of patches fixed some typo in network docs and codes and
is trying to support usb-net qemu virtual device.
The following is an example for use.
Libvirt XML sample:
<devices>
<interface type='user'>
<mac address='52:54:00:32:6a:91'/>
<model type='usb-net'/>
Do we really want the model type to be "usb-net"? the "-net" part is
already implicit in the type of device, and there is no requirement that
it needs to exactly match the qemu commandline parameter (although I
suppose that's normally the case). As a matter of fact, <type
model='virtio'/> ends up being equivalent to "-device
virtio-net-pci".
<alias name='net1'/>
<address type='usb' bus='0' port='1'/>
Hmm. As a matter of fact, we know from the address type that it's USB.
Maybe the "model type" should, if anything, reflect whatever model of
usb hardware is being emulated by qemu (similar to "e1000" or
"rtl8139"
or whatever). If the guest-side address is type='usb' and no model type
is given, we could default to "usb-net" (just like we default to
"rtl8139" when it's a PCI address with no model provided).
This is just a suggestion though. I'd like to hear some other opinions.