[PATCH v2 resend 1/4] add domain NIC model enum macro

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

 



---
 src/conf/domain_conf.c | 31 +++++++++++++++++++++++++++++++
 src/conf/domain_conf.h | 23 +++++++++++++++++++++++
 2 files changed, 54 insertions(+)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 0c75838..90a6359 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -700,6 +700,37 @@ 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",
+              "spapr-vlan", /* qemu */
+
+              "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 4ffa4aa..0a06e11 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -782,6 +782,28 @@ struct _virDomainFSDef {
     unsigned long long space_soft_limit; /* in bytes */
 };
 
+enum virDomainNICModel {
+    VIR_DOMAIN_NIC_MODEL_DEFAULT = 0,
+    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 {
@@ -2324,6 +2346,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

--
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]