Signed-off-by: Sriram Yagnaraman <sriram.yagnara...@est.tech>
---
 hw/i386/Kconfig    | 1 +
 hw/net/Kconfig     | 5 +++++
 hw/net/igb_core.c  | 4 +---
 hw/net/meson.build | 2 ++
 4 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig
index d22ac4a4b9..97a0b08842 100644
--- a/hw/i386/Kconfig
+++ b/hw/i386/Kconfig
@@ -94,6 +94,7 @@ config Q35
     imply VTD
     imply AMD_IOMMU
     imply E1000E_PCI_EXPRESS
+    imply IGB_PCI_EXPRESS
     imply VMPORT
     imply VMMOUSE
     select PC_PCI
diff --git a/hw/net/Kconfig b/hw/net/Kconfig
index 1cc1c5775e..18c7851efe 100644
--- a/hw/net/Kconfig
+++ b/hw/net/Kconfig
@@ -44,6 +44,11 @@ config E1000E_PCI_EXPRESS
     default y if PCI_DEVICES
     depends on PCI_EXPRESS && MSI_NONBROKEN
 
+config IGB_PCI_EXPRESS
+    bool
+    default y if PCI_DEVICES
+    depends on PCI_EXPRESS && MSI_NONBROKEN
+
 config RTL8139_PCI
     bool
     default y if PCI_DEVICES
diff --git a/hw/net/igb_core.c b/hw/net/igb_core.c
index c6b2ed9d3e..f9745f9b26 100644
--- a/hw/net/igb_core.c
+++ b/hw/net/igb_core.c
@@ -993,14 +993,12 @@ igb_start_recv(IGBCore *core)
 bool
 igb_can_receive(IGBCore *core)
 {
-    int i;
-
     if (!e1000x_rx_ready(core->owner, core->mac)) {
         trace_igb_rx_disabled();
         return false;
     }
 
-    for (i = 0; i < IGB_NUM_QUEUES; i++) {
+    for (int i = 0; i < IGB_NUM_QUEUES; i++) {
         IGBRingInfo *rxi = &core->rx_ring_info[i];
         if (igb_ring_enabled(core, rxi) &&
                 igb_has_rxbufs(core, rxi, 1) &&
diff --git a/hw/net/meson.build b/hw/net/meson.build
index ebac261542..a5b56452f5 100644
--- a/hw/net/meson.build
+++ b/hw/net/meson.build
@@ -10,6 +10,8 @@ softmmu_ss.add(when: 'CONFIG_PCNET_COMMON', if_true: 
files('pcnet.c'))
 softmmu_ss.add(when: 'CONFIG_E1000_PCI', if_true: files('e1000.c', 
'e1000x_common.c'))
 softmmu_ss.add(when: 'CONFIG_E1000E_PCI_EXPRESS', if_true: 
files('net_tx_pkt.c', 'net_rx_pkt.c'))
 softmmu_ss.add(when: 'CONFIG_E1000E_PCI_EXPRESS', if_true: files('e1000e.c', 
'e1000e_core.c', 'e1000x_common.c'))
+softmmu_ss.add(when: 'CONFIG_IGB_PCI_EXPRESS', if_true: files('net_tx_pkt.c', 
'net_rx_pkt.c'))
+softmmu_ss.add(when: 'CONFIG_IGB_PCI_EXPRESS', if_true: files('igb.c', 
'igb_core.c', 'igbvf.c', 'e1000x_common.c'))
 softmmu_ss.add(when: 'CONFIG_RTL8139_PCI', if_true: files('rtl8139.c'))
 softmmu_ss.add(when: 'CONFIG_TULIP', if_true: files('tulip.c'))
 softmmu_ss.add(when: 'CONFIG_VMXNET3_PCI', if_true: files('net_tx_pkt.c', 
'net_rx_pkt.c'))
-- 
2.34.1


Reply via email to