[PATCH] conf: Introduce igb model for <interface>

Akihiko Odaki akihiko.odaki at daynix.com
Mon Apr 10 05:48:07 UTC 2023


igb is a new network device which will be introduced with QEMU 8.0.0.
It is a successor of e1000e so it has PCIe interface and is understands
virtio-net headers as e1000e does.

Signed-off-by: Akihiko Odaki <akihiko.odaki at daynix.com>
---
 src/conf/domain_conf.c         | 1 +
 src/conf/domain_conf.h         | 1 +
 src/qemu/qemu_domain_address.c | 3 ++-
 src/qemu/qemu_interface.c      | 1 +
 4 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index d16a247a45..25401f742f 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -587,6 +587,7 @@ VIR_ENUM_IMPL(virDomainNetModel,
               "virtio",
               "e1000",
               "e1000e",
+              "igb",
               "virtio-transitional",
               "virtio-non-transitional",
               "usb-net",
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 9e281692ff..44b070ba0c 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -954,6 +954,7 @@ typedef enum {
     VIR_DOMAIN_NET_MODEL_VIRTIO,
     VIR_DOMAIN_NET_MODEL_E1000,
     VIR_DOMAIN_NET_MODEL_E1000E,
+    VIR_DOMAIN_NET_MODEL_IGB,
     VIR_DOMAIN_NET_MODEL_VIRTIO_TRANSITIONAL,
     VIR_DOMAIN_NET_MODEL_VIRTIO_NON_TRANSITIONAL,
     VIR_DOMAIN_NET_MODEL_USB_NET,
diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c
index b8d1969fbe..9f13f5f195 100644
--- a/src/qemu/qemu_domain_address.c
+++ b/src/qemu/qemu_domain_address.c
@@ -750,7 +750,8 @@ qemuDomainDeviceCalculatePCIConnectFlags(virDomainDeviceDef *dev,
         if (net->model == VIR_DOMAIN_NET_MODEL_VIRTIO_TRANSITIONAL)
             return pciFlags;
 
-        if (net->model == VIR_DOMAIN_NET_MODEL_E1000E)
+        if (net->model == VIR_DOMAIN_NET_MODEL_E1000E ||
+            net->model == VIR_DOMAIN_NET_MODEL_IGB)
             return pcieFlags;
 
         /* the only time model can be "unknown" is for type='hostdev'
diff --git a/src/qemu/qemu_interface.c b/src/qemu/qemu_interface.c
index 264d5e060c..2aa4d53215 100644
--- a/src/qemu/qemu_interface.c
+++ b/src/qemu/qemu_interface.c
@@ -241,6 +241,7 @@ qemuInterfaceIsVnetCompatModel(const virDomainNetDef *net)
 {
     return (virDomainNetIsVirtioModel(net) ||
             net->model == VIR_DOMAIN_NET_MODEL_E1000E ||
+            net->model == VIR_DOMAIN_NET_MODEL_IGB ||
             net->model == VIR_DOMAIN_NET_MODEL_VMXNET3);
 }
 
-- 
2.40.0



More information about the libvir-list mailing list