[PATCH 0/5] use VIR_ENUM_DECL for domain NIC model and add usb-net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patchset uses VIR_ENUM_DECL and VIR_ENUM_IMPL macros for NIC models
and changes the related codes to use them.
All of NIC models supported by various hypervisors comprise the enum,
so the problem is that we need to do further checking in hypervisor-specific
implementation. Fortunately, VMX and Vbox did this checking very well already.
In 4/5, a similar job is performed for QEMU/KVM.

And, adds usb-net support.
The vendorId and productID of is 0525:a4a2. The corresponding item in
usb-ids is as follows:

0525  Netchip Technology, Inc.
a4a2  Linux-USB Ethernet/RNDIS Gadget

In my opinion, using usb-net directly is good enough, so I keep it.
Any idea is welcome.

Libvirt XML sample:
  <devices>
    <interface type='user'>
      <mac address='52:54:00:32:6a:91'/>
      <model type='usb-net'/>
      <alias name='net1'/>
      <address type='usb' bus='0' port='1'/>
    </interface>
  </devices>

qemu commandline:

qemu ${other_vm_args}
    -netdev user,id=hostnet1 \
    -device usb-net,netdev=hostnet1,id=net1,\
      mac=52:54:00:32:6a:91,bus=usb.0,port=1

Guannan Ren(5)
  [PATCH 1/5] conf: fix mismatch on two domain VIR_ENUM_IMPL macro
  [PATCH 2/5] conf: add domain NIC model enum macro
  [PATCH 3/5] net: use virDomainNICModelType{From|To}String functions
  [PATCH 4/5] qemu: add NIC model checking for qemu hypervisor
  [PATCH 5/5] qemu: add usb-net support

 docs/formatdomain.html.in        |   8 +++++++-
 src/conf/domain_conf.c           | 101 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------
 src/conf/domain_conf.h           |  45 ++++++++++++++++++++++++++++++++++++++++++++-
 src/libvirt_private.syms         |   2 ++
 src/libxl/libxl_conf.c           |   5 +++--
 src/parallels/parallels_driver.c |   2 +-
 src/qemu/qemu_command.c          |  41 +++++++++++++++++++++++++++--------------
 src/qemu/qemu_driver.c           |   2 +-
 src/qemu/qemu_hotplug.c          |  10 ++++++----
 src/qemu/qemu_process.c          |  14 +++++++-------
 src/vbox/vbox_tmpl.c             |  57 +++++++++++++++++++++++++++------------------------------
 src/vmx/vmx.c                    |  31 ++++++++++++++++---------------
 src/xenxs/xen_sxpr.c             |  23 ++++++++++++-----------
 src/xenxs/xen_xm.c               |  21 +++++++++++----------
 14 files changed, 237 insertions(+), 125 deletions(-)

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]