This is v5 of a patch series implementing the Transmit Rate Limiter (TRL) feature for the Intel 82576 (igb) network device emulation in QEMU.
v4: https://lists.gnu.org/archive/html/qemu-devel/2026-06/msg03717.html Changelog: v5: - Use extract32() to get scaled rate factor from TRLRC register. - Use extract32() in igb_set_trldqsel() to extract queue index. - Use unsigned int for qidx. - Change igb_trl_enabled() signature to take const IGBTrlQueue* instead of register value. - Make igb_trl_get_target_rate() static. - Move igb_trl_get_target_rate() and igb_trl_get_scaled_rate_factor() to from Patch 1 to Patch 5 (where they are used). - Use divu128() and mulu64() helpers in igb_trl_calculate_delay() for safe 64-bit division. - Change igb_trl_needed() to check for any non-zero trlrc value instead of just enabled state. - Add trailing comma to TRLRC in igb_macreg_writeops. - Remove flushing logic when TRL is disabled for a queue. - Modify igb_trl_disable() to not flush pending packets and not overwrite TRLRC - Extract TRL queue initialization to a helper function igb_trl_init(). - Introduce igb_trl_uninit() helper function to match igb_trl_init(). - Introduce igb_trl_reset() helper function to clear TRLRC and delete timers. - Modify igb_set_trlrc() to only disable the queue if the guest explicitly cleared RS_ENA. Signed-off-by: Josh Hilke <[email protected]> --- Josh Hilke (7): igb: Define TRL registers and core state igb: Add VMState support for TRL state igb: Implement TRL register write and configuration igb: Refactor TX path to return processed byte count igb: Implement TRL throttling and timer resumption igb: Add QTest for Transmit Rate Limiter register multiplexing igb: Add QTest for Transmit Rate Limiter traffic throttling hw/net/igb.c | 43 ++++++++++ hw/net/igb_common.h | 1 + hw/net/igb_core.c | 160 +++++++++++++++++++++++++++++++++++-- hw/net/igb_core.h | 12 +++ hw/net/igb_regs.h | 6 ++ tests/qtest/igb-test.c | 209 +++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 426 insertions(+), 5 deletions(-) --- base-commit: 98b060da3a4f92b2a994ead5b16a87e783baf77c change-id: 20260608-igb-trl-19be198da6f2 Best regards, -- Josh Hilke <[email protected]>
