[PATCH v6 0/7] igb: Implement Transmit Rate Limiting (TRL)

Josh Hilke posted 7 patches 1 month, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260617-igb-trl-v6-0-bbdfcadb81e2@google.com
Maintainers: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>, Sriram Yagnaraman <sriram.yagnaraman@ericsson.com>, Jason Wang <jasowang@redhat.com>, Fabiano Rosas <farosas@suse.de>, Laurent Vivier <lvivier@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>
There is a newer version of this series
hw/net/igb.c           |  43 ++++++++++
hw/net/igb_common.h    |   1 +
hw/net/igb_core.c      | 144 ++++++++++++++++++++++++++++++++--
hw/net/igb_core.h      |  12 +++
hw/net/igb_regs.h      |   6 ++
tests/qtest/igb-test.c | 209 +++++++++++++++++++++++++++++++++++++++++++++++++
6 files changed, 410 insertions(+), 5 deletions(-)
[PATCH v6 0/7] igb: Implement Transmit Rate Limiting (TRL)
Posted by Josh Hilke 1 month, 1 week ago
This is v6 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:

v6:
  - Use extract32() to get scaled rate factor from register.
  - Use extract32() in igb_set_trldqsel() to extract queue index.
  - Use uint32_t for qidx.
  - Change igb_trl_enabled() signature to take const IGBTrlQueue* instead of register value.
  - Merge target rate and delay calculation into igb_trl_calculate_delay() using muldiv64() and clamping.
  - 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 only clear the RS_ENA bit instead of setting TRLRC to 0.
  - Update igb_reset() to explicitly clear TRLRC registers.
  - Extract TRL queue initialization to a new helper function igb_trl_init().
  - Introduce igb_trl_uninit() helper function to match igb_trl_init().
  - Introduce igb_trl_reset() helper function to set trlrc to 0 and delete timers.
  - Modify igb_set_trlrc() to only disable the queue if the guest explicitly cleared RS_ENA.

Signed-off-by: Josh Hilke <jrhilke@google.com>
---
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      | 144 ++++++++++++++++++++++++++++++++--
 hw/net/igb_core.h      |  12 +++
 hw/net/igb_regs.h      |   6 ++
 tests/qtest/igb-test.c | 209 +++++++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 410 insertions(+), 5 deletions(-)
---
base-commit: 98b060da3a4f92b2a994ead5b16a87e783baf77c
change-id: 20260608-igb-trl-19be198da6f2

Best regards,
-- 
Josh Hilke <jrhilke@google.com>