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

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



---
 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",
+              "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");
+
 #define VIR_DOMAIN_XML_WRITE_FLAGS  VIR_DOMAIN_XML_SECURE
 #define VIR_DOMAIN_XML_READ_FLAGS   VIR_DOMAIN_XML_INACTIVE
 
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 2ac338c..661cc0f 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -768,6 +768,41 @@ struct _virDomainFSDef {
     unsigned long long space_soft_limit; /* in bytes */
 };
 
+enum virDomainNICModel {
+    VIR_DOMAIN_NIC_MODEL_DEFAULT = 0,
+    VIR_DOMAIN_NIC_MODEL_I82550,
+    VIR_DOMAIN_NIC_MODEL_I82551,
+    VIR_DOMAIN_NIC_MODEL_I82557A,
+    VIR_DOMAIN_NIC_MODEL_I82557B,
+    VIR_DOMAIN_NIC_MODEL_I82557C,
+    VIR_DOMAIN_NIC_MODEL_I82558A,
+    VIR_DOMAIN_NIC_MODEL_I82558B,
+    VIR_DOMAIN_NIC_MODEL_I82559A,
+    VIR_DOMAIN_NIC_MODEL_I82559B,
+    VIR_DOMAIN_NIC_MODEL_I82559C,
+    VIR_DOMAIN_NIC_MODEL_I82559ER,
+    VIR_DOMAIN_NIC_MODEL_I82562,
+    VIR_DOMAIN_NIC_MODEL_I82801,
+    VIR_DOMAIN_NIC_MODEL_SPAPR_VLAN,
+    VIR_DOMAIN_NIC_MODEL_VIRTIO,
+    VIR_DOMAIN_NIC_MODEL_NE2K_ISA,
+    VIR_DOMAIN_NIC_MODEL_NE2K_PCI,
+    VIR_DOMAIN_NIC_MODEL_PCNET,
+    VIR_DOMAIN_NIC_MODEL_RTL8139,
+    VIR_DOMAIN_NIC_MODEL_E1000,
+    VIR_DOMAIN_NIC_MODEL_NETFRONT,
+    VIR_DOMAIN_NIC_MODEL_VLANCE,
+    VIR_DOMAIN_NIC_MODEL_VMXNET,
+    VIR_DOMAIN_NIC_MODEL_VMXNET2,
+    VIR_DOMAIN_NIC_MODEL_VMXNET3,
+    VIR_DOMAIN_NIC_MODEL_AM79C970A,
+    VIR_DOMAIN_NIC_MODEL_AM79C973,
+    VIR_DOMAIN_NIC_MODEL_82540EM,
+    VIR_DOMAIN_NIC_MODEL_82545EM,
+    VIR_DOMAIN_NIC_MODEL_82543GC,
+
+    VIR_DOMAIN_NIC_MODEL_LAST
+};
 
 /* 5 different types of networking config */
 enum virDomainNetType {
@@ -2306,6 +2341,7 @@ VIR_ENUM_DECL(virDomainGraphicsSpiceClipboardCopypaste)
 VIR_ENUM_DECL(virDomainGraphicsSpiceMouseMode)
 VIR_ENUM_DECL(virDomainNumatuneMemMode)
 VIR_ENUM_DECL(virDomainNumatuneMemPlacementMode)
+VIR_ENUM_DECL(virDomainNICModel)
 VIR_ENUM_DECL(virDomainHyperv)
 /* from libvirt.h */
 VIR_ENUM_DECL(virDomainState)
-- 
1.7.11.2


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