[libvirt] [PATCH 2/5] conf: add domain NIC model enum macro

Daniel P. Berrange berrange at redhat.com
Wed Jan 16 15:43:40 UTC 2013


On Sun, Jan 13, 2013 at 11:34:32PM +0800, Guannan Ren wrote:
> ---
>  src/conf/domain_conf.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
>  src/conf/domain_conf.h | 36 ++++++++++++++++++++++++++++++++++++
>  2 files changed, 80 insertions(+)
> 
> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> index 068c224..6e6ad85 100644
> --- a/src/conf/domain_conf.c
> +++ b/src/conf/domain_conf.c
> @@ -694,6 +694,50 @@ VIR_ENUM_IMPL(virDomainNumatuneMemPlacementMode,
>                "static",
>                "auto");
>  
> +/* For NIC model macro, a comment marks the start of a model
> + * group which ends with the model just before next comment
> + * or extends to the end of list.
> + */
> +VIR_ENUM_IMPL(virDomainNICModel,
> +              VIR_DOMAIN_NIC_MODEL_LAST,
> +              "default",
> +              "i82550",   /* qemu */
> +              "i82551",
> +              "i82557a",
> +              "i82557b",
> +              "i82557c",
> +              "i82558a",
> +              "i82558b",
> +              "i82559a",
> +              "i82559b",
> +              "i82559c",
> +              "i82559er",
> +              "i82562",
> +              "i82801",

I'm a little skeptical that we need to include all these
i8* NICs here. I think just the ones you have below are
suffiucient.

> +              "spapr-vlan",
> +
> +              "virtio",   /* qemu and vbox */
> +
> +              "ne2k_isa", /* qemu and Xen */
> +              "ne2k_pci",
> +              "pcnet",
> +              "rtl8139",
> +
> +              "e1000",    /* qemu, Xen and VMX */
> +
> +              "netfront", /* Xen(hvm) and libxl */
> +
> +              "vlance",   /* VMX */
> +              "vmxnet",
> +              "vmxnet2",
> +              "vmxnet3",
> +
> +              "Am79C970A",/* vbox */
> +              "Am79C973",
> +              "82540EM",
> +              "82545EM",
> +              "82543GC");
> +

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvir-list mailing list