On 16/6/26 00:18, Josh Hilke wrote:
Implement write handlers for TLDQSEL and TRLRC registers to allow the
guest to configure Transmit Rate Limiting. Translate the register Rate
Factor into a physical target rate (bytes/sec) per queue. Disable TRL
and clear timers when the link status changes or when TRL is disabled by
the guest.
Signed-off-by: Josh Hilke <[email protected]>
---
hw/net/igb_core.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 56 insertions(+), 1 deletion(-)
@@ -4127,7 +4180,9 @@ static const writeops igb_macreg_writeops[] = {
[PVTEICR6] = igb_set_vteicr,
[PVTEICR7] = igb_set_vteicr,
[VTIVAR ... VTIVAR + 7] = igb_set_vtivar,
- [VTIVAR_MISC ... VTIVAR_MISC + 7] = igb_mac_writereg
+ [VTIVAR_MISC ... VTIVAR_MISC + 7] = igb_mac_writereg,
+ [TRLDQSEL] = igb_set_trldqsel,
+ [TRLRC] = igb_set_trlrc
Please add a trailing comma to avoid the same code churn in
the future ;)
};
enum { IGB_NWRITEOPS = ARRAY_SIZE(igb_macreg_writeops) };