]> xenbits.xensource.com Git - qemu-xen.git/commit
e1000e: Fix tx/rx counters
authortimothee.cocault@gmail.com <timothee.cocault@gmail.com>
Mon, 10 Apr 2023 15:27:48 +0000 (17:27 +0200)
committerMichael Tokarev <mjt@tls.msk.ru>
Tue, 23 May 2023 19:07:47 +0000 (22:07 +0300)
commiteb134d1d589f3ed693b40f2654ff478424b5d9cb
treeb8545a070ad167fac055482a85f216a50d773fa7
parenta7002f15c8635bae3f45a7e675920164df42b77d
e1000e: Fix tx/rx counters

The bytes and packets counter registers are cleared on read.

Copying the "total counter" registers to the "good counter" registers has
side effects.
If the "total" register is never read by the OS, it only gets incremented.
This leads to exponential growth of the "good" register.

This commit increments the counters individually to avoid this.

Signed-off-by: Timothée Cocault <timothee.cocault@gmail.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
(cherry picked from commit 8d689f6aae8be096b4a1859be07c1b083865f755)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/net/e1000.c
hw/net/e1000e_core.c
hw/net/e1000x_common.c
hw/net/igb_core.c