[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 5/6] hw/net/igb: build support for igb/igbvf devices
From: |
Sriram Yagnaraman |
Subject: |
[PATCH v2 5/6] hw/net/igb: build support for igb/igbvf devices |
Date: |
Thu, 29 Dec 2022 20:08:16 +0100 |
Signed-off-by: Sriram Yagnaraman <sriram.yagnaraman@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
- [PATCH v2 0/6] hw/net/igb: emulated network device with SR-IOV, Sriram Yagnaraman, 2022/12/29
- [PATCH v2 5/6] hw/net/igb: build support for igb/igbvf devices,
Sriram Yagnaraman <=
- [PATCH v2 6/6] tests/qtest/igb-test: introduce qtest for igb, Sriram Yagnaraman, 2022/12/29
- [PATCH v2 4/6] hw/net/igb: emulated intel IGB (82576EB) network device, Sriram Yagnaraman, 2022/12/29
- [PATCH v2 1/6] pcie: add helper function to get number of VFs, Sriram Yagnaraman, 2022/12/29
- [PATCH v2 2/6] hw/net/net_tx_pkt: helper function to get l2 hdr, Sriram Yagnaraman, 2022/12/29
- [PATCH v2 3/6] hw/net/igb: register definitions, Sriram Yagnaraman, 2022/12/29