Skip to content

Commit cc97092

Browse files
Sven Auhagendavem330
authored andcommitted
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>
1 parent 534a8bf commit cc97092

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1544,7 +1544,7 @@ static void mvpp2_read_stats(struct mvpp2_port *port)
15441544
for (q = 0; q < port->ntxqs; q++)
15451545
for (i = 0; i < ARRAY_SIZE(mvpp2_ethtool_txq_regs); i++)
15461546
*pstats++ += mvpp2_read_index(port->priv,
1547-
MVPP22_CTRS_TX_CTR(port->id, i),
1547+
MVPP22_CTRS_TX_CTR(port->id, q),
15481548
mvpp2_ethtool_txq_regs[i].offset);
15491549

15501550
/* Rxqs are numbered from 0 from the user standpoint, but not from the
@@ -1553,7 +1553,7 @@ static void mvpp2_read_stats(struct mvpp2_port *port)
15531553
for (q = 0; q < port->nrxqs; q++)
15541554
for (i = 0; i < ARRAY_SIZE(mvpp2_ethtool_rxq_regs); i++)
15551555
*pstats++ += mvpp2_read_index(port->priv,
1556-
port->first_rxq + i,
1556+
port->first_rxq + q,
15571557
mvpp2_ethtool_rxq_regs[i].offset);
15581558
}
15591559

0 commit comments

Comments
 (0)