igb is a family of Intel's gigabit ethernet controllers. This series implements 82576 emulation in particular. You can see the last patch for the documentation.
Note that there is another effort to bring 82576 emulation. This series was developed independently by Sriram Yagnaraman. https://lists.gnu.org/archive/html/qemu-devel/2022-12/msg04670.html Patch 1 - 16 are general improvements for e1000 and e1000e. Patch 17 - 18 are general improvements for e1000e test code. Patch 19 - 21 makes necessary modifications to existing files. Patch 22 starts off implementing igb emulation by copying e1000e code. Patch 23 renames things so that it won't collide with e1000e. Patch 24 makes building igb possible. Patch 25 actually transforms e1000e emulation code into igb emulation. Patch 26 - 27 makes modifications necessary for tests to existing files. Patch 28 copies e1000e test code. Patch 29 transforms e1000e test code into igb test code. Patch 30 adds ethtool test automation. Patch 31 adds the documentation. The main reason why this series is so huge is that the early part of this series includes general improvements for e1000e. They are placed before copying e1000e code so we won't need to duplicate those changes for both of e1000e and igb code later. As their utility do not depend on the igb implementation, they can be merged earlier if necessary. It is also possible to merge the work from Sriram Yagnaraman earlier than patch 18+ and to cherry-pick useful changes from those patches later. I think there are several different ways to get the changes into the mainline. I'm open to any options. Also be aware that most of e1000e patches are already sent to the mailing list. The below are links to Patchew: 03: https://patchew.org/QEMU/[email protected]/ 04: https://patchew.org/QEMU/[email protected]/ 05: https://patchew.org/QEMU/[email protected]/ 06: https://patchew.org/QEMU/[email protected]/ 08 includes: https://patchew.org/QEMU/[email protected]/ 10: https://patchew.org/QEMU/[email protected]/ 11: https://patchew.org/QEMU/[email protected]/ 13: https://patchew.org/QEMU/[email protected]/ 14: https://patchew.org/QEMU/[email protected]/ 15: https://patchew.org/QEMU/[email protected]/ Akihiko Odaki (31): e1000e: Fix the code style hw/net: Add more MII definitions fsl_etsec: Use hw/net/mii.h e1000: Use hw/net/mii.h e1000: Mask registers when writing e1000e: Mask registers when writing e1000: Use more constant definitions e1000e: Use more constant definitions e1000: Use memcpy to intialize registers e1000e: Use memcpy to intialize registers e1000e: Remove pending interrupt flags e1000e: Improve software reset e1000: Configure ResettableClass e1000e: Configure ResettableClass e1000e: Introduce e1000_rx_desc_union e1000e: Set MII_ANER_NWAY tests/qtest/e1000e-test: Fix the code style tests/qtest/libqos/e1000e: Remove duplicate register definitions hw/net/net_tx_pkt: Introduce net_tx_pkt_get_eth_hdr pcie: Introduce pcie_sriov_num_vfs e1000: Split header files igb: Copy e1000e code igb: Rename identifiers igb: Build igb igb: Transform to 82576 implementation tests/qtest/e1000e-test: Fabricate ethernet header tests/qtest/libqos/e1000e: Export macreg functions tests/qtest/libqos/igb: Copy e1000e code tests/qtest/libqos/igb: Transform to igb tests tests/avocado: Add igb test docs/system/devices/igb: Add igb documentation MAINTAINERS | 9 + docs/system/device-emulation.rst | 1 + docs/system/devices/igb.rst | 70 + hw/net/Kconfig | 5 + hw/net/e1000.c | 250 +- hw/net/e1000_common.h | 104 + hw/net/e1000_regs.h | 958 +--- hw/net/e1000e.c | 90 +- hw/net/e1000e_core.c | 491 +- hw/net/e1000e_core.h | 68 +- hw/net/e1000x_common.c | 12 +- hw/net/e1000x_common.h | 128 +- hw/net/e1000x_regs.h | 940 ++++ hw/net/fsl_etsec/etsec.c | 11 +- hw/net/fsl_etsec/etsec.h | 17 - hw/net/fsl_etsec/miim.c | 5 +- hw/net/igb.c | 594 +++ hw/net/igb_common.h | 146 + hw/net/igb_core.c | 3934 +++++++++++++++++ hw/net/igb_core.h | 146 + hw/net/igb_regs.h | 624 +++ hw/net/igbvf.c | 327 ++ hw/net/meson.build | 2 + hw/net/net_tx_pkt.c | 6 + hw/net/net_tx_pkt.h | 8 + hw/net/trace-events | 34 +- hw/pci/pcie_sriov.c | 5 + include/hw/net/mii.h | 14 +- include/hw/pci/pcie_sriov.h | 3 + .../org.centos/stream/8/x86_64/test-avocado | 1 + tests/avocado/igb.py | 38 + tests/qtest/e1000e-test.c | 19 +- tests/qtest/fuzz/generic_fuzz_configs.h | 5 + tests/qtest/igb-test.c | 243 + tests/qtest/libqos/e1000e.c | 38 +- tests/qtest/libqos/e1000e.h | 17 +- tests/qtest/libqos/igb.c | 185 + tests/qtest/libqos/meson.build | 1 + tests/qtest/meson.build | 1 + 39 files changed, 7970 insertions(+), 1580 deletions(-) create mode 100644 docs/system/devices/igb.rst create mode 100644 hw/net/e1000_common.h create mode 100644 hw/net/e1000x_regs.h create mode 100644 hw/net/igb.c create mode 100644 hw/net/igb_common.h create mode 100644 hw/net/igb_core.c create mode 100644 hw/net/igb_core.h create mode 100644 hw/net/igb_regs.h create mode 100644 hw/net/igbvf.c create mode 100644 tests/avocado/igb.py create mode 100644 tests/qtest/igb-test.c create mode 100644 tests/qtest/libqos/igb.c -- 2.39.0
