Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mvpp2: ethtool rxtx stats fix

The ethtool rx and tx queue statistics are reporting wrong values.
Fix reading out the correct ones.

Signed-off-by: Sven Auhagen <sven.auhagen@voleatech.de>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Sven Auhagen and committed by
David S. Miller
cc970925 534a8bf0

+2 -2
+2 -2
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
··· 1544 1544 for (q = 0; q < port->ntxqs; q++) 1545 1545 for (i = 0; i < ARRAY_SIZE(mvpp2_ethtool_txq_regs); i++) 1546 1546 *pstats++ += mvpp2_read_index(port->priv, 1547 - MVPP22_CTRS_TX_CTR(port->id, i), 1547 + MVPP22_CTRS_TX_CTR(port->id, q), 1548 1548 mvpp2_ethtool_txq_regs[i].offset); 1549 1549 1550 1550 /* Rxqs are numbered from 0 from the user standpoint, but not from the ··· 1553 1553 for (q = 0; q < port->nrxqs; q++) 1554 1554 for (i = 0; i < ARRAY_SIZE(mvpp2_ethtool_rxq_regs); i++) 1555 1555 *pstats++ += mvpp2_read_index(port->priv, 1556 - port->first_rxq + i, 1556 + port->first_rxq + q, 1557 1557 mvpp2_ethtool_rxq_regs[i].offset); 1558 1558 } 1559 1559